User guide

4Running MPI on QLogic Adapters
Open MPI
4-14 IB0054606-02 A
This option spawns n instances of program-name. These instances are called
node programs.
Generally, mpirun tries to distribute the specified number of processes evenly
among the nodes listed in the hostfile. However, if the number of processes
exceeds the number of nodes listed in the hostfile, then some nodes will be
assigned more than one instance of the program.
Another command line option, -npernode, instructs mpirun to assign a fixed
number p of node programs (processes) to each node, as it distributes n
instances among the nodes:
$ mpirun -np n -npernode p -hostfile mpihosts program-name
This option overrides the slots=process_count specifications, if any, in the
lines of the mpihosts file. As a general rule, mpirun distributes the n node
programs among the nodes without exceeding, on any node, the maximum
number of instances specified by the slots=process_count option. The
value of the slots=process_count
option is specified by either the
-npernode command line option or in the mpihosts file.
Typically, the number of node programs should not be larger than the number of
processor cores, at least not for compute-bound programs.
This option specifies the number of processes to spawn. If this option is not set,
then environment variable MPI_NPROCS is checked. If MPI_NPROCS is not set,
the default is to determine the number of processes based on the number of hosts
in the hostfile or the list of hosts -H or --host.
-npernode processes-per-node
This option creates up to the specified number of processes per node.
Each node program is started as a process on one node. While a node program
may fork child processes, the children themselves must not call MPI functions.
There are many more mpirun options for scheduling where the processes get
assigned to nodes. See man mpirun for details.
mpirun monitors the parallel MPI job, terminating when all the node programs in
that job exit normally, or if any of them terminates abnormally.
Killing the mpirun program kills all the processes in the job. Use CTRL+C to kill
mpirun.
Console I/O in Open MPI Programs
Open MPI directs UNIX standard input to /dev/null on all processes except the
MPI_COMM_WORLD rank 0 process. The MPI_COMM_WORLD rank 0 process
inherits standard input from mpirun.