Implementations with Extended Fortran support must provide:
An MPI implementation must provide a module named mpi that
can be used in a Fortran 90 program. This module must:
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.)
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-1 generic intent is changed in several places
by MPI-2. 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).
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.)
A high-quality MPI implementation should provide a mechanism to
ensure that MPI choice arguments do not cause fatal compile-time or run-time
errors due to type mismatch. An MPI implementation may require
applications to use the mpi module, or require that it be
compiled with a particular compiler flag, in order to avoid type
mismatch problems.
In the case where the compiler does not generate errors, nothing needs
to be done to the existing interface. In the case where the compiler
may generate errors, a set of overloaded
functions may be used. See the paper of M. Hennecke [26].
Even if the compiler does not generate errors, explicit interfaces for
all routines would be useful for detecting errors in the argument
list. Also, explicit interfaces which give INTENT information
can reduce the amount of copying for BUF(*) arguments.
( End of advice to implementors.)
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.
Rationale.
Advice to users.
It must be possible to link together routines some of which USE mpi
and others of which INCLUDE mpif.h.
Up: Extended Fortran Support
Next: No Type Mismatch Problems for Subroutines with Choice Arguments
Previous: Extended Fortran Support
315.2. No Type Mismatch Problems for Subroutines with Choice Arguments
Up: Extended Fortran Support
Next: Additional Support for Fortran Numeric Intrinsic Types
Previous: The mpi Module
Advice
to implementors.
Up: Extended Fortran Support
Next: Additional Support for Fortran Numeric Intrinsic Types
Previous: The mpi Module
Return to MPI-2.2 Standard Index
Return to MPI Forum Home Page
(Unofficial) MPI-2.2 of September 4, 2009
HTML Generated on September 10, 2009