Product specifications

Table Of Contents
5–Using QLogic MPI
QLogic MPI Details
5-14 IB6054601-00 H
S
mpihosts File Details
As noted in “Create the mpihosts File” on page 5-3, an mpihosts file (also called
a machines file, nodefile, or hostsfile) has been created in your current working
directory. This file names the nodes on which the node programs may run.
The two supported formats for the mpihosts file are:
hostname1
hostname2
...
or
hostname1:process_count
hostname2:process_count
...
In the first format, if the -np count (number of processes to spawn in the mpirun
command) is greater than the number of lines in the machine file, the hostnames
will be repeated (in order) as many times as necessary for the requested number
of node programs.
In the second format, process_count can be different for each host, and is
normally the number of available processors on the node. When not specified, the
default value is one. The value of process_count determines how many node
programs will be started on that host before using the next entry in the mpihosts
file. When the full mpihosts file is processed, and there are additional processes
requested, processing starts again at the start of the file.
There are several alternative ways of specifying the mpihosts file:
As noted in “Compile and Run an Example C Program” on page 5-3, 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.
When 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, the MPI job fails.
NOTE:
To create an mpihosts file, use the ibhosts program. It will generate a
list of available nodes that are already connected to the switch.