[MPI3 Fortran] MPI buffer arguments - void and call-by-reference
Craig Rasmussen
crasmussen at lanl.gov
Mon Feb 23 10:27:59 CST 2009
On Feb 19, 2009, at 9:00 AM, Bill Long wrote:
> 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.
This topic has come up frequently at MPI Forum meetings and in
discussions between Jeff Squyres and myself. The answer to the
question is that there will be a low level interface that follows the
current C standard as closely as possible, but provides type checking
where feasible and solves/provide guidance on the asynchronous problem.
There is also interest in providing a high level (real Fortran)
interface that takes advantage of the full features in Fortran. This
would be a separate effort and not part of the MPI standardization
effort. I'll still awaiting news whether there will be funding for
this or not.
Regards,
Craig
More information about the mpiwg-fortran
mailing list