MPICH

What is MPICH?

MPICH is a very popular and powerful MPI library. 

How is MPICH loaded?

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

$ module avail |& grep "^mpich"

mpich/gcc

mpich/gcc-6.3.0

mpich/gcc-7.2.0

mpich/gcc-8.2.0

mpich/gcc-9.2.0

mpich/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 MPICH?

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 mpich/gcc-9.2.0

$ mpicc -o my_example my_example.c

$ mpiexec -n 4 my_example

How are MPICH compilers invoked?

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