Utilisation de MPICH2/MPI
On this page... (hide)
`MPICH2/MPI is a high-performance and widely portable implementation of the Message Passing Interface (MPI) standard (both MPI-1 and MPI-2). The goals of MPICH2 are:
- to provide an MPI implementation that efficiently supports different computation and communication platforms including commodity clusters (desktop systems, shared-memory systems, multicore architectures), high-speed networks (10 Gigabit Ethernet, InfiniBand, Myrinet, Quadrics) and proprietary high-end computing systems (Blue Gene, Cray, SiCortex)
- to enable cutting-edge research in MPI through an easy-to-extend modular framework for other derived implementations.
MPICH2 is developped at the Mathematics and Computer Science Division at Argonne National Laboratory.
The version of MPICH2 installed on the Nef cluster is MVAPICH. It's a version of MPICH2 modified to support Infiniband networks.
The version installed is 1.5.1p1 / 64bit (in the
This version is compiled with GCC; if you want to use `MVAMPICH with the PGI compilers, check the PGI documentation.
The documentation is available in online on the MVAPICH2 site.
Don't mix commands from MPICH2/MPI, OpenMPI and LAM/MPI, otherwise things will fails
To use specifically MPICH2/MPI, you should add
/opt/mvapich2/bin in your
- shell (bash, zsh):
- cshell :
set path=(/opt/mvapich2/bin $path)
Another option is to use mpi commands postfixed by the MPI implementation, for example:
The best and easiest way to compile a MPI program is to use the wrappers included in the distribution.
If you use the PGI compiler, it has its own version of MPICH and MPICH2 libraries, you just have to use the -Mmpi2 (or -Mmpi for MPICH1) flag to compile a MPI program
:Compiling a C MPI code (several ways to do this)
mpicc -o prog prog.c(if your PATH is correct)
mpicc.mvapich2 -o prog prog.c
/opt/mvapich2/bin/mpicc -o prog prog.c
- Compiling a C++ MPI code
/opt/mvapich2/bin/mpicxx -o prog prog.c
- Compiling a Fortran 77 MPI code
/opt/mvapich2/bin/mpif77 -o prog prog.f
- Compiling a Fortran 90/95 MPI code
/opt/mvapich2/bin/mpif90 -o prog prog.f
See How to execute a MPICH2 program ? in the FAQ