[MPI3 Fortran] MPI Data types

Bill Long longb at cray.com
Thu May 7 15:54:41 CDT 2009



Jeff Squyres wrote:
> On May 7, 2009, at 1:30 PM, Jeff Squyres wrote:
>
>> This brings up the struggle I brought before: why does Fortran need 
>> the (count, MPI_Datatype) tuple?  Because it's part of MPI, that's 
>> why -- it's the standard.
>
> I let out an important piece of rationale here: part of the whole 
> reason to have MPI_Datatypes is to allow the MPI implementation to 
> optimize the memory layout map *once*, and then just use that 
> optimized map forevermore.  If you have no MPI_Datatype argument (that 
> is a handle to this optimized map), then you have to construct 
> datatypes (and optimize them) on the fly.  This has shown, in 
> real-world MPI codes, to be quite expensive (read: slow).


Thanks for this clarification.  Useful information. While you're on a 
roll, I have another question:

Is MPI_Datatype intended to describe just one instance of a structure 
(i.e. the layout of its internal, maybe not contiguous pieces)?  Or 
could it be used to describe a collection of such objects, such as a 
subset of the elements of an array, where each element is a structure?  
The second option is the potentially more interesting one for Fortran users.

Cheers,
Bill

-- 
Bill Long                                   longb at cray.com
Fortran Technical Support    &              voice: 651-605-9024
Bioinformatics Software Development         fax:   651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120

            




More information about the mpiwg-fortran mailing list