[Mpi3-rma] Target displacement sign issue

Jim Dinan dinan at mcs.anl.gov
Tue Sep 4 10:10:29 CDT 2012


Hi All,

This is an important issue that we need to resolve before releasing the 
3.0 spec.  Please take a look and send feedback.

Dave has voiced a concern that the implicit type conversion in my 
proposed text below may not be portable.  If anyone has more experience 
with this aspect (signed->unsigned conversion) of C/Fortran/etc type 
systems, please chime in.

  ~Jim.

On 8/28/12 2:29 PM, Jim Dinan wrote:
> Hi All,
>
> Here is the suggested change to address this issue.  In the paragraph on
> page 425, line 1, add the bracketed sentence:
>
> In the case of a window created with MPI_WIN_CREATE_DYNAMIC, the
> target_disp for all RMA functions is the address at the target; i.e.,
> the effective window_base is MPI_BOTTOM and the disp_unit is one. [Thus,
> for dynamic windows, the target_disp argument to all RMA functions in
> interpreted as unsigned.] Users should use MPI_GET_ADDRESS at the target
> process to determine the address of a target memory location and
> communicate this address to the origin process.
>
>    ~Jim.
>
> On 8/28/12 9:46 AM, Jim Dinan wrote:
>> Hi All,
>>
>> Currently, target displacements in put/get/acc/etc are defined to be
>> non-negative integers of type, MPI_Aint.  MPI_Aint is defined to be a
>> signed integer.  However, displacements associated with dynamic windows
>> are addresses (unsigned) and can range into the space of negative
>> integers.
>>
>> It seems like the least impact change would be to add a special case
>> that the displacement argument will be interpreted as unsigned for
>> dynamic windows.  Changing the interface to take an 'unsigned MPI_Aint'
>> would be the most clear (and preserve the existing and intended new
>> semantics), but would break backward compatibility.
>>
>> Interested to hear your thoughts.
>>
>>   ~Jim.



More information about the mpiwg-rma mailing list