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

Commit 17a998d

Browse files
author
AWS ParallelCluster user
committed
porting to aws slurm
1 parent 0817ec0 commit 17a998d

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

snakemake_executor_plugin_slurm/__init__.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,18 @@ def run_job(self, job: JobExecutorInterface):
139139
# generic part of a submission string:
140140
# we use a run_uuid as the job-name, to allow `--name`-based
141141
# filtering in the job status checks (`sacct --name` and `squeue --name`)
142-
if wildcard_str == "":
143-
comment_str = f"rule_{job.name}"
144-
else:
145-
comment_str = f"rule_{job.name}_wildcards_{wildcard_str}"
142+
143+
#if wildcard_str == "":
144+
# comment_str = f"rule_{job.name}"
145+
#else:
146+
# comment_str = f"rule_{job.name}_wildcards_{wildcard_str}"
147+
comment_str=os.getenv('SMK_SLURM_COMMENT','RnD')
146148
call = (
147149
f"sbatch "
148150
f"--parsable "
151+
f"--comment '{comment_str}' "
149152
f"--job-name {self.run_uuid} "
150153
f"--output '{slurm_logfile}' "
151-
f"--export=ALL "
152-
f"--comment {comment_str}"
153154
)
154155

155156
call += self.get_account_arg(job)
@@ -213,7 +214,11 @@ def run_job(self, job: JobExecutorInterface):
213214
# (see https://github.com/snakemake/snakemake/issues/2014)
214215
call += f" -D {self.workflow.workdir_init}"
215216
# and finally the job to execute with all the snakemake parameters
216-
call += f' --wrap="{exec_job}"'
217+
call += f''' <<EOF
218+
#!/bin/bash
219+
{exec_job}
220+
EOF
221+
'''
217222

218223
self.logger.debug(f"sbatch call: {call}")
219224
try:

0 commit comments

Comments
 (0)