[MPI3 Fortran] Teleconference Wednesday, Sept. 17: Summary
Bill Long
longb at cray.com
Wed Sep 17 12:57:23 CDT 2008
Jeff Squyres wrote:
> On Sep 17, 2008, at 1:03 PM, Aleksandar Donev wrote:
>
>>> MPI_GATHER(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype,
>>> root, comm)
>>> MPI_GATHER(sendcount, sendtype, recvbuf, recvcount, recvtype, root,
>>> comm)
>>> --> i.e., leave off the sendbuf argument instead of passing
>>> MPI_IN_PLACE
>>>
>>> Both of these examples should be pretty easy to match via overloading
>>> the functions. The first one could probably be an optional argument
>>> since "status" is the last argument. But I don't think the spec
>>> should mandate which way it is implemented -- I think the spec should
>>> only indicate which bindings should be available to user applications.
>> To be honest I don't know C++ generic rules enough, but just note
>> that they
>> are different from Fortran and we must ensure that any rules are
>> consistent
>> with Fortran. You cannot, and should not, simply cut and paste the C/C++
>> bindings and just replace a few keywords because the rules for generic
>> disambiguation should be taken into account.
>
>
> Sure; I wasn't suggesting that we do that. All I said was that we
> should take a cue from the C++ bindings.
>
> My two examples above should be pretty easy to do in Fortran -- there
> are different types and counts for arguments such that ambiguity
> should not occur (e.g., the differing location for "sendtype" alone
> should be enough for the 2 MPI_GATHER bindings). I admit to not
> knowing the specific Fortran matching rules, so please correct me if
> this is wrong. The examples I presented seemed pretty straightforward
> -- I deliberately chose them for their simplicity.
Your examples would be straightforward to handle in Fortran with generic
interfaces. I assume there is a similar mechanism in C++. I don't see
how you could write corresponding prototypes in C, so the calling
argument lists in Fortran/C++ would be different from those in C. I
guess that's unavoidable, but might cause some user head-scratching.
Cheers,
Bill
--
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