Is it possible to specify a list of allowed nodes when submitting a single-node job? I.e. the job should be restricted to run on one of the listed nodes (basically the complement to --exclude
).
I first thought that --nodelist
is what I need but there it tries to use all specified nodes instead of just picking one of them (thus listing multiple nodes there is incompatible with --nodes=1
).
Even though the current version of the documentation does not reflect that, the latest Slurm version to date (23.02) allows specifying more nodes in -w/--nodelist
than needed by -N/--nodes
.
The change log for 23.02.0rc1
indeed indicates:
Allow for --nodelist to contain more nodes than required by --nodes.
And I can confirm it works on a cluster with Slurm 23.02.6
:
[user@cluster ~]$ srun -N1 -w node0[11-15] hostname
node015
[user@cluster ~]$