You run srun --gres=gpu:1 nvidia-smi and get Requested node configuration is not available, or the job starts and sees zero GPUs. Meanwhile nvidia-smi on the node itself shows all 8 cards. The gap between "the OS sees the GPUs" and "Slurm sees the GPUs" is almost always one of the five things below, in this order.
1. Ask Slurm what it thinks the node has
scontrol show node gpu-node-01 | grep -i gres If you see Gres=gpu:0 or no Gres at all, slurmd never detected the devices. If you see Gres=gpu:8 but jobs still fail, skip to section 4.
2. gres.conf and AutoDetect
Two layers have to agree:
-
slurm.confneedsGresTypes=gpuand a node definition that advertises GPUs, for exampleNodeName=gpu-node-01 ... Gres=gpu:8, or the auto-detect path. - For auto-detection,
gres.confneedsAutoDetect=nvmland slurmd must be built with NVML support. Auto-detect only works when thegres/nvmlplugin is actually installed (check your plugin directory, often/usr/lib64/slurm/or similar) andlibnvidia-ml.sois reachable on the compute node.
A manual gres.conf line looks like:
NodeName=gpu-node-01 Name=gpu Type=h100 File=/dev/nvidia[0-7] Two common mistakes here:
- Listing control devices (
/dev/nvidiactl,/dev/nvidia-uvm) asFile=entries. Only the numbered GPU devices belong inFile=. - Editing
gres.confon the head node but not on the compute node.gres.confis read by slurmd, so it must exist on every compute node, and the contents must match the topology of that specific node.
3. Restart, not reconfigure
scontrol reconfigure does not fully re-read gres.conf. After changing gres.conf or GPU-related slurm.conf lines, restart slurmd on the affected compute nodes:
systemctl restart slurmd Then re-check scontrol show node. A node that was drained for the change needs scontrol update NodeName=gpu-node-01 State=RESUME afterwards.
4. cgroup confinement
If cgroup.conf has ConstrainDevices=yes (and it should on a shared cluster), the job's devices cgroup is built from the File= entries in gres.conf. Wrong or missing entries here produce a different symptom: the job is allocated a GPU but cannot open the device (cuInit fails, or nvidia-smi inside the job says "No devices were found"). Fix the File= entries rather than turning off ConstrainDevices.
5. Don't stack device managers
On nodes that also run Kubernetes with the NVIDIA device plugin, decide who owns the GPUs. Slurm's gres accounting and the k8s device plugin allocate independently and will happily double-book the same card. Run GPU workloads under one scheduler per node, or partition the cards statically.
Verify the fix
srun --gres=gpu:1 --pty nvidia-smi -L One GPU listed, visible only inside the allocation, means detection, gres.conf, and cgroup are all correct.
Disclosure: I am affiliated with Altostratus (altostratus.bot), an AI assistant for GPU and Kubernetes troubleshooting. The checklist above stands on its own and works without it. Treat any assistant, including that one, as a starting point and check your own logs. Questions about this checklist are welcome in the comments.


