Reputation: 399
In the sbatch script below, does "np" (48) take precedence over "ntasks" or only 24 tasks are used to run. In other words, what happens when "np" is greater than "ntasks" or "np" is equal to "ntasks * N"
#SBATCH --ntasks 24
#SBATCH -N 2
mpirun -np 48 ./run
Upvotes: 0
Views: 333
Reputation: 5810
Print out the slurm environment variables. You'll see that the hostlist is 24 items long, so if you create 48 processes, it will use each location in the hostlist twice. Depending on your core count that may lead to a loss of efficiency: all process run at the same time, but if you have more processes than cores, Unix will time-slice them.
Upvotes: 1