Replies: 8 comments
-
|
Hello @ncreddine As mentioned in the docs and the bug report, I noticed this incosistencies between SLURM and NVIDIA ordering. The case where I noticed this behaviour is when there is a mix of physical and MIG instances. But maybe there are more cases. Yes,
I did not have any response from SLURM folks on my bug report. As we are not paying customers, they did not care. So, I cannot really comment on the SLURM's behaviour. If you think |
Beta Was this translation helpful? Give feedback.
-
|
Hi @mahendrapaipuri, Ah, ok, sorry, I hadn't noticed at first that you already referenced it in the docs. For the whole story: I upgraded to SLURM 24.11 and was using Here are the details of my case. It's on a node with 4× H100 NVL, Order reported by Order assumed by SLURM (with
So the kernel assigns One question: can this binding change after a reboot (e.g. if the kernel probes the PCIe devices in a different order)? Also, since the mismatch is fully derivable at runtime, would it make sense for ceems to build this map automatically when |
Beta Was this translation helpful? Give feedback.
-
|
Hello @ncreddine Thanks for the detailed report. Appreciate your time and effort!!
I hope they dont change, but I cant be sure. I assume you might have multiple nodes with the same configuration! Did you check this numbering on different nodes? Do they have all the same mapping between device minors and PCI adresses? That would be a good test
There are too many different cases that can go wrong. For example, in the bug report that I linked above, the ordering of GPUs changed depending on the order they have been declared in Is it going to be a big issue to configure this on your infrastructure? |
Beta Was this translation helpful? Give feedback.
-
|
Hello @ncreddine Seems like we can use Could you check on your nodes where ordering between NVML and SLURM is different and check if Cheers! |
Beta Was this translation helpful? Give feedback.
-
|
Hi @mahendrapaipuri, Thank you for your reply. I tested both the
With one Index 0-3 just map to /dev/nvidia0-3, i.e. kernel-minor order, which on this box is still wrong: /dev/nvidia0 (minor 0) is bus 64:00.0 = NVML 1, /dev/nvidia1 (minor 1) is bus 02:00.0 = NVML 0, and so on. So you still need the same The PCI bus approach works better. Each minor's bus is in Two references for this: the CUDA guide says For the MIG test on the 4xH100 node I enabled MIG on GPU 0, made 4x And the full With Now all 7 show up, but the index space mixes two schemes: the full GPUs keep their kernel-minor indices ( Cheers! |
Beta Was this translation helpful? Give feedback.
-
|
Btw, DCGM handles the same mix fine. The three full GPUs come through on The MIG instances don't appear on So Cheers! |
Beta Was this translation helpful? Give feedback.
-
|
Hello @ncreddine Thanks a lot for all this effort!! Really appreciate your time!
This is fine! What we need is how SLURM orders the GPU and we dont really care which order it follows. If it is strictly following kernel ordering, we can always fetch the PCI bus ID of each device file and eventually build a map of indices. Actually NVIDIA drivers should probe the devices in PCI bus ID order and assign kernel minors in the same order. Not sure why they do this strange ordering on this box. Anyways, my takeaway here is SLURM only respects kernel minor ordering. Can you confirm this? A quick question: On this box where PCI bus IDs and kernel minors are not matching, what does
Not necessarily. Imagine a case where kernel minors and PCI bus IDs match but if someone has their Name=gpu Type=tesla File=/dev/nvidia0 COREs=0,1
Name=gpu Type=tesla File=/dev/nvidia2 COREs=2,3
Name=gpu Type=tesla File=/dev/nvidia1 COREs=4,5
Name=gpu Type=tesla File=/dev/nvidia3 COREs=6,7What happens in this case? Does
This is normal. If we do not declare the GRES count for the node definition, there is no reason for SLURM to use them. More over in the production, we do not use I will also do some tests on my side to see if there are any "realiable" ways to get SLURM ordering. Thanks again for your help!! |
Beta Was this translation helpful? Give feedback.
-
|
Hello @ncreddine I have made some tests and as I suspected, SLURM orders the GPUs based on the order declared in Name=gpu Type=a100 File=/dev/nvidia2
Name=gpu Type=a100 File=/dev/nvidia0
Name=gpu Type=a100 File=/dev/nvidia3
Name=gpu Type=a100 File=/dev/nvidia1In this case the ordering will be:
And more interesting thing is if I ask for two GPUs in a job and if SLURM allocates GPU 0 and 1, i.e., My bottom line is it is going to be very complicated to get SLURM ordering of GPUs at runtime unless we "reimplement" their logic in the exporter code. What we can do is to use an alternative technique to get GPU UUIDs of a job reliably. This can be "easily" done by executing the command What we can do is to implement this and put it behind a feature flag so that users can use it if they do not want to fiddle with GPU mapping or in some cases it might be even practical. What do you think? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello @mahendrapaipuri,
I have a question about the proper way to set up GPU mapping with ceems.
We're running ceems_exporter 0.12.3 on a heterogeneous SLURM cluster. We noticed
ceems_compute_unit_gpu_index_flagreporting wrong GPU UUIDs for some jobs, causing incorrect GPU usage % in the dashboard.On nodes where SLURM's gres.conf uses
AutoDetect=nvml, SLURM allocates GPUs in NVML/PCI order, andSLURM_STEP_GPUSalready contains NVML indices, so ceems maps correctly without anygpu-order-map. We verified this across our cluster.However, on nodes where gres.conf uses explicit
File=/dev/nvidiaNentries (withoutAutoDetect), SLURM gives kernel device indices inSLURM_STEP_GPUS. When kernel minor numbers differ from NVML indices (which happens on several of our multi-GPU nodes), the mapping breaks.The philosophy page states:
Based on this, I assumed the GPU order was guessed automatically and that
gpu-order-mapwas only involved when using MIG instances.Is the broken mapping with
File=expected behavior, and isgpu-order-mapthe intended solution for this case?Beta Was this translation helpful? Give feedback.
All reactions