[Mpi-forum] Fortran bindings
Rolf Rabenseifner
rabenseifner at hlrs.de
Mon Oct 3 12:56:58 CDT 2011
> - Be able to use all three versions of the Fortran bindings within a
> single translation unit. The goal being to make it possible to migrate
> incrementally to the new proposed bindings, within the applications
> current file structure.
This is only one aspect of the proposed Fortran interface.
The major aspect is to solve the inconsistency problems between
Fortran and MPI.
And here mainly the problems with nonblocking routines.
> - Take advantage of the ability to have Fortran and C binding be
> exactly the same, bypassing a translation layer.
This is not a choice because it does not solve the major problem:
The correct use of nonblocking routines.
Using the C interface from Fortran means that the user has to
- translate all the handles from Fortran to C and vice versa,
- pass the C_LOC(buffer) instead of buffer,
- use the TARGET attribute for the buffer
(otherwise the use of C_LOC with buffer is incorrect).
The TARGET attribute does not solve the nonblocking problem
because it protects only code movement optimization
around the MPI_Wait calls, but it does not solve problems
based on automatic off-loading of data to a GPU memory
while an internal MPI progress thread is communicating
parts of the array.
Such "using only C from Fortran" may be only portable when
there is no progress thread as, e.g., in mpich2.
The MPI Forum clearly decided ***not*** to mandate one
of these approaches (with or without a progress thread),
and therefore, a pure TARGET based solution and to
forbid progress threads is not an option compared to
the ASYNCHRONOUS buffers in the new mpi_f08 module.
If users want to use the C interface from Fortran,
they can do it, but they should know that they write
non-portable applications.
There are real user who do this, as Torsten reported.
Best regards
Rolf
----- Original Message -----
> From: "Richard L. Graham" <rlgraham at ornl.gov>
> To: "Main MPI Forum mailing list" <mpi-forum at lists.mpi-forum.org>
> Sent: Monday, October 3, 2011 6:30:43 PM
> Subject: [Mpi-forum] Fortran bindings
> At the risk of upsetting the apple cart, I want to ask a question
> about the new proposed Fortran bindings for MPI 3.0. I rather sure
> that the question I am about to ask has been addressed in the past,
> but to be honest, I did not understand the details of the proposal
> enough to note the difference. It was not until the rather heated (and
> fruitful) discussions that occurred at the last meeting in Santorini,
> and a follow on discussion that this came up.
>
> It seems to me that two options were considered with respect to these
> bindings:
> - Be able to use all three versions of the Fortran bindings within a
> single translation unit. The goal being to make it possible to migrate
> incrementally to the new proposed bindings, within the applications
> current file structure.
> - Take advantage of the ability to have Fortran and C binding be
> exactly the same, bypassing a translation layer.
>
> First, did I describe the two possibilities correctly ? If so, why opt
> for the first over the second ?
>
> Rich
> _______________________________________________
> mpi-forum mailing list
> mpi-forum at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum
--
Dr. Rolf Rabenseifner . . . . . . . . . .. email rabenseifner at hlrs.de
High Performance Computing Center (HLRS) . phone ++49(0)711/685-65530
University of Stuttgart . . . . . . . . .. fax ++49(0)711 / 685-65832
Head of Dpmt Parallel Computing . . . www.hlrs.de/people/rabenseifner
Nobelstr. 19, D-70550 Stuttgart, Germany . (Office: Allmandring 30)
More information about the mpi-forum
mailing list