MPICH
Check and see if you already have an MPI wrapper available on your machine. One simple way of doing so, is to perform a which
on several MPI wrapper binaries:
which mpicc mpicxx mpif90
If the above command returns with paths to their respected binaries, you will want to work with your system package manager to remove or suppress it.
warningwarning
Having two completely different MPI wrappers being made available simultaneously is prone to failure.
Download MPICH 4.0.2
curl -L -O http://www.mpich.org/static/downloads/4.0.2/mpich-4.0.2.tar.gz
tar -xf mpich-4.0.2.tar.gz -C .
Create an out-of-tree build location and configure MPICH using the recommended arguments:
mkdir mpich-4.0.2/clang-build
cd mpich-4.0.2/clang-build
../configure --prefix=/target/installation/path/mpich-4.0.2 \
--enable-shared \
--enable-sharedlibs=clang \
--enable-fast=O2 \
--enable-debuginfo \
--enable-totalview \
--enable-two-level-namespace \
CC=clang \
CXX=clang++ \
FC=gfortran \
F77=gfortran \
F90='' \
CFLAGS='' \
CXXFLAGS='' \
FFLAGS='-fallow-argument-mismatch' \
FCFLAGS='-fallow-argument-mismatch' \
F90FLAGS='' \
F77FLAGS=''
With configure
complete and error free, build and install MPICH:
make -j 6
make install
Follow the onscreen instructions on how to make use of your new MPI wrapper.