[mpiwg-rma] [EXTERNAL] Re: Synchronization on shared memory windows
Barrett, Brian W
bwbarre at sandia.gov
Tue Feb 4 11:06:02 CST 2014
On 2/4/14 9:59 AM, "Rolf Rabenseifner" <rabenseifner at hlrs.de> wrote:
>thank you for the MPI_FREE_MEM hint. Yes, I'll fix it in my examples.
>About the synchronization problems:
>If I use shared memory windows and direct remote load and store
>instead of the RMA functions PUT or GET,
>is it then correct, when I never use MPI_WIN-synchronization routines?
>I would expect this, because in the unified RMA modell,
>the load and store accesses to the neighbors memory are done
>directly and MPI is not involved.
>Because of the unified RMA modell (must be for shared memory windows),
>there should be no need for cache flush routines.
No. Maybe. Sometimes.
Basically, unified is saying that the memory has the same eventually
completeness that users have come to expect with shared memory
programming. But what users have come to expect depends on the
architecture and the programming language. So in some processor /
language / compiler combinations, you might not need any synchronization.
In other combinations, you might need compiler or processor memory
barriers in your code. MPI guarantees, however, that MPI_WIN_SYNC will
implement whatever compiler / processor memory barriers you need, so it
can be used as the portable hammer in your toolchest of shared memory
If you're only using load/stores in shared memory windows, you should not
need the other synchronization routines (FLUSH, etc.).
Brian W. Barrett
Scalable System Software Group
Sandia National Laboratories
More information about the mpiwg-rma