Home Ask Login Register

Developers Planet

Your answer is one click away!

irritable_phd_syndrom February 2016

difference between slurm sbatch -n and -c

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.


Zulan February 2016

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.

Post Status

Asked in February 2016
Viewed 2,754 times
Voted 5
Answered 1 times


Leave an answer

Quote of the day: live life