Cisco GEM318P User Manual page 61

Host drivers for linux
Table of Contents

Advertisement

Chapter 7
MVAPICH MPI
Select the language and compiler of your choice from the selection of compiler wrappers available in
Step 3
Table
Table 7-2
Language
C
C++
Fortran 77
Fortran 90
Compile the examples as shown here:
Step 4
host1$ cd $HOME/mpi-examples
host1$ mpicc.i -o hello_c hello_c.c
host1$ mpiCC.i -o hello_cxx hello_cxx.cc
host1$ mpif77.i -o hello_f77 hello_f77.f
host1$ mpif90.i -o hello_f90 hello_f90.f90
Note
If the $HOME/mpi-examples directory is not shared across all hosts in the cluster, copy the executables
Step 5
to a directory that is shared across all hosts, such as to a directory on a network file system.
Step 6
Run the MPI program.
The following example shows how to run an MVAPICH MPI C program Hello World:
host1$ mpirun_rsh -np 2 -hostfile /tmp/hostfile $HOME/mpi-examples/hello_c
Hello, world, I am 0 of 2
Hello, world, I am 1 of 2
OL-12309-01
7-2.
Selecting Language and Compiler Wrappers
Compiler
GNU
mpicc
mpiCC
mpif77
not applicable
The example above uses the Intel compiler. Change the command names as listed in
if you are using the GNU or the PGI compiler.
Intel
PGI
mpicc.i
not applicable
mpiCC.i
not applicable
mpif77.i
mpif77.p
mpif90.i
mpif90.p
Cisco SFS InfiniBand Host Drivers User Guide for Linux
Compiling MPI Programs
Table 7-2
7-13

Advertisement

Table of Contents
loading

This manual is also suitable for:

St373307lcSfs infiniband

Table of Contents