[slurm-users] SLURM_NTASKS values in interactive and batch jobs

Lech Nieroda lech.nieroda at uni-koeln.de
Wed Jul 3 15:17:01 UTC 2019

Hi all,

there seems to be a  discrepancy in the SLURM_NTASKS values depending on the job type.

For example, let’s say the job requests 5 tasks (-n 5), is submitted with sbatch, then its job step uses only 1 task (e.g. srun -n 1). In that case you’ll see following values (with every launcher):


Exactly what one would expect.
When running the same scenario but with salloc instead of sbatch, you’ll get (with srun, OpenMPI’s mpirun but not with IntelMPI’s mpirun):


Is that the expected behaviour or a bug?

Kind regards,

More information about the slurm-users mailing list