27.12.2014 Views

QLogic OFED+ Host Software User Guide, Rev. B

QLogic OFED+ Host Software User Guide, Rev. B

QLogic OFED+ Host Software User Guide, Rev. B

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5–Using Other MPIs<br />

Open MPI<br />

Table 5-2. Open MPI Wrapper Scripts<br />

Wrapper Script Name<br />

Language<br />

mpif90 Fortran 90<br />

To compile your program in C, type:<br />

$ mpicc mpi_app_name.c -o mpi_app_name<br />

Running Open MPI Applications<br />

By default, Open MPI shipped with the InfiniPath software stack will run over PSM<br />

once it is installed.<br />

Here is an example of a simple mpirun command running with four processes:<br />

$ mpirun -np 4 -machinefile mpihosts mpi_app_name<br />

To specify the PSM transport explicitly, add --mca mtl psm to the above<br />

command line.<br />

To run over InfiniBand Verbs instead, use this mpirun command line:<br />

$ mpirun -np 4 -machinefile mpihosts --mca btl sm --mca btl<br />

openib,self --mca mtl ^psm mpi_app_name<br />

The following command enables shared memory:<br />

--mca btl sm<br />

The following command enables openib transport and communication to self:<br />

--mca btl openib, self<br />

The following command disables PSM transport:<br />

--mca mtl ^psm<br />

In these commands, btl stands for byte transport layer and mtl for matching<br />

transport layer.<br />

PSM transport works in terms of MPI messages. OpenIB transport works in terms<br />

of byte streams.<br />

Alternatively, you can use Open MPI with a sockets transport running over IPoIB,<br />

for example:<br />

$ mpirun -np 4 -machinefile mpihosts --mca btl sm --mca btl<br />

tcp,self --mca btl_tcp_if_exclude eth0 --mca btl_tcp_if_include<br />

ib0 --mca mtl ^psm mpi_app_name<br />

Note that eth0 and psm are excluded, while ib0 is included. These instructions<br />

may need to be adjusted for your interface names.<br />

Note that in Open MPI, machinefile is also known as the hostfile.<br />

5-4 D000046-005 B

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!