<div dir="ltr">Hi,<div><br></div><div>I'm new to slurm, so I apologize in advance if my question seems basic.</div><div><br></div><div>I just purchased a single node 'cluster' consisting of one 64-core cpu and an nvidia rtx5k gpu (Turing architecture, I think). The vendor supplied it with ubuntu 20.04 and slurm-wlm 19.05.5. Now I'm trying to adjust the config to suit the needs of my department.</div><div><br></div><div>I'm trying to bone up on GRES scheduling by reading <a href="https://slurm.schedmd.com/gres.html">this manual page</a>, but am confused about some things.</div><div><br></div><div>My slurm.conf file has the following lines put in it by the vendor:</div><div><br></div><div>###################</div># COMPUTE NODES<br>GresTypes=gpu<br>NodeName=shavak-DIT400TR-55L CPUs=64 SocketsPerBoard=2 CoresPerSocket=32 ThreadsPerCore=1 RealMemory=95311 Gres=gpu:1<br>#PartitionName=debug Nodes=ALL Default=YES MaxTime=INFINITE State=UP<br><br>PartitionName=CPU Nodes=ALL Default=Yes MaxTime=INFINITE  State=UP<br><br>PartitionName=GPU Nodes=ALL Default=NO MaxTime=INFINITE  State=UP<br><div>#####################</div><div><br></div><div>So they created two partitions that are essentially identical. Secondly, they put just the following line in gres.conf:</div><div><br></div><div>###################<br></div><div>NodeName=shavak-DIT400TR-55L      Name=gpu        File=/dev/nvidia0<br></div><div>###################<br></div><div><br></div><div>That's all. However, this configuration does not appear to constrain anyone in any manner. As a regular user, I can still use srun or sbatch to start GPU jobs from the "CPU partition," and nvidia-smi says that a simple <a href="https://cupy.dev/">cupy</a> script that multiplies matrices and starts as an sbatch job in the CPU partition can access the gpu just fine. Note that the environment variable "CUDA_VISIBLE_DEVICES" does not appear to be set in any job step. I tested this by starting an interactive srun shell in both CPU and GPU partition and running ''echo $CUDA_VISIBLE_DEVICES" and got bupkis for both.<br></div><div><br></div><div><br></div><div>What I need to do is constrain jobs to using chunks of GPU Cores/RAM so that multiple jobs can share the GPU. </div><div><br></div><div>As I understand from the gres manpage, simply adding "AutoDetect=nvml" (NVML should be installed with the NVIDIA HPC SDK, right? I installed it with apt-get...) in gres.conf should allow Slurm to detect the GPU's internal specifications automatically. Is that all, or do I need to config an mps GRES as well? Will that succeed in jailing out the GPU from jobs that don't mention any gres parameters (perhaps by setting CUDA_VISIBLE_DEVICES), or is there any additional config for that? Do I really need that extra "GPU" partition that the vendor put in for any of this, or is there a way to bind GRES resources to a particular partition in such a way that simply launching jobs in that partition will be enough?</div><div><br></div><div>Thanks for your attention.</div><div>Regards</div><div>AR</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div> </div><div><br></div><div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Analabha Roy<br></div><div>Assistant Professor</div><div><a href="http://www.buruniv.ac.in/academics/department/physics" target="_blank">Department of Physics</a></div><div><a href="http://www.buruniv.ac.in/" target="_blank">The University of Burdwan</a></div><div>Golapbag Campus, Barddhaman 713104</div><div>West Bengal, India</div><div>Emails: <a href="mailto:daneel@utexas.edu" target="_blank">daneel@utexas.edu</a>, <a href="mailto:aroy@phys.buruniv.ac.in" target="_blank">aroy@phys.buruniv.ac.in</a>, <a href="mailto:hariseldon99@gmail.com" target="_blank">hariseldon99@gmail.com</a><br><div><font face="tahoma, sans-serif">Webpage: <a href="http://www.ph.utexas.edu/~daneel/" target="_blank">http://www.ph.utexas.edu/~daneel/</a></font></div></div></div></div></div></div></div></div>