Home

SLURMNODELIST

SLURMNODELIST is a term used to denote the list of compute nodes allocated to a Slurm job or job step. In Slurm environments, this information is exposed to the running job via the SLURM_NODELIST environment variable, which contains a compact representation of the allocated nodes.

Format and representation: The SLURM_NODELIST value uses Slurm’s hostlist syntax, combining individual node names and numeric

Usage: The node list can be read by scripts to tailor behavior to the allocation. Printing the

Notes: SLURMNODELIST is not an official separate variable in Slurm’s documentation; the canonical variable is SLURM_NODELIST.

See also: SLURM_NODELIST, environment variables in Slurm, scontrol show hostnames.

ranges.
Examples
include
node01,node02,node[03-05],
or
cluster[01-10].
Depending
on
the
cluster
configuration,
hostnames
may
be
shown
as
fully
qualified
names
or
with
shorter
forms.
value
with
echo
"$SLURM_NODELIST"
shows
the
allocation
in
its
compact
form.
To
obtain
a
flat
list
of
hostnames,
commands
such
as
scontrol
show
hostnames
"$SLURM_NODELIST"
are
used.
This
expanded
list
can
be
iterated
over
to
perform
per-node
actions
or
to
distribute
work
explicitly.
The
concatenated
form
without
the
underscore
appears
in
some
documents
or
scripts
as
a
shorthand
referring
to
the
same
allocation
information.
The
variable
is
available
within
job
environments,
including
batch
scripts
and
interactive
steps
launched
by
srun,
and
reflects
the
current
allocation
for
the
running
task.