[Mpi3-rma] Dynamic windows example

Pavan Balaji balaji at mcs.anl.gov
Sun Dec 5 23:08:28 CST 2010

On 12/05/2010 10:57 PM, James Dinan wrote:
> On 12/05/2010 10:29 PM, Pavan Balaji wrote:
>> On 12/05/2010 10:19 PM, James Dinan wrote:
>>>> Using MPI_BYTE in the broadcast is also not working in heterogeneous
>>>> environments (where you should also compare the sizes of MPI_Aint).
>>> Will dynamic windows be usable on such systems if processes don't agree
>>> on the size of MPI_Aint?
>> Yes. What part of the current draft is not heterogeneous-safe?
> The displacement into a dynamic window where a newly registered buffer
> will be accessed is the address of the buffer cast to an MPI_Aint.  If
> processes don't agree on the size of an address then it seems like it
> will be challenging to handle dynamic window displacements in a
> heterogeneous-safe way.  Even if the MPI implementation handles this by
> making the size of MPI_Aint large enough to accommodate all processes,
> the address arithmetic I used to get the next field from an item pointer
> will not be valid (consider a 32 bit process casting 64 bit MPI_Aint to
> llist_item_t*):
> (MPI_Aint)&(((llist_item_t*)tail_ptr.disp)->next)
> So, it seems like for the above to be heterogeneous-safe I should be
> using MPI types.

If you don't use MPI types, you are not heterogeneous-safe, irrespective 
of whether you use dynamic windows or not (or even RMA for that matter). 
This is no different from doing an MPI_Send for 4 characters and 
translating that to an integer on the remote end.

Note that MPI does not force applications to be heterogeneous safe. It 
only says that if an application wants to be portable to all systems, 
you'll need to use MPI types to ensure the sizes match.

  -- Pavan

Pavan Balaji

More information about the mpiwg-rma mailing list