commands let you choose from among any of five I/O redirection alternatives (modes) that
are explained in the next section.
-o mode (--output=mode)
The -o option redirects standard output stdout for this job to mode , one of five alternative
ways to display, capture, or subdivide th e job’s I/O, explained i n the next section. By default,
srun collects stdout from all job tasks and line buffers it to the attached terminal.
-i mode (--input=mode)
The -i option redirects standard input stdin for this job from mode, one of five alternative
ways to display, capture, or subdivide th e job’s I/O, explained i n the next section. By default,
srun redirects stdin from the attached terminal to all job tasks.
-e mode (--error=mode)
The -e option redirects standard error stderr for this job to mode, one of five alternative
ways to display, capture, or subdivide th e job’s I/O, explained i n the next section. By default,
srun collects stderr from all job tasks and line buffers it to t he attached termin al, just
as with stdout. But you can request that srun h andle standard o utp ut and standard erro r
differently by i nvo king -e and -o with different redirection modes.
-l (--label)
The -l option prepends the rem ote task ID number to each line of standard output and standard
error. By default, srun line buffers this I/O to the terminal (or to specified files) without any
task labels. Options -l and -u are mutually exclusive.
-u (--unbuffered)
The -u option preven ts line bu ffering of standard output from remote tasks (buffering is the
srun default). Opt ions -l and -u are mutually exclusive.
6.4.6.2 I/O Redirection Alternatives
The srun I/O options -i (-input), -o (-output), and -e (-error), all take any of five
I/O redirection alternatives (modes) as arguments. These arguments are explained in this section.
all
The all argument 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. T his is
srun’s default behavior for handling I/O.
none
The none argument redirects stdout and stderr from all job tasks to /dev/null (receives
no I/O from any task) and sends no stdin to any task (closes stdin).
taskid
The taskid argument redirects to srun (and hence to the attached terminal) stdout and
stderr from the s in gle specified task whose relative ID is taskid, where the range for integer
taskid starts at 0 (th e first task) and runs through the total num ber of tasks in the curr e nt job
step. This choice also r edirects stdin from srun (the terminal) to this single specified task.
filename
The f ilen ame argument redirects stdout or stderr from all job tasks into a single file called
filename, or broadcasts stdin from that same file to all remote tasks, depending upon the
I/O command.
Using SLURM 6-9
Commentaires sur ces manuels