HP-MPI User's Guide (11th Edition)

Debugging and troubleshooting
Troubleshooting HP-MPI applications
Chapter 6210
External input and output
You can use stdin, stdout, and stderr in your applications to read and
write data. By default, HP-MPI does not perform any processing on
either stdin or stdout. The controlling tty determines stdio behavior in
this case.
This functionality is not provided when using -srun or -prun.
If your application depends on mpirun’s "-stdio=i" to broadcast input to
all ranks, and you are using SLURM’s srun on an XC system, then a
reasonable substitute is "--stdin=all". For example:
% mpirun -srun --stdin-all ...
See --label option of srun in Appendix C for similar functionality.
HP-MPI does provide optional stdio processing features. stdin can be
targeted to a particular process, or can be broadcast to every process.
stdout processing includes buffer control, prepending MPI rank
numbers, and combining repeated output.
HP-MPI standard IO options can be set by using the following options to
mpirun:
mpirun -stdio=[bline[#] | bnone[#] | b[#], [p], [r[#]],
[i[#]]
where
i Broadcasts standard input to all MPI processes.
i [#] Directs standard input to the process with global rank
#.
The following modes are available for buffering:
b [#>0] Specifies that the output of a single MPI process is
placed to the standard out of mpirun after # bytes of
output have been accumulated.
bnone [#>0] The same as b[#] except that the buffer is flushed both
when it is full and when it is found to contain any data.
Essentially provides no buffering from the user’s
perspective.
bline [#>0] Displays the output of a process after a line feed is
encountered, or the # byte buffer is full.
The default value of # in all cases is 10k bytes