SLURM Reference Manual for HP XC System Software
Table Of Contents
- Preface
- Introduction
- SLURM Goals and Roles
- SLURM Features
- SLURM Operation
- SLURM Utilities
- SRUN (Submit Jobs)
- SQUEUE (List Jobs)
- SINFO (List Nodes)
- SMAP (Show Job Geometry)
- SCONTROL (Manage Configurations)
- Disclaimer
- Keyword Index
- Alphabetical List of Keywords
- Date and Revisions
SRUN Run-Mode Options
For a strategic comparison (with examples) of the five different ways to use SRUN, see "SRUN Roles
and Modes," above. (page 17) This section explains the mutually exclusive SRUN options that enable its
different run modes. Each option has a one-character (UNIX) and a longer (Linux) alternative syntax.
-b (--batch) runs a script (whose name appears at the end of the SRUN execute line, not as an
argument to -b) in batch mode. You cannot use -b with -A or -a.
RESULT.
SRUN copies the script, submits the request to run (with your specified resource
allocation) to the local SLURM-managed job queue, and ends. When resources become
available and no higher priority job is pending, SLURM runs the script on the first
node allocated to the job, with STDIN redirected from /dev/null and STDOUT and
STDERR redirected to a file called jobname.out in the current working directory
(unless you request a different name or a more elaborate set of output files by using
-J or -o). In other words, -b executes the script through a queue, unhooked from
terminal interaction, but not under LCRM control.
SCRIPT REQUIREMENTS.
(1) You must use the script's absolute pathname or a pathname relative to the current
working directory (SRUN ignores your search path).
(2) SRUN interprets the script using your default shell unless the file begins with the
character pair #! followed by the absolute pathname of a valid shell.
(3) The script must contain MPI commands or other (simple) SRUN commands to
initiate parallel tasks. On BlueGene/L only, the script must invoke MPIRUN rather
than simple SRUN to execute parallel tasks (this may affect script portability).
(4) Script lines prefixed with #SLURM insert SRUN options into the script (e.g.,
#SLURM --propagate); command line options override those within the script.
-A (uppercase, --allocate)
allocates compute resources (as specified by other SRUN options) and starts ("spawns")
a subshell that has access to those allocated resources. No remote tasks are started.
You cannot use -A with -b or -a. If you combine -A with the special-purpose option
--no-shell, then SRUN allocates the resources but exits instead of spawning a shell.
SCRIPTED USE.
If you specify a script at the end of SRUN's execute line (not as an argument to -A),
the spawned shell executes that script using the allocated resouces (interactively,
without a queue). See the -b option for script requirements.
UNSCRIPTED USE.
If you specify no script, you can then execute other instances of SRUN interactively,
within the spawned subshell, to run multiple parallel jobs on the resources that you
allocated to the subshell. The resources (nodes, etc.) will only be freed for other jobs
when you terminate the subshell.
SLURM Reference Manual - 20