<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br></div><div>We are using a single system "cluster" and want some control of fair-use with the GPUs. The sers are not supposed to be able to use the GPUs until they have allocated the resources through slurm. We have no head node, so slurmctld, slurmdbd, and slurmd are all run on the same system. <br></div><div><br></div><div>I have a configuration working now such that the GPUs can be scheduled and allocated.</div><div>However logging into the system before allocating GPUs gives full access to all of them. <br></div><div><br></div><div>I would like to configure slurm cgroups to disable access to GPUs until they have been allocated.</div><div><br></div><div>On first login, I get:</div><div>nvidia-smi -q | grep UUID<br>    GPU UUID                        : GPU-6076ce0a-bc03-a53c-6616-0fc727801c27<br>    GPU UUID                        : GPU-5620ec48-7d76-0398-9cc1-f1fa661274f3<br>    GPU UUID                        : GPU-176d0514-0cf0-df71-e298-72d15f6dcd7f<br>    GPU UUID                        : GPU-af03c80f-6834-cb8c-3133-2f645975f330<br>    GPU UUID                        : GPU-ef10d039-a432-1ac1-84cf-3bb79561c0d3<br>    GPU UUID                        : GPU-38168510-c356-33c9-7189-4e74b5a1d333<br>    GPU UUID                        : GPU-3428f78d-ae91-9a74-bcd6-8e301c108156<br>    GPU UUID                        : GPU-c0a831c0-78d6-44ec-30dd-9ef5874059a5</div><div><br></div><div><br></div><div>And running from the queue:</div><div>srun -N 1 --gres=gpu:2 nvidia-smi -q | grep UUID<br>    GPU UUID                        : GPU-6076ce0a-bc03-a53c-6616-0fc727801c27<br>    GPU UUID                        : GPU-5620ec48-7d76-0398-9cc1-f1fa661274f3<br></div><div><br></div><div><br></div><div>Pastes of my config files are:</div><div>## slurm.conf ##<br></div><div><a href="https://pastebin.com/UxP67cA8">https://pastebin.com/UxP67cA8</a></div><div><br><div><b>## cgroup.conf ##<br></b></div><div>CgroupAutomount=yes <br>CgroupReleaseAgentDir="/etc/slurm/cgroup" <br><br>ConstrainCores=yes <br>ConstrainDevices=yes<br>ConstrainRAMSpace=yes<br>#TaskAffinity=yes<br></div><div><br></div></div><div><b>## cgroup_allowed_devices_file.conf ## </b><br></div><div>/dev/null<br>/dev/urandom<br>/dev/zero<br>/dev/sda*<br>/dev/cpu/*/*<br>/dev/pts/*<br>/dev/nvidia*<br></div></div></div></div></div></div></div></div></div>