Skip to content

SLURM Options

All options below are prefixed with #SBATCH. For example:

#SBATCH --partition=sixhour
#SBATCH --job-name=Jobname

This is a brief list of the most commonly used SLURM options. All options can be on the SLURM Documentaiton.

Option Abbreviation

Almost all options have a single letter abbreviation.

Option Function
-a, --array=<indexes> Submit a job array, multiple jobs to be executed with identical parameters
-c, --cpus-per-task=<ncpus> Advise the Slurm controller that ensuing job steps will require ncpus number of processors per task. Without this option, the controller will just try to allocate one processor per task.
-C, --constraint=<list> Request which features the job requires.
-d, --dependency=<dependency_list> Defer the start of this job until the specified dependencies have been satisfied completed.
-D, --chdir=<directory> Set the working directory of the batch script to directory before it is executed.
-e, --error=<filename pattern> Instruct Slurm to connect the batch script's standard error directly to the file name specified in the "filename pattern". By default both standard output and standard error are directed to the same file.
--export=<environment variables [ALL] | NONE> Identify which environment variables are propagated to the launched application, by default all are propagated. Multiple environment variable names should be comma separated.
--gres=<list> Specifies a comma delimited list of generic consumable resources. The format of each entry on the list is "name[:count]". Example: "--gres=gpu:2"
-J, --job-name=<jobname> Specify a name for the job allocation.
--mail-type=<type> Notify user by email when certain event types occur. Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL
--mail-user=<user> User to receive email notification of state changes as defined by --mail-type.
--mem=<size[units]> Specify the real memory required per node. Default units are megabytes. See Memory Limits
--mem-per-cpu=<size[units]> Minimum memory required per allocated CPU. Default units are megabytes. See Memory Limits
-n, --ntasks=<number> sbatch does not launch tasks, it requests an allocation of resources and submits a batch script. This option advises the Slurm controller that job steps run within the allocation will launch a maximum of number tasks and to provide for sufficient resources. The default is one task per node, but note that the --cpus-per-task option will change this default.
--ntasks-per-node=<ntasks> Request that ntasks be invoked on each node.
-N, --nodes=<minnodes[-maxnodes]> Request that a minimum of minnodes nodes be allocated to this job. A maximum node count may also be specified with maxnodes. If only one number is specified, this is used as both the minimum and maximum node count.
-o, --output=<filename pattern> Instruct Slurm to connect the batch script's standard output directly to the file name specified in the "filename pattern". By default both standard output and standard error are directed to the same file.
-p, --partition=<partition_names> Request a specific partition for the resource allocation. If the job can use more than one partition, specify their names in a comma separate list. Required.
-t, --time=<time> Set a limit on the total run time of the job allocation. Acceptable time formats include "minutes", "minutes:seconds", "hours:minutes:seconds", "days-hours", "days-hours:minutes" and "days-hours:minutes:seconds".

Default Options

If some options are not specified in the submission, default values will be set

  • Defaults:

    • --nodes=1
    • --cpus-per-task=1
    • --mem-per-cpu=2g
    • --time=8:00:00 (8 hours) for owner queues and the max is 60:00:00:00 (60 days).
    • --time=1:00:00 (1 hour) for the sixhour queue.