[Mpi3-rma] Target displacement in dynamic windows

Hubert Ritzdorf Hubert.Ritzdorf at EMEA.NEC.COM
Tue Sep 18 05:32:02 CDT 2012


Hi,

the MPI_Auint has the problem that this doesn't work for the RMA communication interfaces and
that you have to create new interfaces for this.

I think another possibility would be to change the base address for dynamic windows to 
MPI_WIN_BASE_DYNAMIC which should be a predefined address and which could be
MPI_MAX_AINT + 1, where MPI_MAX_AINT is the maximal positive value of an MPI_Aint..

Advantages:
(*) You can address the entire memory range with the MPI_Aint (positive and negative) displacement
      No differences between Fortran and C.
      No integer overflow 
(*) Same value for Fortran and C
      Currently, you have to differentiate between dynamic windows created by C and Fortran
      with all the possible problems in mixing C and Fortran routines/functions since the base
      addresses are different.
(*) Improved scalability
      Fixed predefined value which will be (probably) the same in all processes.
      In Fortran, the value of MPI_BOTTOM (address of a global variable) can be different for
     different processes (example: MPMD applications).

Address calculations would simple (ptr = ((char *) MPI_WIN_BASE_DYNAMIC) + displacement + 1)
and could be placed into a macro for C. A function could work for Fortran.
What you need is a single additional function MPI_Get_address_dynamic() which returns
the displacement relative to MPI_WIN_BASE_DYNAMIC and not relative to MPI_BOTTOM.

Hubert

PS: I know its late. In the errata, we could replace MPI_BOTTOM by MPI_WIN_BASE_DYNAMIC and can
add the function. MPI_Get_address_dynamic() in addition to the non-negative
displacements. The MPI implementers would have the possibility to realize this and we to discuss it further.
If we stay with MPI_BOTTOM as base for dynamic windows, it's fixed.
     
________________________________________
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: Monday, September 17, 2012 11:12 PM
To: MPI 3.0 Remote Memory Access working group
Subject: [Mpi3-rma] Target displacement in dynamic windows

Hi All,

In today's meeting, we arrived at the following approach to addressing
the target displacements issue for dynamic windows:

The MPI 3.0 errata should include the following two statements:

1. For dynamic windows, the target_disp argument to RMA communication
operations is not restricted to non-negative values.

2. Users are cautioned that displacement arithmetic can overflow in
variables with MPI_Aint type and result in unexpected values on some
platforms.  This issue will be addressed in a future version of MPI.

In MPI 3.1, we will look at two possible mechanisms for providing safe
offset arithmetic:

1. MPI_Get_pointer(MPI_Aint address, void *ptr), which will allow a user
to convert between addresses and pointers.

2. MPI_Auint -- an address integer which can represent the full range of
MPI_Aint as a positive integer.  This could be an unsigned integer, but
for Fortran compatibiliy, it may need to be a singed integer that's
larger than MPI_Aint.  The following conversion functions would be provided:

MPI_Get_auint(MPI_Aint addr, MPI_Auint *uaddr)
MPI_Get_aint(MPI_Auint uaddr, MPI_Aint *addr)

Please send comments.  Thanks,

  ~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/KWlIxjc1E8DTndxI!oX7Ug!f1TOPbjCaDuFAgQbitRShm2xo8mncBFGrPZehFfPKEpz+l7IB2gbwq3xXRfv08Q==  to report this email as spam.




More information about the mpiwg-rma mailing list