[Mpi3-rma] Target displacement sign issue

Hubert Ritzdorf Hubert.Ritzdorf at EMEA.NEC.COM
Tue Sep 4 12:22:54 CDT 2012


Hi,

MPI_Get_address returns an MPI_Aint which is signed.(integer).

C:
MPI_Aint's may be used in Reduce Operations with Min/Max
or the application can internally use min/max computations.
Can anybody guarantee that applications don't perform 
min/max operations on these displacements (which results in different
results for unsigned and signed variables) or use derived values of these
displacements in other signed/unsigned significant cases.

Fortran:
MPI_BOTTOM is a variable in a common block/module. Thus, 
MPI_Get_address might really return a signed integer (depending on the compiler).
Fortran doesn't have unsigned integers and cannot handle them.
Thus, the non-negative integer specification for target_disp in MPI_{Put/Get/Accumulate/...) 
might be incorrect for Fortran and MPI_Win_Create_dynamic().

Hubert
________________________________________
From: mpi3-rma-bounces at lists.mpi-forum.org [mpi3-rma-bounces at lists.mpi-forum.org] on behalf of Jim Dinan [dinan at mcs.anl.gov]
Sent: Tuesday, September 04, 2012 5:10 PM
To: mpi3-rma at lists.mpi-forum.org
Subject: Re: [Mpi3-rma] Target displacement sign issue

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.
_______________________________________________
mpi3-rma mailing list
mpi3-rma at lists.mpi-forum.org
http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-rma


 Click https://www.mailcontrol.com/sr/O6SiJI5AP4bTndxI!oX7Up2F0f+S6NySj!qlvEoKFyZNTFyVkk9WjRzJbmnfHdyw83VGVWKbSfC8ewgPpp7kgg==  to report this email as spam.




More information about the mpiwg-rma mailing list