SLURM: How to run 30 jobs on particular nodes only?
You can use -w option. Its tested in slurm version 17.11.10
For example:
srun -p partition -w node10 hostname
You can go the opposite direction and use the --exclude
option of sbatch
:
srun --exclude=machineN[4-XX] <some_cmd>
Then slurm will only consider nodes that are not listed in the excluded list. If the list is long and complicated, it can be saved in a file.
Another option is to check whether the Slurm configuration includes ''features'' with
sinfo --format "%20N %20f"
If the 'features' column shows a comma-delimited list of features each node has (might be CPU family, network connection type, etc.), you can select a subset of the nodes with a specific features using
srun --constraint=<some_feature> <some_cmd>