Search code examples
slurmhpc

Asking for all cpus on a node and minimum number of cpus


Is it possible to ask for all cpus on a node while specifying only nodes which have a number of cores greater than some number?

Alternatively, is it possible to make --cpu-per-task vary based on the --constraint?


Solution

  • You can set

    #SBATCH --mincpus=<min number of CPUs>
    #SBATCH --exclusive
    

    Slurm will then allocated for your job the first entire node becoming free, that has enough CPUs.