Q-Logic IB6054601-00 D Switch User Manual


 
3 – Using InfiniPath MPI
InfiniPath MPI Details
IB6054601-00 D 3-11
Q
program-name will generally be the pathname to the executable MPI program. If
the MPI program resides in the current directory and the current directory is not in
your search path, then
program-name must begin with ‘./’, such as:
./program-name
Unless you want to run only one instance of the program, you need to use the -np
option, as in:
$ mpirun -np n [other options] program-name
This spawns n instances of program-name. We usually call these instances node
programs.
Each node program is started as a process on one node. While it is certainly possible
for a node program to fork child processes, the children must not themselves call
MPI functions.
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 do this.
3.5.6
The mpihosts File
As noted in section 3.3 you have created an mpihosts file (also called a machines
file, node file, or hosts file) in your current working directory. This file names the
nodes on which the node programs may run. The
mpihosts file contains lines of
the form:
hostname[:p]
The optional part :p specifies the number of node programs that can be spawned
on that node. When not specified, the default value is 1. 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 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. Up to
process_count node