Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: --constraint=idl for group=ecmwf

...

This table describes the most common options you can use in a Slurm job:

DirectiveDescriptionDefault
--job-name=...A descriptive name of the jobScript name
--output=...      Path to the file where standard output is redirected. Special placeholders for job id (%j) and the execution node (%N)slurm-%j.out
--error=...Path to the file where standard error is redirected. Special placeholders for job id (%j) and the execution node (%N)output value
--workdir=...Working directory of the job. The output and error files can be defined relative to this directorysubmitting directory
--qos=...Quality of Service (or queue) where the job is to be submittednormal
--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=...Notify user by email when certain event types occur. Valid values are: BEGIN, END, FAIL, REQUEUE and ALLdisabled
--mail-user=...email address to send the emailsubmitting user
--ntasks=..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


Info

You can also use these options as command line arguments to sbatch.

...

Tip

The --array option can also be used inside the job script as a job directive. For example:

Code Block
languagebash
#!/bin/bash
#SBATCH --job-name=my_job_array
#SBATCH --array=0-31

echo “Hello World! I am task $SLURM_ARRAY_TASK_ID of the job array”
sleep 30



Show If
groupecmwf

Job arrays or other multiple concurrent jobs using IDL

If you are running a job array or other multiple concurrent jobs on lxc that call IDL then it is good to constrain these to run on a small number of nodes to limit the number of IDL licences requested.  To do this add the --constraint=idl option to the scripts job directives:

Code Block
languagebash
#!/bin/bash
#SBATCH --job-name=my_idl_job_array
#SBATCH --array=0-31
#SBATCH --constraint=idl

echo “Hello World! I am task $SLURM_ARRAY_TASK_ID of the job array”
module load idl
idl << EOF
.run my_idl_program.pro
my_idl_program
EOF
sleep 30