Command Line Options#
The below table lists some commonly used sbatch/srun options as well as their meaning. All the listed options can be used with the sbatch command (either on the command line or as directives within a script). Many are also commonly used with srun within a script or interactive job.
| Option (long form) |
Option (short form) |
Meaning | sbatch | srun |
|---|---|---|---|---|
--time |
-t |
maximum walltime | ||
--time-min |
(none) | minimum walltime | ||
--nodes |
-N |
number of nodes | ||
--ntasks |
-n |
number of MPI tasks | ||
--cpus-per-task |
-c |
number of processors per MPI task | ||
--gpus |
-G |
total number of GPUs | ||
--gpus-per-node |
(none) | number of GPUs per node | ||
--gpus-per-task |
(none) | number of GPUs per MPI task | ||
--constraint |
-C |
constraint (e.g., type of resource) | ||
--qos |
-q |
quality of service (QOS) | ||
--account |
-A |
project to charge for this job | ||
--job-name |
-J |
name of job |
Info
Long and short forms are interchangeable but differ in format. Long form uses double hyphens with an equals sign (e.g., --time=10:00:00), while short form uses a single hyphen with a space (e.g., -t 10:00:00). We recommend using long form in scripts for clarity and readability.