MPI configuration¶
MPI (Message Passing Interface) is a standard for parallel programming. It is used to write programs that run on multiple processors and communicate between them. MPI is a library that provides functions to create, manage, and communicate between processes. It is widely used in scientific computing and is the standard for parallel programming in HPC.
The DEC cluster has two MPI implementations available: OpenMPI and MPICH. Both are widely used and have similar functionalities. There are some differences in the way they are configured and used, but the basic concepts are the same. Here is a good comparison between the two with explanations of the pro and cons of each. In this guide we will show you how to set up and use both OpenMPI and MPICH on the DEC cluster.
OpenMPI¶
To set up OpenMPI on the DEC cluster, simply add the OpenMPI binaries to your PATH
and the OpenMPI libraries to your LD_LIBRARY_PATH
. You need to do this in your .bashrc
file.
Edit your file .bashrc
and add the following lines:
export PATH=/usr/lib64/openmpi/bin/:$PATH
export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib/:/usr/lib/:/usr/lib64/:$LD_LIBRARY_PATH
Mpich¶
To set up MPICH on the DEC cluster, add the MPICH binaries to your PATH
and the MPICH libraries to your LD_LIBRARY_PATH
. You need to do this in your .bashrc
file.
Edit your file .bashrc
and add the following lines:
export PATH=/usr/lib64/mpich/bin/:$PATH
export LD_LIBRARY_PATH=/usr/lib64/mpich/lib/:/usr/lib/:/usr/lib64/$LD_LIBRARY_PATH
Mpich 3.2 on softdec¶
To set up MPICH 3.2, add the MPICH binaries to your PATH
and the MPICH libraries to your LD_LIBRARY_PATH
. You need to do this in your .bashrc
file.
Edit your file .bashrc
and add the following lines:
export PATH=/softdec/mpich/bin/:$PATH
export LD_LIBRARY_PATH=/softdec/mpich/lib/:/usr/lib/:/usr/lib64/