[MPI3 Fortran] Fwd: [Mpi-comments] MPI 3.0: Fortran 2008 interface - issue with the LOGICAL kind
Tobias Burnus
burnus at net-b.de
Sat Mar 2 04:12:46 CST 2013
N.M. Maclaren wrote:
> On Mar 2 2013, Tobias Burnus wrote:
>>
>> But that shouldn't be a problem as both have different binding names:
>> "MPI_Barrier" in C and "mpi_barrier" in Fortran.
>
> Which makes the claim that BIND(C) is useful positively bizarre!
>
>> If they had the same binding name also the optional "ierr" wouldn't
>> work.
> TS 29113 allows for optional arguments.
Yes, but if they had the *same* binding name, there is only a single
procedure. Then, one cannot have one argument for the C interface
("MPI_Comm comm") and two arguments for the Fortran procedure ("comm,
ierror"), unless "ierror" is never touched.
Hence, with the current handling, they cannot be the same procedure. The
only advantage of BIND(C) is that third-party tools know how to deal
with the calls, without needing to know the compiler. (Assuming the ABI
is well defined.)
Tobias
More information about the mpiwg-fortran
mailing list