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

Craig Rasmussen crasmussen at lanl.gov
Wed Sep 17 15:11:29 CDT 2008


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






More information about the mpiwg-fortran mailing list