[Mpi-forum] Fortran bindings

Graham, Richard L. rlgraham at ornl.gov
Mon Oct 3 13:25:39 CDT 2011


comments in line:
On Oct 3, 2011, at 1:56 PM, Rolf Rabenseifner wrote:

>> - 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.

[rich] As I understand this, the interface and the Fortran/MPI interoperability are two distinct issues.  That is, the API and the issues that arise from compiler optimizations are two distinct items. 

>> - 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.

[rich] Again, if I understood this correctly, the form of the interface is a different issue than what to do to prevent the compiler optimizations that cause issues with 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).

[rich] Can the arguments in fortran be declares as c types, avoiding all the translation you mention ?

> 
> 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.

[rich] The forum has not decided anything at this stage, which is why I ask these questions before we go ahead and actually make decisions.

> 
> 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.

[rich] The question was strictly about the interface.  I think that what Craig said, is that the current proposal is what Fortran users expect is what answers my question.

Rich

> 
> 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
>> hxxp://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)
> _______________________________________________
> mpi-forum mailing list
> mpi-forum at lists.mpi-forum.org
> hxxp://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum
> 





More information about the mpi-forum mailing list