[slurm-users] Question about sbatch options: -n, and --cpus-per-task

Ralph Castain rhc at pmix.org
Thu Mar 24 19:44:43 UTC 2022


Well, there is indeed a difference - and it is significant.

> On Mar 24, 2022, at 12:32 PM, David Henkemeyer <david.henkemeyer at gmail.com> wrote:
> 
> Assuming -N is 1 (meaning, this job needs only one node), then is there a difference between any of these 3 flag combinations:
> 
> -n 64 (leaving cpus-per-task to be the default of 1)

Will launch 64 instances of your application, each bound to a single cpu

> --cpus-per-task  64 (leaving -n to be the default of 1)

Will run ONE instance of your application (no binding if the node has 64 cpus - otherwise, the proc will be bound to 64 cpu's)

> --cpus-per-task 32 -n 2

Will run TWO instances of your application, each bound to 32 cpu's

> 
> As far as I can tell, there is no functional difference. But if there is even a subtle difference, I would love to know what it is!
> 
> Thanks
> David 
> -- 
> Sent from Gmail Mobile




More information about the slurm-users mailing list