cd /news/ai-infrastructure/slurm-doesn-t-see-your-gpus-the-gres… · home › topics › ai-infrastructure › article
[ARTICLE · art-181023] src=dev.to ↗ pub= topic=ai-infrastructure verified=true sentiment=· neutral

Slurm doesn't see your GPUs: the gres.conf, AutoDetect, and cgroup checklist

A developer affiliated with Altostratus published a troubleshooting checklist for the common Slurm failure where jobs request GPUs but slurmd reports none, tracing it to mismatches between slurm.conf, gres.conf, the gres/nvml AutoDetect plugin, and cgroup device constraints. The guide recommends verifying Gres counts with scontrol show node, restarting slurmd rather than relying on scontrol reconfigure after gres.conf edits, and fixing File= entries instead of disabling ConstrainDevices, while warning that Slurm and the Kubernetes NVIDIA device plugin can double-book the same cards.

recommendation

After editing gres.conf or GPU lines in slurm.conf, restart slurmd on affected nodes and resume drained nodes, then confirm with srun --gres=gpu:1 --pty nvidia-smi -L.

more in playbook: Running AI in production
by read2 min views8 publishedDec 3, 2026

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.

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.

Two layers have to agree:

slurm.conf needs GresTypes=gpu and a node definition that advertises GPUs, for example NodeName=gpu-node-01 ... Gres=gpu:8, or the auto-detect path. gres.conf needs AutoDetect=nvml and slurmd must be built with NVML support. Auto-detect only works when the gres/nvml plugin is actually installed (check your plugin directory, often /usr/lib64/slurm/ or similar) and libnvidia-ml.so is 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:

/dev/nvidiactl, /dev/nvidia-uvm) as File= entries. Only the numbered GPU devices belong in 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.

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.

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.

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.

── more in #ai-infrastructure 4 stories · sorted by recency
── more on @slurm 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/slurm-doesn-t-see-yo…] indexed:0 read:2min 2026-12-03 · —