[MPI3 Fortran] MPI Fortran bindings

Jeff Squyres jsquyres at cisco.com
Fri Jun 5 15:17:22 CDT 2009


On Jun 5, 2009, at 3:50 PM, Jim Xia wrote:

> > Recall that J3 was asked by Craig (representing the MPI group) to  
> add
> > type(*) just for this reason.  That is what should be specified.   
> If a
> > particular implementation cannot support this in an explicit  
> interface,
> > then it is no worse than the current <type>. I would argue that  
> type(*)
> > is more intuitive to a Fortran programmer than <type>.  Eventually,
> > their compiler will "grow into" accepting it.  Given that many  
> compiler
> > vendors already support some form of directive for "ignore the  
> type in
> > interface argument checks", I don't think that type(*) will be  
> that hard
> > for vendors to implement.
>
> Is it wise for MPI to use something that is not currently  
> standardized yet by the Fortran committee?  No body has said it's  
> hard to implement.  The risk is it may never be adopted by the  
> standard body.


Agreed; I think you stated that much more succinctly and plainly to a  
non-fortran guy like me than Aleks did.  Thanks!  :-)

1. The goal is to have the buffer parameter argument be able to accept  
any type, any shape, anything.  Even scalars.  The fact that many  
(all?) fortran compilers have various vendor-specific ways to do this  
means that it is possible, albeit not standard.  This is what I meant  
earlier when I said that I didn't care what notation was used for  
(void*)-like functionality -- the functionality *does* exist, even if  
it is not in the language standard.  While we (MPI) clearly don't want  
to use a pre-standard form that may or may not be accepted, *some*  
notation is needed to denote this (potentially vendor-specific)  
behavior in the bindings.  The current notation is

    <type> BUF(*)

Others have proposed

    <any_type_or_shape> BUF
    type(*) BUF
    <type>, dimension(*) BUF

Which one is best?  (if any?)

To be clear: I recognize that there is currently no perfect/Right  
answer here.  What is the best compromise?

2. A second issue is that there is some debate as to whether INTENT is  
useful.  I think that most people are saying yes, but Aleks is saying  
it's not that important.

-----

What would be most useful to me is if I have something to show to the  
Forum on Monday afternoon (1pm US Pacific time) for a suggested  
binding form for MPI_SEND -- i.e., a binding that has a choice buffer  
in it.  Here's the existing binding:

MPI_SEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, IERROR)
    <type> BUF(*)
    INTEGER COUNT, DATATYPE, DEST, TAG, COMM, IERROR

-- 
Jeff Squyres
Cisco Systems




More information about the mpiwg-fortran mailing list