Skip to content

Commit

Permalink
fix: fixes issue #40 - ntasks set explicitly (#44)
Browse files Browse the repository at this point in the history
related to #40 , ought to fix this. Does not hurt the smp nor the mpi
case.
  • Loading branch information
cmeesters committed Feb 29, 2024
1 parent b9311b0 commit f5c2c2c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions snakemake_executor_plugin_slurm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ def run_job(self, job: JobExecutorInterface):
if job.resources.get("mpi", False):
if job.resources.get("nodes", False):
call += f" --nodes={job.resources.get('nodes', 1)}"
if job.resources.get("tasks", False):
call += f" --ntasks={job.resources.get('tasks', 1)}"

# fixes #40 - set ntasks regarlless of mpi, because
# SLURM v22.05 will require it for all jobs
call += f" --ntasks={job.resources.get('tasks', 1)}"

cpus_per_task = job.threads
if job.resources.get("cpus_per_task"):
Expand Down

0 comments on commit f5c2c2c

Please sign in to comment.