Installation of MVAPICH2 for Different Compilers

MVAPICH and MVAPICH2 is an implementation of MPI for computing systems and servers using InfiniBand, 10GigE/iWARP and RoCE & etc networking technologies.

Installation consists of downloading the tarball into an appropriate directory, extracting it, loading the enviroment variable modules, using of some previously established configuration files, runnig make and make install, and establishing the symbolic links. Note that MVAPICH and MVAPICH2 are entirely different products.


cd /usr/local/src/MVAPICH2
wget http://mvapich.cse.ohio-state.edu/download/mvapich2/mvapich2-1.5.tgz
tar xvf mvapich2-1.5.tgz
cd mvapich2-1.5
module load gcc
../config-mvapich-gcc
make
make install
make clean
../config-mvapich-intel
make
make install
make clean
../config-mvapich-pgi
make
make install
make clean
cd /usr/local/Modules/modulefiles/mvapich2
ln -s .base 1.5-gcc
ln -s .base 1.5-pgi
ln -s .base 1.5-intel

The .base file consists of the following:


#%Module1.0#####################################################################
##
## $name modulefile
##
set ver [lrange [split [ module-info name ] / ] 1 1 ]
set name [lrange [split [ module-info name ] / ] 0 0 ]
set loading [module-info mode load]
set subver [lrange [split $ver - ] 0 0 ]
set compiler [lrange [split $ver - ] 1 1 ]
proc ModulesHelp { } {
puts stderr "\tThis module sets the envinronment for $name v$ver"
}
module-whatis "Set environment variables to use $name version $ver"
if { $loading && ![ is-loaded $compiler ] } {
module load $compiler
}
prepend-path --delim " " CPPFLAGS -I/usr/local/$name/$subver-$compiler/include
prepend-path --delim " " LDFLAGS -L/usr/local/$name/$subver-$compiler/lib
prepend-path LD_LIBRARY_PATH /usr/local/$name/$subver-$compiler/lib
prepend-path MANPATH /usr/local/$name/$subver-$compiler/share/man
prepend-path PATH /usr/local/$name/$subver-$compiler/bin
setenv MPI_DIR /usr/local/$name/$subver-$compiler/
setenv MPI_HOME /usr/local/$name/$subver-$compiler/

The configuration files are as follows:

config-mvapich-gcc

#!/bin/bash
INST=$(basename $(pwd) | sed 's/mvapich-//')-gcc
SHARED_LIBS=yes F77=gfortran F90=gfortran CC=gcc CXX=g++ IBHOME=/usr ROMIO=yes PREFIX=/usr/local/mvapich/$INST ./make.mvapich.gen2

config-mvapich2-intel

#!/bin/bash
INST=$(basename $(pwd) | sed 's/mvapich2-//')
F77=ifort F90=ifort CC=icc CXX=icpc ./configure --prefix=/usr/local/mvapich2/$INST-intel --with-rdma=gen2 --enable-romio --enable-sharedlibs=gcc

config-mvapich2-pgi

#!/bin/bash
INST=$(basename $(pwd) | sed 's/mvapich2-//')
F77=pgf95 F90=pgf95 CC=pgcc CXX=pgcpp ./configure --prefix=/usr/local/mvapich2/$INST-pgi --with-rdma=gen2 --enable-romio --enable-sharedlibs=gcc