[MPI3 Fortran] [Mpi-comments] MPI 3.0:Fortran 2008 interface - issue with the LOGICAL kind

Craig Rasmussen rasmus at cas.uoregon.edu
Fri Mar 15 19:46:07 CDT 2013

On Mar 15, 2013, at 3:30 PM, Bill Long wrote:

> Hi Craig,
> There were many follow-up messages in this thread....
> On 3/15/13 12:16 PM, Craig Rasmussen wrote:
>> On Mar 10, 2013, at 10:18 PM, Schulz, Martin wrote:
>>> Hi all,
>>> I am trying to catch up with the various threads on this (sorry, last week was hectic and I didn't get to all emails). I have to admit that I am still confused why there is a problem, but we can clarify this during a phone call or during the march meeting. However, doesn't not doing BINDC create a problem, since I now have to again deal with the no/one/two underscore issue? This sounds like a bad interface design to me, especially when we starting mixing  things.
>> Yes, I believe that removing BIND(C) entirely makes it virtually impossible for the tools community.  Not only is there the underscore issue but some implementors want to put the code in modules which makes name mangling MUCH worse.
> I would prefer that the tools people ignore the Fortran wrappers completely and instead only target the underlying C functions in the MPI library.  If a library function is entirely replaced by a Fortran routine, then that routine requires a BIND(C) specifying the C name. Otherwise, BIND(C) would not be needed for the wrappers.   This scheme seems to circumvent all of the recent problems, and also make life much simpler for the tools people who only need to look at the C functions.  It also avoids the problem of aggressively optimizing compilers inlining and eliminating the wrappers (which would then be unavailable for the tools).  I would think that forcing users to throttle back compiler optimization just to get the tools to work would be counterproductive.

We had several discussions about this a year or so ago.  I agreed with you.  But for reasons I don't fully understand, this wasn't deemed sufficient.  A couple of issues that need to be considered are:

1. A vendor is allowed to implement the standard purely in Fortran.  There is at least one major compiler vendor that implements a portion of the MPI routines in Fortran for performance.
2. Martin has stated that the tools community wants control at the earliest opportunity.  Thus they want control at the wrapper level.  I really don't understand this but so it is.


More information about the mpiwg-fortran mailing list