MPI
For my understanding of what MPI is &/or does, please refer to this post.
Compiling MPICH2 (v1.3.1) with GNU Compilers (GCC v4.1.2)
mkdir $HOME/tmp/
- Download MPICH2 from the Argonne National Laboratory
- Save
mpich2-1.3.1.tar.gz
in$HOME/tmp/
-
cd $HOME/tmp/ tar -zxvpf mpich2-1.3.1.tar.gz cd mpich2-1.3.1 ./configure --prefix=$HOME/mpich2/1.3.1/gcc/4.1.2 --enable-f77 --enable-f90modules make make install
- Once the make install} process is successfully completed, add the following lines to
$HOME/.bashrc
:export MPICH2="$HOME/mpich2/1.3.1/gcc/4.1.2" export PATH="${PATH}:${MPICH2}/bin:${MPICH2}/sbin" export MANPATH="${MANPATH}:${MPICH2}/man" export LD_LIBRARY_PATH="${MPICH2}/lib:${LD_LIBRARY_PATH}" # Useful aliases/shortcuts alias mpicc="mpicc -g -Wall -lm" alias mpirun="mpirun -machinefile ${HOME}/machinefile"
- Save and quit
$HOME/.bashrc
- Run the command
. $HOME/.bashrc
- Run the command:
hostname > $HOME/machinefile
- Parallel calculations can now be performed.
Refer to MPICH2 Guides for further details.
6 Replies to “MPICH2 MPI with GNU compilers”