Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Line

Mandatory

Meaning

Code Block
#SBATCH -t TIMELIMIT

YES

specify the time limit of your job. Acceptable time formats for TIMELIMIT include "minutes", "minutes:seconds", "hours:minutes:seconds", "days-hours", "days-hours:minutes" and "days-hours:minutes:seconds".

Code Block
#SBATCH -N NODES

no, default is 1

use at least the number of NODES for the job

Code Block
#SBATCH -n NTASKS

no, default is 1

run NTASKS tasks in your job. A task is usually an MPI rank.

Code Block
#SBATCH --mem-per-cpu MEM

no, default is memory-per-node/number-of-cores

memory per allocated cpu core, e.g. 1000M or 2G for 1000 MB or 2 GB respectively.

Code Block
#SBATCH -J NAME

no, default is the file name of the job script

specify the NAME of the compute job

Code Block
#SBATCH -p PARTITION

no, default is the normal partition

Submit jobs to the PARTITION partition. For a description of partition see Node Types and Partitions and QOS

Code Block
#SBATCH -A PROJECT

not if you are only member of one compute-time project

specify the compute-time project PROJECT to use with this job

Code Block
#SBATCH -q QOS

no, default is the default QoS of your project

Use the QoS QOS. For a description of QoS see Node Types and Partitions and QOS

Code Block
#SBATCH --mail-type MAILTYPE

no, default value is NONE

specify at which event you want a mail notification. MAILTYPEcan be NONE, BEGIN, END, FAIL, REQUEUE, ALL.

Code Block
#SBATCH --mail-user MAILADDRESS

no

specify your mail that should receive the mail notifications

...

The main tool to monitor the state of your jobs is squeue. It will give you a list of your current pending and running jobs. We recommend squeue_pretty which is a wrapper around squeue and gives you more information that is also formatted in a nicer way. You can also use the command-line tool spredict to get an estimate of the starting time of your pending jobs. Note that this is just an estimate an can change rapidly if other people submit jobs with a higher priority than yours or runnign jobs finish early or are canceled. If no estimate is shown this means that SLURM hasn’t estimated the start time of your job yet. If not time is shown even several minutes after the job submission then your job is simply not in the limited time window that SLURM uses.

Stopping Batch Jobs

You can simply cancel jobs with the command scancel, i.e. by runnning scancel JOBID where JOBID is the id of the job you want to cancel. You can also cancel all your jobs with scancel -u USERNAME.

...