Two weeks ago I attended the Fortran J3 standards meeting where I
discussed with them the issues surrounding new Fortran MPI bindings.
They were very receptive to our needs and instructed me to write a J3
paper in response (attached). In summary, J3 will try to get changes
made in the Fortran standard so that we won't need to use CLOC(buffer)
for a void* buffer argument. J3 still hasn't decided the best way to
do this but the likely favorite is a new type, TYPE(*), as an
interoperable type with void*.
J3 also decided that the way to limit copyin/copyout semantics and
code motion in asynchronous MPI calls is to use the volatile attribute
on both Fortran actual and dummy arguments. The performance effects
of volatile could be limited with the use of the new F2008 block
construct. For example,
real, dimension(100) :: buffer
BEGIN BLOCK
VOLATILE :: buf
err = MPI_Irecv(buf, ..., req)
.
.
err = MPI_Wait(req, ...)
END BLOCK
The interface for MPI_Irecv would have something like
TYPE(*), volatile :: buf
Cheers,
Craig
To: J3 08-185r1
From: Craig Rasmussen
Subject: Request for new features from MPI Forum
Date: 2008 May 15
The MPI Forum has been restarted in order to update the Message Passing
Interface (MPI) standard. As part of this standardization effort, a new
Fortran binding will be created for version 3.0 of the MPI standard. The
MPI Forum has requested that J3 consider modifying the Fortran standard
to accomplish the following:
1. A mechanism to suppress copy-in/copy-out semantics for MPI
asynchronous operations.
2. Suppress argument checking for MPI choice buffers (C void * formal
parameters).
A series of straw votes were taken at J3 meeting 184 to determine how to
address the request from the MPI Forum. The results were:
1. The VOLATILE attribute should be given to both the actual and dummy
arguments to suppress copy-in/copy-out.
2. The J3 committee voted to consider three different candidates for
suppressing argument checking of C void * formal parameters. WG5
will be asked to consider this as a work item for the C Interop TR.
The candidates for the mapping of dummy arguments to void * parameters
are:
a. Create a new derived type, TYPE(C_VOID), in the ISO_C_BINDING
intrinsic module.
b. Add an IGNORE(TKR) attribute for dummy arguments. This
attribute can optionally ignore any combination of type, kind,
and rank.
c. Create new syntax, TYPE(*), to allow any type actual argument.
When combined with DIMENSION(*), this is effectively equivalent
syntax for IGNORE(TKR).
J3 wishes to make the views expressed in this paper known to the MPI
Forum.
|