Show Menu
Cheatography

slurm Cheat Sheet (DRAFT) by

Commands for interacting with slurm

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Nodes

--excl­usive
Your allocated compute nodes are NOT shared with anyone else.
-N
/
--nodes
Number of compute nodes needed
--mem
Specify the memory required per node.
--gpus­-pe­r-node
Specify the number of GPUs per node
-x
/
--exclude
Prevent the job from being scheduled on the specified nodes.

GPU

--gres­=gp­u:[­typ­e]:­[count]
GPUs per node
--gpus­-pe­r-n­ode­=[t­ype­]:[­count]
Modern altern­ative to
gres
--gpus­-pe­r-t­ask­=<c­oun­t>
GPUs per task
-G
/
--gpus­=<c­oun­t>
Specify total number of GPUs for the entire job

Claim Resources

salloc <fl­ags>
Request a intera­ctive session
sbatch <sc­rip­t-n­ame.sh>
Submit a non-in­ter­active job

squeue

--me
Limit info to only you
-u
/
--user­=<i­d>
Limit info to specific user
--state
Filter by state
PD
- Pending
R
- Running
-j
/
--jobs­=[j­ob-­id-­list]
Limit info to specific jobs
View inform­ation about jobs located in the Slurm scheduling queue
 

scancel

--me
Cancel jobs owned by current user
-A
/
--account
Cancel jobs under a specific charge account
-n
/
--name
Cancel jobs with a matching job name
-u
/
--user
Cancel all jobs owned by a specific user
t
/
--state
Cancel jobs in a specific state
Kill jobs

sacct

-j
/
--jobs­=[j­ob-­id-­list]
Check a specific job ID
-X
/
--allo­cations
Hide job steps and show only main job allocation
-u
/
--user
/
-uid
Check specified users. Defaults to running user
-o
/
--format
Specify fields. Comma sep, no spaces.
JobID

JobName

State

Elapsed
(HH:MM:SS)