From 054c6553a5132619fa0aab41c42e12faf07865d8 Mon Sep 17 00:00:00 2001 From: git-user Date: Thu, 15 Jun 2023 18:58:37 +0000 Subject: [PATCH] Fix #5972: WIP --- etc/run-supervisor.sh | 2 +- sirepo/pkcli/job_agent.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/etc/run-supervisor.sh b/etc/run-supervisor.sh index 766190274d..b485105122 100644 --- a/etc/run-supervisor.sh +++ b/etc/run-supervisor.sh @@ -72,7 +72,7 @@ EOF esac echo "${SIREPO_SIMULATION_DB_SBATCH_DISPLAY:-without sbatch}" if [[ $SIREPO_JOB_DRIVER_MODULES =~ sbatch ]]; then - export SIREPO_JOB_DRIVER_SBATCH_HOST_KEY=asdf + export SIREPO_JOB_DRIVER_SBATCH_HOST_KEY=abcd if [[ ! $SIREPO_JOB_DRIVER_SBATCH_HOST_KEY ]]; then cat <&2 you need to get the host key in ~/.ssh/known_hosts diff --git a/sirepo/pkcli/job_agent.py b/sirepo/pkcli/job_agent.py index 3311a28935..68c20a9b1a 100644 --- a/sirepo/pkcli/job_agent.py +++ b/sirepo/pkcli/job_agent.py @@ -707,8 +707,11 @@ async def start(self): await self._prepare_simulation() if self._terminating: return + script = self._sbatch_script() + pkdp("\n\n\n\n\n\n script =\n {}", script) + pkio.write_text("./script.txt", script) p = subprocess.run( - ("sbatch", self._sbatch_script()), + ("sbatch", script), close_fds=True, cwd=str(self.run_dir), capture_output=True,