MVAPICH2 is an implementation of MPI (v2.x) for Infiniband.
WARNING: The only SLURM-compliant version of MVAPICH2 available on UB CCR is 2-2.0a. This corresponds to the following modules, which are built for specific combinations of compiler and infiniband hardware (note that modules designated as "IB" are for use with Mellanox IB cards):
Compiler "wrappers" around the compiler suite (mpif90, mpicc, mpicxx).
Show the software versions: module avail mvapich2
Loading the module will set the path and any necessary variables: module load mvapich2/version
An MVAPICH2 example that works in the SLURM environment is located here: /util/mvapich2/example
Compiling code for use with MVAPICH2 requires inclusion of the pmi library. The following sample code for compiling code that uses MVAPICH2 is written in bash:
module load mvapich2/gcc-4.4.6/2-2.0a-IB mpicc -c cpi.c mpicc -o cpi cpi.o -lpmi
MVAPICH2 is integrated with SLURM and MPI tasks should be launched using the srun command.
The following sample code for launching the tasks is written in bash:
srun -n$SLURM_NPROCS --mpi=none ./a.out