SLURM Reference Manual for HP XC System Software

SRUN Resource-Allocation Options
These SRUN options (used alone or in combination) assign compute resources to your parallel
SLURM-managed job. Each option has a one-character (UNIX) and a longer (Linux) alternative syntax.
See also SRUN's other options that can affect node management for your job, especially the control (page
24) options and constraint (page 36) options, in separate subsections below.
-n procs (lowercase, --nprocs=procs)
requests that SRUN execute procs processes. To control how these processes are
distributed among nodes and CPUs, combine -n with -c or -N as explained below
(default is one process per node).
-N n (uppercase, --nodes=n)
allocates at least n nodes to this job, where n may be either
(1) a specic node count (such as -N 16), or
(2) a hyphen-separated range from a minimum to a maximum node count (such as
-N 2-4).
If the nodes are partitioned, each partition's node limits supersede those specied by
-N (jobs that request more nodes than the partition allows never leave the PENDING
state). To change partitions, use SRUN's -p option (below). Combinations of -n and
-N control how job processes are distributed among nodes according to the SRUN
policies listed here:
-n/-N COMBINATIONS.
SRUN infers your intended number of processes per node if you specify both the
number of processes and the number of nodes for your job. Thus -n 16 -N 8 normally
results in running 2 processes/node (but see the next policy for exceptions).
MINIMUM INTERPRETATION.
SRUN interprets all node requests as minimum node requests (so -N 16 means "at
least 16 nodes"). If some nodes lack enough CPUs to cover the process count specied
by -n, SRUN will automatically allocate more nodes (than mentioned with -N) to
meet the need (for example, if not all nodes have 2 working CPUs, then -n 32 -N 16
together will allocate more than 16 nodes so that all processes are supported). The
actual number of nodes assigned (not the number reqested) is stored in environment
variable SLURM_NNODES.
CPU OVERCOMMITMENT.
By default, SRUN never allocates more than one process per CPU. If you intend to
assign multiple processes per CPU, you must invoke SRUN's -O (uppercase oh) option
along with -n and -N (thus -n 16 -N 4 -O together allow 2 processes/CPU on the 4
allocated 2-CPU nodes).
INCONSISTENT ALLOCATION.
SRUN rejects as errors inconsistent -n/-N combinations. For example, -n 15 -N 16
requests the impossible assignment of 15 processes to 16 nodes.
SLURM Reference Manual - 22