[MPI3 Fortran] MPI Data types

Craig Rasmussen crasmussen at newmexicoconsortium.org
Thu May 7 12:33:31 CDT 2009


On May 7, 2009, at 7:39 AM, Jeff Squyres wrote:

> On May 7, 2009, at 9:29 AM, Bill Long wrote:
>
>> So, inside a wrapper C wrapper routine,  could the information  
>> available
>> in our Cdesc structure be used create the corresponding MPI datatype,
>> and then use that in the internal MPI Call?   This avoids the need  
>> for a
>> copy at all, does not require any modifications to the Request data
>> structure, and also relieves the Fortran user from creating his own  
>> MPI
>> datatype.  This sounds like the best solution yet.  (Or , maybe  
>> that's
>> been the plan all along, and I've just figured it out :) ).
>>
>
>
> That would be suitable for a Fortran value-add/add-on library.  It  
> is not suitable for the Fortran MPI bindings, unfortunately -- we  
> need to preserve pretty much a 1:1 mapping of Fortran functions to C  
> functions for the official bindings.
>
> Craig has talked about making a value-add Fortran library that would  
> do stuff like this (similar to how the Boost.MPI library did this  
> for C++).
>

I think there are two possibilities:

1. If the array descriptor passed to the MPI library is a contiguous  
array section, the library could make sure there are enough bytes  
(according to the count argument) and send the data.  Otherwise the  
library returns an error.  This is the minimal implementation.

2. If the array section is noncontiguous, the MPI library could create  
an MPI datatype and send the array.  However, this violates the C  
binding so the library will return an error.  Doing this requires a  
value-added library like Boost.

-craig




More information about the mpiwg-fortran mailing list