<div dir="ltr">So this is related to the gpu/nvml plugin in the source code tree.  That didn't get built because I didn't have the nvidia driver (really the library libnvidia-ml.so) installed when I built the code.  I see in config.log where it tries to find -lnvidia-ml and it skips building the gpu.nvml plugin if it doesn't find it.<div><br></div><div>So in order to use Autodetect=nvml in gres.conf you have to install the nvidia driver before building the source code.</div><div><br></div><div>I wish they would document some of these things.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 7, 2020 at 9:59 AM Stephan Roth <<a href="mailto:stephan.roth@ee.ethz.ch">stephan.roth@ee.ethz.ch</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">gpu_nvml.so links to libnvidia-ml.so:<br>
<br>
$ ldd lib/slurm/gpu_nvml.so<br>
        ...<br>
        libnvidia-ml.so.1 => /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1 <br>
(0x00007f2d2bac8000)<br>
        ...<br>
<br>
When you run configure you'll see something along these lines:<br>
<br>
<br>
On 07.02.20 17:03, <a href="mailto:dean.w.schulze@gmail.com" target="_blank">dean.w.schulze@gmail.com</a> wrote:<br>
> I just checked the .deb package that I build from source and there is nothing in it that has nv or cuda in its name.<br>
> <br>
> Are you sure that slurm distributes nvidia binaries?<br>
> <br>
> -----Original Message-----<br>
> From: slurm-users <<a href="mailto:slurm-users-bounces@lists.schedmd.com" target="_blank">slurm-users-bounces@lists.schedmd.com</a>> On Behalf Of Stephan Roth<br>
> Sent: Friday, February 7, 2020 2:23 AM<br>
> To: <a href="mailto:slurm-users@lists.schedmd.com" target="_blank">slurm-users@lists.schedmd.com</a><br>
> Subject: Re: [slurm-users] How to use Autodetect=nvml in gres.conf<br>
> <br>
> On 05.02.20 21:06, Dean Schulze wrote:<br>
>   > I need to dynamically configure gpus on my nodes.  The gres.conf doc<br>
>   > says to use<br>
>   ><br>
>   > Autodetect=nvml<br>
> <br>
> That's all you need in gres.conf provided you don't configure any<br>
> Gres=... entries for your nodes in your slurm.conf.<br>
> If you do, make sure the string matches what NVML discovers, i.e.<br>
> lowercase and underscores instead of spaces or dashes.<br>
> <br>
> The upside of configuring everything is you will be informed in case the<br>
> automatically detected GPUs in a node don't match what you configured.<br>
> <br>
>   > in gres.conf instead of adding configuration details to each gpu in<br>
>   > gres.conf.  The docs aren't really clear about this because they show an<br>
>   > example with the details for each gpu:<br>
>   ><br>
>   > AutoDetect=nvml<br>
>   > Name=gpu Type=gp100  File=/dev/nvidia0 Cores=0,1<br>
>   > Name=gpu Type=gp100  File=/dev/nvidia1 Cores=0,1<br>
>   > Name=gpu Type=p6000  File=/dev/nvidia2 Cores=2,3<br>
>   > Name=gpu Type=p6000  File=/dev/nvidia3 Cores=2,3<br>
>   > Name=mps Count=200  File=/dev/nvidia0<br>
>   > Name=mps Count=200  File=/dev/nvidia1<br>
>   > Name=mps Count=100  File=/dev/nvidia2<br>
>   > Name=mps Count=100  File=/dev/nvidia3<br>
>   > Name=bandwidth Type=lustre Count=4G<br>
>   ><br>
>   > First Question:  If I use Autodetect=nvml do I also need to specify<br>
>   > File= and Cores= for each gpu in gres.conf?  I'm hoping that with<br>
>   > Autodetect=nvml that all I need is the Name= and Type= for each gpu.<br>
>   > Otherwise it's not clear what the purpose of setting Autodetect=nvml<br>
>   > would be.<br>
>   ><br>
>   > Second Question:  I installed the CUDA tools from the binary<br>
>   > cuda_10.2.89_440.33.01_linux.run.  When I restart slurmd with<br>
>   > Autodetect=nvml in gres.conf I get this error:<br>
>   ><br>
>   > fatal: We were configured to autodetect nvml functionality, but we<br>
>   > weren't able to find that lib when Slurm was configured.<br>
>   ><br>
>   > Is there something else I need to configure to tell slurmd how to use<br>
> nvml?<br>
> <br>
> I guess the version of slurm you're using was linked against a version<br>
> of NVML which has been overwritten by your installation of Cuda 10.2<br>
> <br>
> If that's the case there are various ways to solve that problem, but<br>
> that depends on your reason to install Cuda 10.2.<br>
> <br>
> My recommendation is to use the Cuda version of your system matching<br>
> your system's slurm package and to install Cuda 10.2 in a non-default<br>
> location, provided you need to make it available on a cluster node.<br>
> <br>
> If people using your cluster ask for Cuda 10.2 they have the option of<br>
> using a virtual conda environment and install Cuda 10.2 there.<br>
> <br>
> <br>
> Cheers,<br>
> Stephan<br>
> <br>
> <br>
> <br>
<br>
<br>
-------------------------------------------------------------------<br>
Stephan Roth | <a href="http://ISG.EE" rel="noreferrer" target="_blank">ISG.EE</a> D-ITET ETH Zurich | <a href="http://www.isg.ee.ethz.ch" rel="noreferrer" target="_blank">http://www.isg.ee.ethz.ch</a><br>
+4144 632 30 59  |  ETF D 104  |  Sternwartstrasse 7  | 8092 Zurich<br>
-------------------------------------------------------------------<br>
GPG Fingerprint: E2B9 1B4F 4D35 F233 BE12  1BE9 B423 4018 FBC0 EA17<br>
<br>
</blockquote></div>