sbatch and srun, and the Kubernetes platform underneath handles reliability and scaling.
Each Slurm cluster has these components:
- Login node: The SSH-accessible entry point where you write jobs, submit them, and retrieve results.
- Slurm controller: Manages job queues and scheduling. It runs as Kubernetes pods.
- Compute nodes: The GPU workers that run your jobs, registered with both Kubernetes and Slurm.
Submit and manage jobs
Run these commands from the login node to submit, monitor, and cancel jobs:Distribute input files with job arrays
Use a Slurm job array to partition input files into chunks and distribute the chunks across nodes. For an example to adapt to your own processing, see arxiv-clean-slurm.sbatch, which processes RedPajama v1 data.Run a Jupyter notebook on a GPU node
Reserve a node through Slurm, start Jupyter there, then tunnel to it from your local machine:-
From the login node, start an interactive session on the target node:
-
Launch Jupyter from that session:
-
From your local machine, open an SSH tunnel to the node through the cluster’s jump host:
To get the exact hosts, including
<LOCATION>, copy the node’s SSH command from the cluster details page. On Slinky v1.0 clusters, the node’s host is<WORKER_HOSTNAME>.slurm-workers-slurm.slurminstead of<NODE_NAME>.slurm-compute.slurm. -
Open
http://localhost:8888in your browser and sign in with the token Jupyter printed in step 2.
Install Python packages that persist
Login node environments can be reset when the login pod restarts. Create a virtual environment on the shared filesystem instead of installing packages system-wide:Troubleshooting
When a job fails, check Slurm’s error output first. Inspect the job withscontrol show job <JOB_ID>, and view the scheduler logs with kubectl logs slurm-controller-0 -n slurm.
Jobs stuck in a pending state
The most common causes:- Insufficient resources: All GPUs are currently allocated. Check the queue and node availability with
squeueandsinfo. - Request exceeds limits: The job requests more resources than any node provides.
- Partition limits: The job targets a partition with limited capacity. You can adjust partitions in the Slurm configuration.
“Unable to contact slurm controller (connect failure)”
The Slurm controller is unreachable, usually because it’s restarting or there’s a network issue between nodes. Wait a few minutes and retry. Check the controller pod’s status withkubectl get pods -n slurm, and see the restart and log commands in the Slurm configuration guide. If the issue persists for more than 30 minutes, contact support with the cluster name, the exact error, and when it started.
”couldn’t chdir to home directory” errors
/home is a directory on the shared volume, which is mounted on every node, so this error usually means the shared volume mount is missing or unhealthy on that node.
Set the working directory explicitly in your job script with #SBATCH --chdir=<path>, and confirm the path exists on the node. If /home isn’t mounted where it should be, contact support. For how /home behaves on each cluster type, see Cluster storage.
Node drained with reason “Kill task failed”
sinfo -R shows a node drained with Kill task failed when a job step’s processes don’t exit within UnkillableStepTimeout after Slurm sends them SIGKILL. Slinky v1.0 clusters set that timeout to 600 seconds. Slurm drains the node so no new work lands there. Common causes:
- Unkillable processes, such as a process stuck in kernel I/O or in a hung GPU driver call.
- Container teardown failures.
GPUHealthcheckError or DCGMHealthcheckError, and resumes it once the check passes.
On Slinky v1.0 clusters, the same health check resumes a node drained with Kill task failed once the node is idle and its GPUs are healthy. To recover the node manually:
-
Confirm the reason and the affected jobs:
-
As a project admin, resume the node from the login node:
- Handle
SIGTERMpromptly in your training script. - Checkpoint periodically so exits are fast.
- Make sure all ranks of a distributed job exit when one rank is terminated.
Array jobs fail with “Invalid job array specification”
The array exceeds the cluster’sMaxArraySize limit. By default, the highest array index allowed is 1,000. To allow higher indexes, raise MaxArraySize in slurm.conf.
Jobs are killed before checkpointing finishes
Check theKillWait setting, which defaults to 30 seconds:
KillWait, raise KillWait in slurm.conf.
Next steps
Slurm configuration
Customize partitions, GPU resources, and scheduler settings.
Slurm startup scripts
Run lifecycle hook scripts at node startup, job start, and job completion.
Connect over SSH
Reach the login and compute nodes with OIDC or key-based SSH.
Quickstart
Create a Slurm cluster and run your first job.