Skip to content

Commit

Permalink
ensure parsl launch scripts do not get saved in cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
svandenhaute committed Feb 11, 2024
1 parent 066c499 commit 129bf87
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions psiflow/parsl_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,14 @@ def __call__(self, command: str, tasks_per_node: int, nodes_per_block: int) -> s
[[ "{debug}" == "1" ]] && echo "Found nodes : $NODES"
WORKERCOUNT={task_blocks}
cat << SLURM_EOF > cmd_$SLURM_JOB_NAME.sh
path_cmd=$(dirname $SLURM_JOB_STDOUT)
cat << SLURM_EOF > $path_cmd/cmd_$SLURM_JOB_NAME.sh
{command}
SLURM_EOF
chmod a+x cmd_$SLURM_JOB_NAME.sh
chmod a+x $path_cmd/cmd_$SLURM_JOB_NAME.sh
srun --ntasks {task_blocks} -l {overrides} bash cmd_$SLURM_JOB_NAME.sh
srun --ntasks {task_blocks} -l {overrides} bash $path_cmd/cmd_$SLURM_JOB_NAME.sh
[[ "{debug}" == "1" ]] && echo "Done"
""".format(
Expand Down

0 comments on commit 129bf87

Please sign in to comment.