Versions Compared

Key

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

Job Directives

Any shell script can be submitted as a Slurm job with no modifications. In such a case, sensible default values will be applied to the job. However, you can configure the script to fit your needs through job directives. In Slurm, these are just special comments in your script, usually at the top just after the shebang line, with the form:

...

DirectiveDescriptionDefault

--account=<account>

-A <account>

Project account for resource accounting and billing purposes.default project account for the user

--job-name=<name>

-J <name>

A descriptive name of the jobScript name
--chdir=...Working directory of the job. The output and error files can be defined relative to this directorysubmitting directory

--output=<path>

-o <path>

Path to the file where standard output is redirected. Special placeholders for job id (%j) and the execution node (%N)slurm-%j.out

--error=...

-e <path>

Path to the file where standard error is redirected. Special placeholders for job id (%j) and the execution node (%N)output value

--qos=<qos>

-q <qos>

Quality of Service (or queue) where the job is to be submitted. Check the available queues for the platform.nf or ef

--time=<time>

-t <time>

Wall clock limit of the job. Note that this is not cpu time limit

The format can be: m, m:s, h:m:s, d-h, d-h:m or d-h:m:s

qos default time limit
--mail-type=<type>Notify user by email when certain event types occur. Valid values are: BEGIN, END, FAIL, REQUEUE and ALLdisabled
--mail-user=<email>email address to send the emailsubmitting user

Directives for resource

...

allocation 


DirectiveDescriptionDefault

--ntasks=<tasks>

-n <tasks>

Allocate resources for the specified number of parallel tasks. Note that a job requesting more than one must be submitted to a parallel queue. There might not be any parallel queue configured on the cluster1

--nodes=<nodes>

-N <nodes>

Allocate <nodes> number of nodes to the job1

--cpus-per-task=<threads>

--c <threads>

Allocate <threads> number of cpus for every task. Use for threaded applications.1

--ntasks-per-node=<tasks>

Allocate a maximum of <tasks> tasks on every node.node capacity

--threads-per-core=<threads>

Allocate <threads> threads on every core (HyperThreading)core thread capacity

--hint=[no]multithread

Use or not hyperthreaded cores and define the binding accordingly.not defined

--mem-per-cpu=<mem>

Allocate <mem> memory for each taskon each node8 GB for serial and fractional jobs(*i, *f and *l QoS), 240 for parallel jobs (*p QoS)

--gres=ssdtmp:<size>G

Only on GPIL nodes (*f and *l QoS)

Allocate <size> GB of SSD temporary storage 

3 GBcore thread capacity


Tip

See man sbatch or https://slurm.schedmd.com/sbatch.html for the complete list of directives and their options.

...