[MPI3 Fortran] MPI Data types

N.M. Maclaren nmm1 at cam.ac.uk
Thu May 7 13:17:30 CDT 2009

On May 7 2009, Jeff Squyres wrote:
>We talked about this in the last Chicago meeting (I fear I'm going to  
>get out of my depth here and either say something wrong or use  
>incorrect terminology): if the MPI can see the underlying Fortran  
>descriptor and resolve it to an accurate memory layout map of the data  
>(even if it's an array subset, or a subset of a subset, or ...), then  
>I think we can do something with that.

Fortran does not require that there be an underlying descriptor, though
most implementations will have them for assumed shape arrays.  It gets
rapidly murkier beyond that.

>However, we get into murky territory here (Rolf, Hubert, back me up  
>here): what *exactly* would MPI do with that?  It's at least somewhat  
>redundant with the MPI_Datatype argument.

Precisely.  Murky is the word.

>So the problem here is that we have two constructs that are at least  
>somewhat overlapping in semantic scope: Fortran parameters carry meta  
>data with them about their type, size, and shape, and the (count,  
>MPI_Datatype) tuple specify the same thing.

Essentially, yes, but the way that Fortran does is is partly compile-time
and partly run-time.

>Here's one possible answer that wouldn't be wholly incongruous with  
>the MPI C bindings...
>What if the (count, MPI_Datatype) tuple is "applied" to the user's  

It could be done.  Fortran has just such a concept - it's the dreaded
"sequence association".

Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email:  nmm1 at cam.ac.uk
Tel.:  +44 1223 334761    Fax:  +44 1223 334679

More information about the mpiwg-fortran mailing list