[mpich-discuss] Issues with shared memory window

Balaji, Pavan balaji at anl.gov
Sat Jul 26 18:38:51 CDT 2014

On Jul 26, 2014, at 4:49 PM, Jonathan A Blair <qbit at utexas.edu> wrote:
> Do either of you know why MPI_Win_shared_query() requires the MPI_Win variable to exist prior to allocating the space (or can point me to an appropriate resource)?

I’m not sure what you mean here.  The variable needs to exist, otherwise the compiler will throw an error.  I think what you mean is, do you need to allocate storage to the variable before calling the function?  No, you should not.

> The point of allocating shared memory was to remove all instances of synchronization except initialization. I'm never doing MPI RMA via MPI calls - I'm opting to use direct access. This is particularly important for my application, since it is a hybrid between memory bound functions and CPU bound functions.

You still need Win_sync’s.  Those are for ensuring memory access ordering.  Even if your program seems to be working correctly, it’s technically wrong.

  — Pavan

Pavan Balaji  ✉️

More information about the discuss mailing list