Product specifications

Table Of Contents
6–Using Other MPIs
Open MPI
6-4 IB6054601-00 H
S
To compile your program in C, type:
$ mpicc mpi_app_name.c -o mpi_app_name
Running Open MPI Applications
By default, Open MPI shipped with the InfiniPath software stack will run over PSM
once it is installed.
Here is an example of a simple mpirun command running with four processes:
$ mpirun -np 4 -machinefile mpihosts mpi_app_name
To specify the PSM transport explicitly, add --mca mtl psm to the above
command line.
To run over IB Verbs instead, use this mpirun command line:
$ mpirun -np 4 -machinefile mpihosts --mca btl sm --mca btl
openib,self --mca mtl ^psm mpi_app_name
The following command enables shared memory:
--mca btl sm
The following command enables openib transport and communication to self:
--mca btl openib, self
The following command disables PSM transport:
--mca mtl ^psm
In these commands, btl stands for byte transport layer and mtl for matching
transport layer.
PSM transport works in terms of MPI messages. OpenIB transport works in terms
of byte streams.
Alternatively, you can use Open MPI with a sockets transport running over IPoIB,
for example:
$ mpirun -np 4 -machinefile mpihosts --mca btl sm --mca btl
tcp,self --mca btl_tcp_if_exclude eth0 --mca btl_tcp_if_include
ib0 --mca mtl ^psm mpi_app_name
Note that eth0 and psm are excluded, while ib0 is included. These instructions
may need to be adjusted for your interface names.
Note that in Open MPI, machinefile is also known as the hostfile.
Further Information on Open MPI
For more information about Open MPI, see:
http://www.open-mpi.org/
http://www.open-mpi.org/faq