SLURM Reference Manual
I/O Redirection Alternatives
SRUN I/O options
-i (--input), -o (--output), and -e (--error) all take as arguments
any of five I/O redirection alternatives ("modes") summarized in
this table and explained in more detail below it:
To or From
||one selected task
||one specified file
||many separate tasks:
||many separate files:
||all with jobid.stepid
||1 file per jobid.stepid
||all with jobid
||1 file per jobid
||all with stepid
||1 file per stepid
||all on hostname
||1 file per node
||all on node n
||1 file per node
||each separate task
||1 file per task
The I/O redirection alternatives compared in the table work in detail
redirects STDOUT and STDERR from all job tasks to SRUN (and hence to
the attached terminal), and broadcasts STDIN from SRUN (the terminal)
to all remote tasks
(this is SRUN's default behavior for handling I/O).
redirects STDOUT and STDERR from all job tasks to /dev/null
(i.e., SRUN receives no I/O from any task), and sends no STDIN to
any task (closes STDIN).
redirects to SRUN (and hence to the attached terminal) STDOUT and STDERR
from the single specified task whose relative ID is
the range for integer taskid
starts at 0 (the first task) and runs through the total number of tasks
in the current job step.
This choice also redirects STDIN from SRUN (the terminal) to this single
redirects STDOUT and STDERR from all job tasks into a single file
and broadcasts STDIN from that same file to all remote tasks.
To subdivide the I/O among separate files, use the
fstring alternative below.
fstring ["format string"]
uses 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
fstring (and thereby to split the I/O
among separate files) include:
(uppercase) creates one file for each jobID/stepID
combination for this running job, and imbeds
jobid.stepid in each file's
name (for example,
out%J might yield files out4812.0, out4812.1, etc.).
(lowercase) creates one file for each jobID and
imbeds jobid in its name
(for example, job%j might yield file job4812).
(lowercase) creates one file for each stepID and
imbeds stepid in its name
(for example, step%s.out would yield files step0.out, step1.out, etc.).
SRUN does not support job steps on BlueGene/L.
(uppercase) creates one file for each node on which
this job runs and imbeds that node's short hostname in the file name
(for example, node.%N might yield files node.mcr347,
(lowercase) creates one file for each node on which this job runs
and imbeds that node's numerical identifier relative to the job
(where the each job's first node is 0, then 1, etc.) in the file name
(for example, node%n would yield files node0, node1, etc.).
(lowercase) creates one file for each separate task in this running job
and imbeds 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, etc.).
For all fstring 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,
Navigation Links: [
Document List ] [
HPC Home ]