'Using srun : how to set number of nodes and cores

I am new to using commands like srun. I want to launch a parallel job using 1 node 1cpu and 16 cores, but i dont know what i should indicate when using srun function. (1 node is composed of 2 CPUs with 18 cores on each CPU)

Does anyone knows which parameters i should use?



Solution 1:[1]

To set minimums on the cpu resources lower than those available per node, you need to provide --cpus-per-task in your srun command (see https://slurm.schedmd.com/srun.html#OPT_cpus-per-task).

If you want to explicitly reserve the other 2 cores per cpu for system use, see https://slurm.schedmd.com/mc_support.html#srun_hints for usage of --cpu-bind or high level resource limits.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 pcamach2