How does one configure SLURM groups to limit access to partitions?

This question could be answered to various depths, depending on the stage of “user organization” from which the asker is starting. If groups and partitions are already created, then appropriate entries in the SLURM configuration file are all that would be required. (My slurm.conf is in /etc/slurm.) If the asker needs to know how to create groups, that’s another layer. Please explain solutions to both scenarios in your answers.

CURATOR torey

ANSWER: To configure SLURM groups to limit access to SLURM partitions, one must edit the SLURM configuration file that resides on the management node for the given cluster. Root access will most likely be required.
The file to edit is in /etc/slurm and is called slurm.conf. (As a reminder, it’s a good idea to copy the original slurm.conf to another file in case of disaster.) For each partition, add a new line in slurm.conf with the following information (the entries to the right of the equals signs are examples):

PartitionName=xyzPartition Nodes=compute[001-010] Priority=1000 AllowGroups=xxxMioNodes, yyyMioNodes, zzzMioNodes

Some notes:
The reason for creating groups is to engage the SLURM pre-emption mechanism;
The PartitionName defines the partition;
The Nodes entry assigns nodes to that partition;
The Priority entry is related to the pre-emption mechanism; information can be found in SLURM documentation;
The AllowGroups entry specifies the groups of users that can access this partition (comma-separated).