User guide

4Running MPI on QLogic Adapters
Open MPI
IB0054606-02 A 4-15
Open MPI directs UNIX standard output and error from remote nodes to the node
that invoked mpirun and prints it on the standard output/error of mpirun. Local
processes inherit the standard output/error of mpirun and transfer to it directly.
It is possible to redirect standard I/O for Open MPI applications by using the
typical shell redirection procedure on mpirun.
$ mpirun -np 2 my_app < my_input > my_output
Note that in this example only the MPI_COMM_WORLD rank 0 process will receive
the stream from my_input on stdin. The stdin on all the other nodes will be tied to
/dev/null. However, the stdout from all nodes will be collected into the
my_output file.
Environment for Node Programs
The following information can be found in the Open MPI man page and is
repeated here for easy of use.
Remote Execution
Open MPI requires that the PATH environment variable be set to find executables
on remote nodes (this is typically only necessary in rsh- or ssh-based
environments -- batch/scheduled environments typically copy the current
environment to the execution of remote jobs, so if the current environment has
PATH and/or LD_LIBRARY_PATH set properly, the remote nodes will also have it
set properly). If Open MPI was compiled with shared library support, it may also
be necessary to have the LD_LIBRARY_PATH environment variable set on
remote nodes as well (especially to find the shared libraries required to run user
MPI applications).
It is not always desirable or possible to edit shell startup files to set PATH and/or
LD_LIBRARY_PATH. The --prefix option is provided for some simple
configurations where this is not possible.
The --prefix option takes a single argument: the base directory on the remote
node where Open MPI is installed. Open MPI will use this directory to set the
remote PATH and LD_LIBRARY_PATH before executing any Open MPI or user
applications. This allows running Open MPI jobs without having pre-configured
the PATH and LD_LIBRARY_PATH on the remote nodes.
NOTE
The node that invoked mpirun need not be the same as the node where the
MPI_COMM_WORLD rank 0 process resides. Open MPI handles the
redirection of mpirun's standard input to the rank 0 process.