[MPI3 Fortran] Teleconference Wednesday, Sept. 17: Summary

Bill Long longb at cray.com
Wed Sep 17 15:24:58 CDT 2008



Craig Rasmussen wrote:
> On Sep 17, 2008, at 11:57 AM, Bill Long wrote:
>
>>
>>
>> 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.
>>
>
> This is why I'm surprised Jeff suggested doing this as I thought he 
> didn't want the interfaces to vary much from C.  I don't really 
> understand the need to tie the interfaces closely with C (other than 
> semantically)  as we are dealing with different languages.  Certainly 
> documentation of the API is easier if all languages look like C.
>
> (Jeff, you want to whack me down on this :-)
>
> Craig


A couple of follow-up comments.

For a particular library routine there is only one man page that covers 
all relevant languages (otherwise, what does man xxx get?).  Life is 
simplest of all the languages have the same list of arguments.  At a 
minimum,  at least for arguments that are in common the names of the 
corresponding arguments should be the same.

If there is already a C++ interface that is different from the C 
interface, then there are already two.  Would it be reasonable for 
Fortran to use the same argument lists as C++, to avoid having yet a 
third set?

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