Slurm Flags, Partitions, and QoS

Slurm Flags, Partitions, and QoS#

Slurm allows the use of flags to specify resources needed for a job. Below is a table describing some of the most common Slurm resource flags, followed by tables describing available partitions and Quality of Service (QoS) options.

Slurm Resource Flags#

Job scripts, the sbatch command, and the sinteractive command support many different resource requests in the form of flags. These flags are available to all forms of jobs. To review all possible flags for these commands, please visit the Slurm page on sbatch. Below, we have listed some useful flags to consider when running your job script.

Type

Description

Flag

Example

Allocation

Specify an allocation account

--account=<allocation_name>

--account=ucb###_asc1

Partition

Specify a partition (see table below)

--partition=<partition_name>

--partition=amilan

Sending email

Receive an email at the beginning or the end of a job

--mail-type=<type>

--mail-type=BEGIN,END

Email address

Email address to receive the email

--mail-user=<email_address>

--mail-user=ralphie@colorado.edu

Number of nodes

The number of nodes needed to run the job

--nodes=<#>

--nodes=1

Number of tasks

The total number of processes needed to run the job

--ntasks=<#>

--ntasks=4

Tasks per node

The number of processes you wish to assign to each node (only needed for multi-node jobs)

--ntasks-per-node=<#>

--ntasks-per-node=4

Total memory

The total memory (per node requested) required for the job.
Using --mem does not alter the number of cores allocated to the job, but you will be charged for the number of cores corresponding to the proportion of total memory requested.
Units of --mem can be specified with the suffixes: K,M,G,T (default M)

--mem=<#><unit (optional)>

--mem=25G

Quality of service

Specify a QoS (see table below)

--qos=<qos_name>

--qos=normal

Wall time

The max amount of time your job will run for

--time=<D-HH:MM:SS>

--time=03:00:00

Job Name

Name your job so you can identify it in the queue

--job-name=<job_name>

--job-name=Census-Data-Analysis

Job Array

Specify the range of values to use for the Job Array indexes. Learn more about job arrays here.

--array=<START>-<STOP>

--array=0-5
.

Partitions#

Nodes with the same hardware configuration are grouped into partitions. You will need to specify a partition using --partition in your job script in order for your job to run on the appropriate type of node. A list of partitions available on Alpine can be found on our Alpine Hardware page.

Quality of Service#

Quality of Service (QoS) is used to constrain or modify the characteristics that a job can have. This could come in the form of specifying a QoS to request for a longer run time or a high priority queue for condo owned nodes. For example, by selecting the long QoS, a user can place the job in a lower priority queue with a max wall time increased from 24 hours to 7 days. A list of QoS codes available on Alpine can be found on our Alpine Hardware page.