[MPI3 Fortran] [Mpi-comments] MPI 3.0:Fortran 2008 interface - issue with the LOGICAL kind
Bill Long
longb at cray.com
Fri Mar 15 17:30:24 CDT 2013
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.
Cheers,
Bill
> I think the best solution is to add on to Rolf's proposal for problem A. The addition is that there must also be a BIND(C) interface for the tools community that replaces default LOGICAL with INTEGER(C_INT).
>
> The overloaded version (INTEGER(C_INT)) will be called by implementor so that it can be intercepted by PMPI users.
>
> Martin, do you see a problem with this? It adds an additional wrapper call, one that you don't see. If you like we could have a phone conversation today between you and I. Then perhaps a group conference call the week of March 25.
>
> -craig
>
>
> _______________________________________________
> mpi3-fortran mailing list
> mpi3-fortran at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-fortran
>
--
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc./Cray Plaza, Suite 210/380 Jackson St./St. Paul, MN 55101
More information about the mpiwg-fortran
mailing list