Q-Logic IB6054601-00 D Manual De Usuario
3 – Using InfiniPath MPI
InfiniPath MPI Details
InfiniPath MPI Details
3-12
IB6054601-00 D
Q
programs will be started on that host before using the next entry in the
mpihosts
file. If the full
mpihosts
file is processed, and there are still more processes
requested, processing starts again at the start of the file.
You have several alternative ways of specifying the
mpihosts
file.
1. First, as noted in
, you can use the command line option
-m
:
$
mpirun -np n -m mpihosts [other options] program-name
In this case, if the named file cannot be opened, the MPI job fails.
2. If the
-m
option is omitted,
mpirun
checks the environment variable
MPIHOSTS
for the name of the MPI hosts file. If this variable is defined and the file it names
cannot be opened, then the MPI job fails.
cannot be opened, then the MPI job fails.
3. In the absence of both the
-m
option and the
MPIHOSTS
environment variable,
mpirun
uses the file
./mpihosts
, if it exists.
4. If none of these three methods of specifying the hosts file are used,
mpirun
looks for the file
~/.mpihosts
.
If you are working in the context of a batch queuing system, it may provide you with
a job submission script that generates an appropriate
a job submission script that generates an appropriate
mpihosts
file.
3.5.7
Console I/O in MPI Programs
mpirun
sends any output printed to
stdout
or
stderr
by any node program to the
terminal. This output is line-buffered, so the lines output from the various node
programs will be non-deterministically interleaved on the terminal. Using the
programs will be non-deterministically interleaved on the terminal. Using the
-l
option to
mpirun
will label each line with the rank of the node program that produced
it.
Node programs do not normally use interactive input on
stdin
, and by default,
stdi
n is bound to /dev/null. However, for applications that require standard input
redirection, InfiniPath MPI supports two mechanisms to redirect stdin:
1. If
mpirun
is run from the same node as MPI rank 0, all input piped to the
mpirun
command will be redirected to rank 0.
2. If
mpirun
is not run from the same node as MPI rank 0 or if the input must be
redirected to all or specific MPI processes, the
-stdin
option can be used to
redirect a file as standard input to all nodes or to a particular node as specified
by the
by the
-stdin-target
option.
3.5.8
Environment for Node Programs
The environment variables existing on the front end node on which you run
mpirun
are not propagated to the other nodes. You can set the paths, such as