{"slug": "slurm-doesn-t-see-your-gpus-the-gres-conf-autodetect-and-cgroup-checklist", "title": "Slurm doesn't see your GPUs: the gres.conf, AutoDetect, and cgroup checklist", "summary": "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.", "body_md": "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.\n\n```\nscontrol show node gpu-node-01 | grep -i gres\n```\n\nIf 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.\n\nTwo layers have to agree:\n\n`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.\nA manual `gres.conf` line looks like:\n\n```\nNodeName=gpu-node-01 Name=gpu Type=h100 File=/dev/nvidia[0-7]\n```\n\nTwo common mistakes here:\n\n`/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:\n\n```\nsystemctl restart slurmd\n```\n\nThen re-check `scontrol show node`. A node that was drained for the change needs `scontrol update NodeName=gpu-node-01 State=RESUME` afterwards.\n\nIf `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`.\n\nOn 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.\n\n```\nsrun --gres=gpu:1 --pty nvidia-smi -L\n```\n\nOne GPU listed, visible only inside the allocation, means detection, gres.conf, and cgroup are all correct.\n\nDisclosure: 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.", "url": "https://wpnews.pro/news/slurm-doesn-t-see-your-gpus-the-gres-conf-autodetect-and-cgroup-checklist", "canonical_source": "https://dev.to/altostratus_amihai_71d88f/slurm-doesnt-see-your-gpus-the-gresconf-autodetect-and-cgroup-checklist-5cll", "published_at": "2026-12-03 13:36:58+00:00", "updated_at": "2026-12-03 13:44:22.336314+00:00", "lang": "en", "topics": ["ai-infrastructure", "mlops"], "entities": ["Slurm", "Altostratus", "NVIDIA", "Kubernetes", "NVML"], "also_reported_by": [], "takeaway": "When Slurm jobs see zero GPUs despite nvidia-smi working on the node, check Gres in scontrol show node, ensure gres.conf uses AutoDetect=nvml with the gres/nvml plugin installed, list only numbered /dev/nvidia[0-7] devices as File= entries, and restart slurmd since scontrol reconfigure does not full", "recommendation": {"advice": "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.", "playbook": "production-ops", "playbook_url": "https://wpnews.pro/playbooks/production-ops"}, "alternates": {"html": "https://wpnews.pro/news/slurm-doesn-t-see-your-gpus-the-gres-conf-autodetect-and-cgroup-checklist", "markdown": "https://wpnews.pro/news/slurm-doesn-t-see-your-gpus-the-gres-conf-autodetect-and-cgroup-checklist.md", "text": "https://wpnews.pro/news/slurm-doesn-t-see-your-gpus-the-gres-conf-autodetect-and-cgroup-checklist.txt", "jsonld": "https://wpnews.pro/news/slurm-doesn-t-see-your-gpus-the-gres-conf-autodetect-and-cgroup-checklist.jsonld"}}