[MPI3 Fortran] MPI Data types
Hubert Ritzdorf
ritzdorf at it.neclab.eu
Fri May 8 03:37:03 CDT 2009
Bill Long wrote:
>
>
> 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.
>
The MPI derived datatype is intended to describe any data layout
(within the memory) to be transferred and is not
restricted to the Fortran array. Thus, the Fortran user can transfer
data for the first and second option.
Hubert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3245 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.mpi-forum.org/pipermail/mpiwg-fortran/attachments/20090508/7ffb0729/attachment-0001.bin>
More information about the mpiwg-fortran
mailing list