Skip to content

Instantly share code, notes, and snippets.

@neuralvis
Last active March 21, 2021 20:53
Show Gist options
  • Save neuralvis/070e38e2d140e8471b01851560b940b5 to your computer and use it in GitHub Desktop.
Save neuralvis/070e38e2d140e8471b01851560b940b5 to your computer and use it in GitHub Desktop.
Useful Commands in SLURM

Description of nodes, cores and memory

sinfo -o "%n,%N,%o,%X,%Y,%Z,%c,%m"
sinfo -o "%10n %10N %10o %10X %10Y %10Z %10c %10m %25f %10G"

Exclude a specific node

sbatch --exclude=nid001421 

How to access a specific nid

salloc -N 4
srun --pty -n 1 --nodelist=nid001421 bash
salloc --exclusive --nodes=1 --time=30 --nodelist=nid000128
srun --pty -n 1 --nodelist=nid000128 bash

Accessing a GPU node from a partition

srun --pty -p <partition> -C V100 bash

To get a list of jobs I ran through slurm

sacct --allusers --starttime 2014-07-01 --format=User%10,JobID,Jobname%10,partition,state,time,start,end,elapsed,nnodes,ncpus,nodelist

To get a list of jobs running currently

squeue -o "%15j %7i %3t  %10u %12l %20S  %20e %85N"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment