7 srun constraint options – HP XC System 2.x Software User Manual

Page 80

Advertising
background image

You can use a parameterized "format string" to systematically generate unique names for
(usually) multiple I/O files, each of which receives some job I/O depending on the naming
scheme that you choose. You can subdivide the received I/O into separate files by job ID,
step ID, node (name or sequence number), or individual task. In each case,

srun

opens the

appropriate number of files and associates each with the appropriate subset of tasks.

Available parameters with which to construct the format string, and thereby to split the I/O
among separate files, include the following:

%J

(uppercase) Creates one file for each job ID/step ID combination for this running
job, and embeds

jobid.stepid

in each file’s name (for example,

out%J

might yield files

out4812.0

,

out4812.1

, and so on).

%j

Creates one file for each job ID, and embeds jobid in its name (for example,

job%j

might yield file

job4812

).

%s

Creates one file for each step ID, and embeds

stepid

in its name (for example,

step%s.out

would yield files

step0.out

,

step1.out

, and so on).

%N

Creates one file for each node on which this job runs, and embeds that node’s
short hostname in the file name (for example,

node.%N

might yield files

node.mcr347

,

node.mcr348

, and so on).

%n

Creates one file for each node on which this job runs, and embeds that node’s
numerical identifier relative to the job (where the each job’s first node is 0, then
1, and so on) in the file name (for example,

node%n

would yield files

node0

,

node1

, and so on).

%t

Creates one file for each separate task in this running job, and embeds that
task’s numerical identifier relative to the job (the first task is 0) in the file
name (for example,

job%j-%t.out

might yield files

job4812-0.out

,

job4812-1.out

, and so on).

For all format string parameters except the nonnumeric case of

%N

, you can insert an integer

between the percent character and the letter (such as

%3t

) to "zero-pad" the resulting file names,

that is, to always use the integer number of character positions and to fill any empty positions
with zeros from the left. Thus

job%j-%3t.out

might yield files

job4812-000.out

and

job4812-001.out

.

6.4.7

srun

Constraint Options

The

srun

constraint options limit the nodes on which your job will execute to only those nodes

having the properties (constraints) that you specify. The following constraints are available:

-C clist

(

--constraint=clist

)

The

-C

option runs your job on those nodes having the properties in clist, where clist is a list of

features assigned for this purpose by SLURM system administrators (the features may vary
by network or machine).

To conjoin (AND) multiple constraints, separate them in clist by using a comma (

c1,c2

).

To disjoin (OR) multiple constraints, separate them in clist by using a vertical bar (

c3|c4

).

If no nodes have the feature(s) that you require with

-C

, then the SLURM job manager will

reject your job.

6-10

Using SLURM

Advertising