Skip to content

Commit

Permalink
🔧 allow 'extra_args' for every slurm exit and clean cmds
Browse files Browse the repository at this point in the history
  • Loading branch information
juanesarango committed Mar 19, 2024
1 parent 3aaf788 commit 96085a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions isabl_cli/batch_systems/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def submit_slurm_array(
# important when the scheduler kills the head job
dependency = "${SLURM_ARRAY_JOB_ID}_${SLURM_ARRAY_TASK_ID}"
afternotok = (
f"sbatch --depend=afternotok:{dependency} --kill-on-invalid-dep yes "
f"sbatch {extra_args} --depend=afternotok:{dependency} --kill-on-invalid-dep yes "
f'-o {join(rundir, "head_job.exit")} -J "EXIT: {dependency}" '
f"<< EOF\n#!/bin/bash\n{exit_command}\nEOF\n"
)
Expand Down Expand Up @@ -155,7 +155,7 @@ def submit_slurm_array(
jobid = subprocess.check_output(cmd, shell=True).decode("utf-8").strip()

cmd = (
f"sbatch -J 'CLEAN: {jobname}' {wait} --kill-on-invalid-dep yes "
f"sbatch {extra_args} -J 'CLEAN: {jobname}' {wait} --kill-on-invalid-dep yes "
f"-o /dev/null -e /dev/null --depend=afterany:{jobid} --parsable {root}/clean.sh"
)

Expand Down
1 change: 1 addition & 0 deletions isabl_cli/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"BASE_STORAGE_DIRECTORY": join(expanduser("~"), "isabl_storage"),
"FASTQ_READ_SUFFIX": "",
"ADMIN_USER": getpass.getuser(),
"CLIENT_NAME": None,
"TIME_ZONE": "America/New_York",
"INSTALLED_APPLICATIONS": [],
"CUSTOM_COMMANDS": [],
Expand Down

0 comments on commit 96085a0

Please sign in to comment.