[MPI3 Fortran] Specify IN/OUT/INOUT in MPI spec?

Jeff Squyres jsquyres at cisco.com
Thu May 28 10:20:45 CDT 2009


On May 28, 2009, at 10:41 AM, Lionel, Steve wrote:

> Yes, I can do 2b (what am I getting myself into?)
>

:-)

> I would have expected that the canonical form of the binding was a  
> Fortran source of a module, but it probably is helpful to show the  
> declaration in the standard text alongside a C binding if that's  
> there.
>

Throughout the MPI doc, we show language neutral, C, C++, and Fortran  
bindings for each MPI API function.  The C++ bindings may well go away  
(yay!), and what I'm suggesting is that we include proper INTENT  
declarations for each one.

The Forum text purists will likely want to have some input on the  
format, spacing, font, etc. of how these new bindings will appear  
(!).  That's why I suggest that we don't do anything until I can run a  
few examples by the Forum and see which ones they like.  That way, we  
should get some standardized latex macros for all the Fortran bindings  
-- then it'll just be a matter of applying those macros throughout the  
text.

I picked a few random Fortran bindings from the 2.1 doc -- can you  
guys tell me how the text *should* read with the INTENT stuff?  I'll  
then dither over font, spacing, etc. with the Forum to get it to their  
liking.

! all are IN except IERROR
MPI_SEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, IERROR)
   <type> BUF(*)
   INTEGER COUNT, DATATYPE, DEST, TAG, COMM, IERROR

! count is IN
! array_of_requests is INOUT
! ierror is OUT
MPI_STARTALL(COUNT, ARRAY_OF_REQUESTS, IERROR)
   INTEGER COUNT, ARRAY_OF_REQUESTS(*), IERROR

! all are IN except NEWTYPE and IERROR
MPI_TYPE_CREATE_STRUCT(COUNT, ARRAY_OF_BLOCKLENGTHS,
     ARRAY_OF_DISPLACEMENTS, ARRAY_OF_TYPES, NEWTYPE, IERROR)
   INTEGER COUNT, ARRAY_OF_BLOCKLENGTHS(*), ARRAY_OF_TYPES(*), NEWTYPE,
   IERROR
   INTEGER(KIND=MPI_ADDRESS_KIND) ARRAY_OF_DISPLACEMENTS(*)

Thanks!

-- 
Jeff Squyres
Cisco Systems




More information about the mpiwg-fortran mailing list