[MPI3 Fortran] [Mpi3-tools] MPI 3.0: Fortran 2008 interface - issue with the LOGICAL kind

William Gropp wgropp at illinois.edu
Sun Apr 21 10:57:45 CDT 2013


This is better motivated than the earlier version that I read, but I still have problems with the underlying assumptions.

Though this is not explicitly stated, but is implied by the advice to users, the goal is to enable the use of tools that exploit the profiling library from Fortran (hint: this needs to be at the top of the first paragraph), as well as repair the error introduced in the f08 module with respect to the use of BIND(C).

There appears to be the following major implicit assumptions:

1) Tools will not define a Fortran interface that defines the MPI routines but rely on intercepting either the corresponding C routine (current practice) or some wrapper routine (this document, hence the definition of the wrapper names).  Some tools do implement the Fortran interface in Fortran.

2) The Fortran implementation will take the performance penalty of using a wrapper routine to perform the operation (discounting sophisticated IPA/WPA (interprocedural analysis/whole program analysis)).  Taking this performance penalty is common but not universal.

Neither of these is addressed directly.  I understand why tools builders would like to be able to define a single set of routines and then use them with all languages (or implement the tool in one language but call from any), but this scheme is complex.  I may also misunderstand the intent of the section, but in that case, I doubt people who haven't attended the forum will have much better luck.

I recommend two things:

1) start with a clearer set of goals and constraints.  Explain why other choices are not viable.
2) reconsider the consequences of the choices.  


Minor errors:

Only g77 typically maps Foo_foo (in Fortran) to Foo_foo__ (double trailing underscore); if the Fortran name contains no underscore, only a single underscore is appended, so Foofoo goes to foofoo_ (I know of no Fortran compiler that has exactly the behavior in the text).  gfortran uses a single trailing underscore, for example.

The description of the macros says that the macro "must not be available" (available is the same as defined, so #ifdef can be used to check for availability) but then appears to define the value in this case as the value zero. 

The rationale on page 6, lines 17-23 talks about "After a compiler provides …".  What I believe is really meant is:

"Should a subsequent release of a compiler used to build the object or library files provide the facilities of TS29113 when the version use to build the original object or library files did not, and IF THAT VERSION OF THE COMPILER GENERATES CODE THAT IS BINARY COMPATIBLE WITH CODE GENERATED BY THE PREVIOUS VERSION, THEN <remaining text about not needed to recompile other parts of the code in this case>."

The text in upper case is important - the text as it is promises something that the MPI standard cannot guarantee. 


William Gropp
Director, Parallel Computing Institute
Deputy Director for Research
Institute for Advanced Computing Applications and Technologies
Thomas M. Siebel Chair in Computer Science
University of Illinois Urbana-Champaign




On Apr 18, 2013, at 3:22 AM, Rolf Rabenseifner wrote:

> <binding-2_Sec.17.1.5_2013-04-18.pdf>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpiwg-fortran/attachments/20130421/8f33e645/attachment-0001.html>


More information about the mpiwg-fortran mailing list