Software stackRunning track
Slurm
Read it in Chapter 2 · checkpoint +50 XP →
The batch scheduler that runs most HPC and many AI clusters: partitions, jobs, allocations and node states.
Slurm turns a pile of servers into a shared machine. Key concepts:
- Partitions: named groups of nodes with limits (
sinfolists them). - Jobs are submitted with
sbatch script.sh.#SBATCHlines in the script request resources:--nodes,--gpus-per-node,--time,--partition. - Allocation: the scheduler picks nodes (backfill, priority, Fair-share scheduling) and runs the script on the first one.
srunlaunches tasks across the rest. - Node states:
idle,alloc,drain(finish current work, take no new work) anddown.
Daily operator commands
squeue --me # what's running / pending and why sacct # history with exit codes scontrol show job <id> # everything about a job scontrol update NodeName=node-3 State=DRAIN Reason="gpu5 fan" sinfo -R # why nodes are drained scontrol requeue <id> # restart a job (from its checkpoint)
Draining with a clear reason is the polite way to say "this hardware is suspect" without killing anyone's job.
Use it in a mission
Running
Two Nodes, One Job
Your first multi-node training job won't even submit. Fix the batch script.
Monitoring
Fallen Off the Bus
A training job died overnight. Find the bad GPU, quarantine the node and get the run going again.
Related
Sources & further reading
Written for LazyLab in our own words; sources are cited for depth and verification.