2

The cluster that I work with recently switched from SGE to SLURM. I was wondering what the difference between sbatch options --ntasks and --cpus-per-task?

--ntasks seemed appropriate for some MPI jobs that I ran but did not seem appropriate for some OpenMP jobs that I ran.

For the OpenMP jobs in my SLURM script, I specified:

#SBATCH --ntasks=20

All the nodes in the partition are 20core machines, so only 1 job should run per machine. However, multiple jobs were running simultaneously on each node.

irritable_phd_syndrome
  • 4,631
  • 3
  • 32
  • 60

1 Answers1

4

Tasks in SLURM are basically processes / mpi ranks - it seems you just want a single task. A task can be multithreaded. The of cpus per taks is set via -c, --cpus-per-task. If you use hyperthreading it becomes a little bit more complicated, as explains in man srun.

Zulan
  • 21,896
  • 6
  • 49
  • 109