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

N.M. Maclaren nmm1 at cam.ac.uk
Sat Mar 16 03:49:59 CDT 2013

On Mar 16 2013, Craig Rasmussen wrote:
>>    -- I.e., it is simple to change it to BIND(C) or non-BIND(C)?
> We use macro magic to turn BIND(C) on and off so it is not hard for us to 
> change.

As any competent implementor would!  Changing is the easy bit; ensuring
that things don't break is the issue.

> Rolf, is an implementation compliant if Fortran wrappers are used in a 
> module to call C directly so that the tools community can't intercept the 
> call in Fortran? Does this break any current tools implementations? I 
> assume it does as I believe the MPI standard requires that a Fortran MPI 
> user be able to intercept the MPI call in Fortran and then call MPI.

It does.  But, once the call has reached the PMPI procedures, it's all
black magic from then on, so that they can certainly call C directly,
or 370 Assembler, BLISS, Lisp or anything else!  That would probably
be incompatible with a few tools, of course :-)

> I would like to argue for a solution that would allow BIND(C) to be used 
> within 10 years to remove ALL requirements for the tools community to 
> handle the underscore problem.

That is a poor way to phrase it, but I know what you mean.  We put some
extensions into the TS to allow that, and I am going to propose a few
more for the next Fortran standard.  However, two VERY serious problems

    1) There are certain features that are semantically incompatible,
and it will be VERY hard to allow those in a BIND(C) interface.  I did
suggest LOGICAL(C_INT_AS_BOOL) as a possibility and got a right earful :-)
As I rather agreed with the objections, I shall not pursue the matter.

    2) WG14.  C11 did not create the chaos that C99 did, but is quite
seriously different in some important ways.  Plans are under way for
C14, and the majority of C communities have chosen their own C dialect,
usually based on some combination of C90 and C99.  The one certainty 
is that the C language is chaos in motion, and it's not going to get

Nick Maclaren.

More information about the mpiwg-fortran mailing list