SBATCH Options

Overview

The following table presents various options for SBATCH. These can be used within job scripts or directly from the command line.

Common SBATCH Options

Flag Syntax

Description

Notes

--time=0-01:00:00

Requested walltime

--nodes=2

Number of nodes for job

Default=1

--job-name=myJob

Name of your job

Optional

--ntasks-per-node=2

Number of tasks to start on each node

Default=1

--mem=1gb

Memory requested or the job

--cpus-per-task=2

Number of cpu cores requested per task

Default=1

--mem-per-cpu=1gb

Memory to use per cpu core requested

For multi-cpu jobs

--account=someLab

Requests access to private account partition

Optional

--array=1-5

Used for job array tasks

Example: 5 array tasks numbered 1-5

--output=test.out

Specifies stdout file

Default is slurm.out

--partition=throughput

Requests specific SLURM node partition

Optional

--constraint=IB

Requests nodes with a particular feature

Optional

--mail-user=address

Specify the email address to send job status

Optional

--mail-type=ALL

Specify when to send job-related email

Must be used with --mail-user


CategoryHPC