Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.

Commit 6d4f147

Browse files
author
John Major
committed
additions to pcluster sbatch
1 parent f1f2ca1 commit 6d4f147

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

snakemake_executor_plugin_pcluster_slurm/__init__.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ def run_job(self, job: JobExecutorInterface):
127127
f".snakemake/slurm_logs/{group_or_rule}/{wildcard_str}/%j.log"
128128
)
129129
logdir = os.path.dirname(slurm_logfile)
130+
131+
slurm_errorlogfile = os.path.abspath(
132+
f".snakemake/slurm_logs/{group_or_rule}/{wildcard_str}/%j.err"
133+
)
134+
errlogdir = os.path.dirname(slurm_errorlogfile)
135+
130136
# this behavior has been fixed in slurm 23.02, but there might be plenty of
131137
# older versions around, hence we should rather be conservative here.
132138
assert "%j" not in logdir, (
@@ -149,7 +155,11 @@ def run_job(self, job: JobExecutorInterface):
149155
f"sbatch "
150156
f"--parsable "
151157
f"--comment '{comment_str}' "
152-
f"--job-name {self.run_uuid} "
158+
f"--time={resources.time} "
159+
f"--job-name '{job.name}-{run_uuid}' "
160+
f"--distribution block "
161+
f"--chdir {os.getcwd()} "
162+
f"--error '{slurm_errorlogfile}' "
153163
f"--output '{slurm_logfile}' "
154164
)
155165

0 commit comments

Comments
 (0)