[Mpi-22] Should all constants/types be availablein all languagebindings?

Jeff Squyres jsquyres at [hidden]
Fri Oct 24 14:12:50 CDT 2008



On Oct 24, 2008, at 2:03 PM, Supalov, Alexander wrote:

> If this requirement is to be interpreted literally, then yes, the
> standard must define all datatypes in all languages. However, the
> example following this statement shows how an MPI_REAL is transformed
> into an equivalent C data type. Whether or not this is indeed MPI_REAL
> is not clear. It may well be an MPI_FLOAT.

I'm not sure what you mean -- Example 16.16 shows making a combined  
datatype with 1 C int and the 5 Fortran REALs.  The C code never tries  
to use the values in the R array; it just MPI_SEND's them.  Using the  
MPI_REAL type passed up from Fortran is the right thing to do here  
(vs. using MPI_FLOAT).  Alternatively, if the C code knew that the  
buffer was 5 reals, it wouldn't need to have a type passed in from  
Fortran -- just the buffer.  Then it could TYPE_CREATE_STRUCT with  
MPI_INT and MPI_REAL and send using the resulting datatype.

That's exactly why the datatypes are supposed to be defined in all  
languages, right?  Not for dereferencing, but for sending/receiving  
data that originally came from another language.

The way I read Hubert's text (p483:46-47), none of us are 2.1  
compliant because we don't offer *all* the datatypes in all  
languages.  Right?

> By the way, this example shows that MPI::Fint may be necessary:  
> MPI_Fint
> is used here to pass Fortran datatype thru the C function boundary.
> Imagine a C++ function. There was a ticket #4 calling for removal of  
> the
> MPI::Fint until it was redefined.

Why not use MPI_Fint?


-- 
Jeff Squyres
Cisco Systems




More information about the Mpi-22 mailing list