10.2.4.1 The mpi Module

An MPI-/ implementation must provide a module named mpi that can be USEd in a Fortran 90 program. This module must:

An MPI-/ implementation may provide in the mpi module other features that enhance the usability of MPI-/ while maintaining adherence to the standard. For example, it may:

Advice to implementors. The appropriate INTENT may be different from what is given in the MPI-/ generic interface. Implementations must choose INTENT so that the function adheres to the MPI-/ standard.(End of advice to implementors.)

Rationale. The intent given by the MPI-/ generic interface is not precisely defined and does not in all cases correspond to the correct Fortran INTENT. For instance, receiving into a buffer specified by a datatype with absolute addresses may require associating MPI_BOTTOM with a dummy OUT argument. Moreover, ``constants'' such as MPI_BOTTOM and MPI_STATUS_IGNORE are not constants as defined by Fortran, but ``special addresses'' used in a nonstandard way. Finally, the MPI-/ generic intent is changed in several places by MPI-//. For instance, MPI_IN_PLACE changes the sense of an OUT argument to be INOUT.(End of rationale.)

Applications may use either the mpi module or the mpif.h include file. An implementation may require use of the module to prevent type mismatch errors (see below).

Advice to users. It is recommended to use the mpi module even if it is not necessary to use it to avoid type mismatch errors on a particular system. Using a module provides several potential advantages over using an include file.(End of advice to users.)
It must be possible to link together routines some of which USE mpi and others of which INCLUDE mpif.h.

MPI-Standard for MARMOT