I have two questions regarding using mpi shared memory communication
1) If I have a MPI rank which is the only one that writes to a window, is it necessary to employ mpi_win_lock, and mpi_win_unlock? I know that my application would never have others trying to write to that window. They only read the content of the window, and I make sure that they read after a MPI_BARRIER, so the content of the window has been updated.
2) In my application I have one MPI rank, which allocates a shared window that needs to be read by 1:N other MPI ranks.
MPI rank 1 shall only read: rma(1:10)
MPI rank 2 shall only read rma(11:20)
MPI rank N shall only read rma(10*(N-1)+1:10*N)
Currently, all 1 to N ranks are querying the whole shared window, i.e. the size "10*N" with MPI_WIN_SHARED_QUERY.
I am asking if it is possible to apply the MPI_WIN_SHARED_QUERY function such that MPI rank 1 only can access the window from 1:10 and rank 2 from 11:20 etc.
In this way, each rank has a local accessing from 1:10 but they refer to different chunks of the shared window? Is this possible?