how to specify max memory per core for a slurm job

Viewed 1890

I want to specify max amount of memory per core for a batch job in slurm

i can see two sbatch memory options:

--mem=MB      maximum amount of real memory per node  required by the job.

--mem-per-cpu=mem   amount of real memory per allocated CPU required by the job.

either of those options suits my needs

any suggestions how to achive this goal

1 Answers

You can use --mem=MaxMemPerNode to use the maximum allowed memory for the job in that node. if configured in the cluster, you can see the value MaxMemPerNode using scontrol show config.

A special case, setting --mem=0 will also give the job access to all of the memory on each node.(This is not ideal in a heterogeneous cluster since, the lowest memory value among the nodes will only be used for all the allocated nodes).

If configured in the cluster, --mem-per-cpu=MaxMemPerCPU can be used to enable using the maximum allowed memory per cpu.

Related