Installation of MPICH

Install MPICH

MPICH (known as MPICH2) is another a freely available, portable implementation of MPI, a standard for message-passing for distributed-memory applications used in parallel computing. This post is going to show how to install MPICH library on Linux machine step-by-step. It is useful for inexperienced user.

Download

Go to the official website: http://www.mpich.org/downloads/

  • The tarball: compile MPICH yourself
Release                       Platform         Download    Size
mpich-3.3 (stable release)    MPICH            [http]      26 MB 
hydra-3.3 (stable release)    Hydra (mpiexec)  [http]      4 MB
mpich-3.2.1 (stable release)  MPICH            [http]      11 MB 
hydra-3.2.1 (stable release)  Hydra (mpiexec)  [http]      3 MB
    • Use curl to download the tarball of the stable version of MPICH
    • curl -O http://www.mpich.org/static/downloads/3.3/mpich-3.3.tar.gz
  • Instant package: ready-to-install package file

Installation of MPICH on Local Space

1. Uncompress the tarball. The size of MPICH folder after unzipped is around 155 - 160 MB

tar -xzvf mpich-3.3.tar.gz

2. Change directory

cd mpich-3.3

3. Set up configuration

./configure --prefix=/where/you/want/to/install/binary/

for example

./configure --prefix=/home/rangsiman/mpich-3.3-local

4. Make and install (compile binary file

make && make install

5. If the MPICH was build successfully, the binary file mpiexec should be available at directory where you set --prefix argument.

ls /home/rangsiman/mpich-3.3-local/bin

Output

hydra_nameserver  hydra_pmi_proxy  mpicc         mpicxx   mpiexec.hydra  mpif90   mpirun   parkill
hydra_persist     mpic++           mpichversion  mpiexec  mpif77         mpifort  mpivars

6. Check version of mpiexec

mpiexec --version

Output

HYDRA build details:
    Version:                                 3.3
    Release Date:                            Wed Nov 21 11:32:40 CST 2018
    CC:                              gcc
    CXX:                             g++
    F77:                             gfortran
    F90:                             gfortran
    Configure options:                       '--disable-option-checking' '--prefix=/home/jsyu/usr/local/mpich-3.3' '--cache-file=/dev/null' '--srcdir=.' 'CC=gcc' 'CFLAGS= -O2' 'LDFLAGS=' 'LIBS=' 'CPPFLAGS= -I/home/jsyu/mpich-3.3/src/mpl/include -I/home/jsyu/mpich-3.3/src/mpl/include -I/home/jsyu/mpich-3.3/src/openpa/src -I/home/jsyu/mpich-3.3/src/openpa/src -D_REENTRANT -I/home/jsyu/mpich-3.3/src/mpi/romio/include' 'MPLLIBNAME=mpl'
    Process Manager:                         pmi
    Launchers available:                     ssh rsh fork slurm ll lsf sge manual persist
    Topology libraries available:            hwloc
    Resource management kernels available:   user slurm ll lsf sge pbs cobalt
    Checkpointing libraries available:
    Demux engines available:                 poll select

7. If no any error, MPICH was build successfully.

Optional: Install Hydra (mpiexec)

The install step is the same as MPICH.

tar -xzvf hydra-3.3.tar.gz
cd hydra-3.3
./configure --prefix=/home/rangsiman/hydra-3.3-local
make
make install
cd /home/rangsiman/hydra-3.3-local
cd bin
./mpiexec --version

Output

HYDRA build details:
    Version:                                 3.3
    Release Date:                            Wed Nov 21 11:32:40 CST 2018
    CC:                              gcc
    CXX:
    F77:
    F90:
    Configure options:                       '--prefix=/home/jsyu/usr/local/hydra-3.3'
    Process Manager:                         pmi
    Launchers available:                     ssh rsh fork slurm ll lsf sge manual persist
    Topology libraries available:            hwloc
    Resource management kernels available:   user slurm ll lsf sge pbs cobalt
    Checkpointing libraries available:
    Demux engines available:                 poll select

Rangsiman Ketkaew