MVAPICH2

What is MVAPICH2?

MVAPICH2 is an MPI library with lots of use across many different domains.

How is MVAPICH2 loaded?

The below can be used to view all of the installations of MVAPICH2 on a particular system, where this example uses Coeus.

$ module avail |& grep "^mvapich"

mvapich2-2.2/gcc-8.2.0

mvapich2-2.2/gcc-9.2.0

mvapich2-2.2-psm/gcc

mvapich2-2.2-psm/gcc-6.3.0

mvapich2-2.2-psm/gcc-7.2.0

mvapich2-2.2-psm/gcc-8.2.0

mvapich2-2.2-psm/gcc-9.2.0

mvapich2-2.2-psm/intel

Which version should be used?

The RC systems may contain many different versions of this software. The reason behind keeping all the old versions is because some applications cannot or do not update to the most recent version, so the modules are kept for legacy support. In general, it is best to use the most recent major release, unless some software requires a different version.

How is something ran with MVAPICH2?

It is recommended to use mpiexec to start an MPI program. The example on Coeus (below) will compile the program and then create four copies of the executable and run them all where they all can communicate using MPI.

$ module load mvapich2-2.2/gcc-9.2.0

$ mpicc -o my_example my_example.c

$ mpiexec -n 4 my_example

How are MVAPICH2 compilers invoked?

To compile MPI programs, the program must be compiled using MPI libraries and with the MPI compiler (for more, refer to here).