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

Jeff Squyres (jsquyres) jsquyres at cisco.com
Tue Mar 26 08:38:39 CDT 2013


On Mar 25, 2013, at 2:35 PM, Bill Long <longb at cray.com> wrote:

>> I'm strongly in favor of option 3.  It is the only option that allows
>> the possibility of underscore name mangling disappearing in the future.
>>  I think most (if not all) MPI Fortran implementations will eventually
>> evolve to thin wrappers calling the C API.  

Remember that Open MPI can never do this approach since our C handles != Fortran handles, and Fortran wrappers will not be able to reach back into the back-end C MPI objects (at least, not without a truckload of extra interop code -- the Fortran bindings layer would have to gain an understanding of the back-end MPI C objects, and that seems like a terrible idea).

> 6. You can isolate the issues of Fortran types (compiled with -i8, meaning of LOGICAL, character arguments with len > 1) into the Fortran wrappers so that the C library writers do not have to know about these issues.   Simplifies the maintenance and testing issues for the C library code.

There's a flaw in this logic.

Yes, you divorce the *bindings* between C and Fortran, but the MPI library still has to know whether INTEGER is 4 or 8 bytes (for example) so that it can send/receive them properly.  I.e., the MPI datatypes are intrinsically tied to the language's native types, and are orthogonal to how the bindings are implemented.

-- 
Jeff Squyres
jsquyres at cisco.com
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/





More information about the mpiwg-fortran mailing list