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

Craig Rasmussen rasmus at cas.uoregon.edu
Thu Mar 21 11:26:40 CDT 2013


So what is the state of things regarding LOGICALs?  Is the following summary valid?  Can we take a straw vote on solution paths?

1. We have to do something about Logical.  Alternative solutions to vote:
       1a. Kill BIND(C) for interfaces with Logical variables.  Fortran implementations must call C routines from thin wrapper.  Fortran implementers may use modules with thin Fortran wrappers.
       1b. Replace existing BIND(C) interfaces with Logical variables and use Integer instead of Logical for the dummy arguments.  Overload with a purely Fortran interface using Logical arguments for normal Fortran users.  Implementations must call the BIND(C) interface with Integer arguments for tools usage.  This new interface would have to be renamed so not to clash with existing *_f08 names.

2. We don't HAVE to do anything else (I assume).  But should we.  Alternatives to vote:
      2a.  Leave everything else alone.  Use current BIND(C) interfaces for functions not using LOGICAL.
      2b.  Get rid of BIND(C) altogether.  Require Fortran implementations to call C implementation from thin Fortran wrapper.   Implementers are free to place Fortran wrappers in a module.  This choice allows significant reduction in implementation complexity for MPI library vendors and for tools.
      2c.  Get rid of most of BIND(C) Fortran interfaces but keep a few that make sense.  Perhaps the routines with callbacks fit in this category.

3. When to stage the changes?  MPI 3.1 or 4.0?  Alternatives to vote:
     3a. Make changes as soon as possible.
     3b.  Change LOGICAL now, wait to do additional changes (if any) until MPI 3.1.
     3b.  Change LOGICAL now, wait to do additional changes (if any) until MPI 4.0.

4. Other votes?

Craig Rasmussen
CAS Scientific Programmer
rasmus at cas.uoregon.edu




On Mar 21, 2013, at 8:47 AM, Jeff Squyres (jsquyres) wrote:

> On Mar 21, 2013, at 8:44 AM, "Schulz, Martin" <schulzm at llnl.gov> wrote:
> 
>> I feared that this would be the reaction and that were also my original reservations. From a tools perspective this would indeed be the easiest and cleanest solution, but I can see the downside. Implementation effort for rewriting aside (which I realize is important), do you expect a large performance impact, though?
> 
> 
> I can't speak for NEC.
> 
> The reason we did it this was in OMPI was not for performance -- it was for implementation-specific reasons.  That is, there are some cases where we want to do something different for the Fortran implementation vs. the C implementation.  One obvious example of this is for just about any function involving callbacks.
> 
> MPICH may not have this issue because their handles are always integers, but for OMPI, C handles=pointers/F handles=integers, so we have to do some swizzling/de-swizzling for the conversion.
> 
> -- 
> Jeff Squyres
> jsquyres at cisco.com
> For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
> 
> 
> _______________________________________________
> mpi3-fortran mailing list
> mpi3-fortran at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-fortran

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


More information about the mpiwg-fortran mailing list