User Tools

Site Tools


cheat_sheet

This is an old revision of the document!


SLURM Cheat Sheet

Submit a job

sbatch [-p partition] [-c ncores] [--exclusive] scriptname

“–exclusive” requests a whole node. Use it only when you need to. “-c” specifies how many cores your job will use. (Use only one of “-c” and “–exclusive”.) “scriptname” must be the name of a shell script (but see the “–wrap” option.)

Check the queue

squeue -u USERNAME
squeue -w NODENAME

Check node status

sinfo
use_by_user

“use_by_user” is a script that runs “scontrol” to get the information it reports.

Kill jobs

scancel JOBID

Not “skill” - which does exist, but isn't part of SLURM.

Report Job Details

scontrol show job JOBID

Get Information about a Node

To get information about a node including how many cores and how much memory it has:

scontrol show node node62

Interactive Jobs

srun [-p partition] [-c ncores] [--exclusive] program
srun --pty bash -i

The second command above will get you a command line on a node. You can use the “-w” option to target a specific node. (Note that you will only get the command line if there is a free core on the node in question.) You could use this to check on your job's status - e.g. amount of memory it is using, number of cores it is using. This can also be done more programmatically in your scripts, or using sstat (for memory use), but this command line technique can be useful sometimes.

Checking Disk Space

Check how much space is left on your home volume:

chris@node0:~$ cd
chris@node0:~$ pwd
/home3/chris
chris@node0:~$ df -H /home3
Filesystem                     Size  Used Avail Use% Mounted on
fs2:/srv/storage_2/node-home3  105T   91T   14T  88% /home3
chris@node0:~$ 

You should check this before you add a lot more data to your home directory. If you need more space than is available please talk to the system administrators.

See space remaining on all home volumes:

chris@node0:~$ df -H /home*
Filesystem                     Size  Used Avail Use% Mounted on
fs1:/srv/storage_1/node-home    40T   33T  7.5T  82% /home
fs2:/srv/storage_1/node-home   105T   96T  8.6T  92% /home2
fs2:/srv/storage_2/node-home3  105T   91T   14T  88% /home3
fs3:/srv/storage_1/node-home    81T   51T   30T  63% /home4
fs4:/srv/storage_0/node-home5  118T   39T   79T  33% /home5
fs4:/srv/storage_1/node-home6   98T     0   98T   0% /home6

To check how much disk space a directory is using:

chris@node0:~$ du -sh torch
3.6G    torch

(This can take a long time if there are many files in the directory.)

cheat_sheet.1597436326.txt.gz · Last modified: 2020/08/14 16:18 by root