This subsection briefly describes writing MPI programs on Louhi.
The MPI implementation on Louhi is based on MPICH-2. MPI programs can be written with Fortran, C or C++.
MPI-2 Support
The MPI version on Louhi is MPI 2.0 compliant, excluding the dynamic
process features and thread safety. Most importantly, MPI-I/O is
available and is recommended for parallelizing the I/O.
More precisely, the following commands are not supported:
- MPI_CLOSE_PORT and MPI_OPEN_PORT
- MPI_COMM_ACCEPT
- MPI_COMM_CONNECT and MPI_COMM_DISCONNECT
- MPI_COMM_SPAWN and MPI_COMM_SPAWN_MULTIPLE
- MPI_COMM_GET_ATTR - with attribute MPI_UNIVERSE_SIZE
- MPI_COMM_GET_PARENT
- MPI_LOOKUP_NAME
- MPI_PUBLISH_NAME and MPI_UNPUBLISH_NAME
Include Files
Instead of
include 'mpif.h'
to introduce MPI definitions Fortran programmers can use the corresponding module:
use mpi
For C/C++ use
#include <mpi.h>
C++ programmers should, however, note that there is a name conflict between stdio.h and the C++ binding. This can be avoided by including mpi.h before stdio.h or the iostream routine.
Further Information
For more information see man intro_mpi.