[MPI3 Fortran] MPI buffer arguments - void and call-by-reference
Bill Long
longb at cray.com
Thu Feb 19 10:00:58 CST 2009
Aleksandar Donev wrote:
> Hi Craig,
>
> Since I wasn't in Vegas I will read the papers and try to reconstruct
> what you guys talked about, and in particular, to understand why
> "TYPE(*), DIMENSION(*)" was not a possibility (excluding scalar
> actuals if necessary---handle that by a separate procedure if need be).
>
>> interface
>> subroutine MPI_Send(buf, ...) BIND(C)
>> TYPE(*), DIMENSION(..), INTENT(in) :: buf
>> ...
>> end subroutine
>> end interface
>> I think using TYPE(*) and DIMENSION(..) is an excellent solution for
>> MPI 3.0. The advantages are:
> I am in agreement that this is a good solution.
> BUT:
>> 1. Current user code won't have to change beyond using the MPI3 module.
> That makes no sense. If the array is passed by descriptor, there is
> absolutely no need to also pass its size as an argument. Even the
> type, at least for the set of predefined intrinsic interoperable
> types, does not need to be passed.
>
> Either we keep the interfaces as close to what they are
> (pass-by-address), or, we refine them. Otherwise you get something
> that neither satisfies existing codes/implementations nor does it
> satisfy demanding users (read: me :-)
I would note (for the MPI folks) that discussions at J3 meetings suggest
that Aleks is not the only one who would like a "modern" MPI interface
for Fortran. J3 has no official position on this one way or the other.
We are working to make such an interface possible (as part of a larger
scope C interoperability TR), but it is up to the MPI group to decide
what to support. The hard reality is that there is a enormous amount of
legacy MPI code out there and the "don't make me change my code" crowd
is a significant fraction (most likely the majority) of MPI/Fortran
users. So, I think that continuing to support the current style of
interface is not really optional. The question is whether to support an
additional interface that is more in tune with modern Fortran, and
offers definite advantages to authors of new codes. I don't think it is
either/or, but rather one or two.
Cheers,
Bill
>
> Best,
> Aleks
>
--
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120
More information about the mpiwg-fortran
mailing list