Skip to content

Commit 64bf37a

Browse files
committed
fix: reverting to but only in case of a multi cluster setup.
1 parent 080d56d commit 64bf37a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

snakemake_executor_plugin_slurm/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -820,10 +820,12 @@ def cancel_jobs(self, active_jobs: List[SubmittedJobInfo]):
820820
# virtually no time.
821821
scancel_command = f"scancel {jobids}"
822822

823-
# Add cluster specification if any clusters were found during submission
823+
# adding the --clusters=all flag, if we submitted to more than one cluster
824+
# issue #397 mentions that this flag is not available in older SLURM versions,
825+
# but we assume that multicluster setups will usually run on a recent version
826+
# of SLURM.
824827
if self._submitted_job_clusters:
825-
clusters_str = ",".join(sorted(self._submitted_job_clusters))
826-
scancel_command += f" --clusters={clusters_str}"
828+
scancel_command += f" --clusters=all"
827829

828830
subprocess.check_output(
829831
scancel_command,

0 commit comments

Comments
 (0)