<div dir="ltr"><div>Hi all,</div><div><br></div><div>If you could offer a little bit more details on your OS and Slurm version that might shed some light.</div><div><br></div><div><div>There is an interesting detail about the NVML package if you are using RHEL-like OS.</div></div><div>The NVML detection part of the slurm library (/usr/lib64/slurm/gpu_nvml.so) is linked against the /lib64/libnvidia-ml.so.1 to do the actual detection.<br></div><div>If you do a simple nvidia driver installation that pulls in nvidia-driver-NVML from cuda-rhel8-x86_64 repository,</div><div>this package would install /lib64/libnvidia-ml.so.1 as a symlink to /lib64/libnvidia-ml.so.<your driver version>.</div><div>In this setup, as the linked library is present, the code would not crash.</div><div><br></div><div>However, interestingly the package mentioned above missed another symlink: the /lib64/libnvidia-ml.so to /lib64/libnvidia-ml.so.<your driver version>.</div><div>Take a look at the following line of the Slurm source code (I just used the master branch but git blame says it comes a long way):</div><div><br></div><div>"""<br></div><div>if (!dlopen("libnvidia-ml.so", RTLD_NOW | RTLD_GLOBAL))</div><div>"""</div><div></div><div>Link to source code: <a href="https://github.com/SchedMD/slurm/blob/master/src/interfaces/gpu.c#L100">https://github.com/SchedMD/slurm/blob/master/src/interfaces/gpu.c#L100</a></div><div><br></div><div>So even though the nvidia-driver-NVML is installed, and the system was able to find the linked library as it was linked against libnvidia-ml.so.1,</div><div>as the libnvidia-ml.so link is not provided there, the dlopen fails for the file not found, thus the error message you posted follows.</div><div><br></div><div>In our case, I just manually created the missing symlink by ln -s /lib64/libnvidia-ml.so.1 /lib64/libnvidia-ml.so, and the NVML worked as expected.</div><div><br></div><div>I kind of wonder if such an issue arose from the packaging issue on the NVIDIA side, or if it should be filed as a bug of SLURM code only checking</div><div>for the so library without any versioning suffix.<br></div><div><br></div><div>Your case might be different, but I think as the error message is a direct result of slurm unable to find /lib64/libnvidia-ml.so, you should take</div><div>a look at your setup to see if such so file is installed or not - if not, install the package, otherwise create the missing symlink.</div><div><br></div><div>Sincerely,</div><div>S. Zhang<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">2023年11月30日(木) 23:23 Ravi Konila <<a href="mailto:ravibhatk@gmail.com">ravibhatk@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div style="font-size:12pt;font-family:"Calibri";color:rgb(0,0,0)">
<div>Hello,</div>
<div> </div>
<div>My gres.conf has AutoDetect=nvml</div>
<div>when I restart slurmd service I do get </div>
<div> </div>
<div><span><b><span><font color="#e06666" face="Courier New">fatal: We were configured to autodetect nvml functionality, 
but we weren't able to find that lib when Slurm was 
configured.</font></span></b></span></div>
<div><span><b><span><font color="#e06666" face="Courier New"></font></span></b></span> </div>
<div>Referred few links to solve along with slurm-users email archives but could 
not understand much. </div>
<div> </div>
<div>Can someone help me with this one. I am using DGX A100 Server which has 4 
numbers of A100 80GB GPUs. </div>
<div> </div>
<div style="font-size:12pt;font-family:"Calibri";color:rgb(0,0,0)">With Warm 
Regards<br>Ravi Konila<br>
<div style="font-size:small;text-decoration:none;font-family:"Calibri";font-weight:normal;color:rgb(0,0,0);font-style:normal;display:inline"></div></div></div></div></div>
</blockquote></div>