[Mpi3-rma] MPI_Win_allocate_shared and Win_free
Hubert.Ritzdorf at EMEA.NEC.COM
Fri Jan 18 07:26:13 CST 2013
I have a question to the memory allocated in MPI_Win_allocate_shared.
What happens if (see also pseudo code below)
(*) the allocated memory is used in another MPI_Win_create and
(*) the window created by MPI_Win_allocate_shared is freed and
(*) the user program still works with the allocates shared memory
before the window created by MPI_Win_create is freed ?
MPI 3.0, page 415, lines 6-8 specifies:
If the window was created with MPI_WIN_ALLOCATE_SHARED,
MPI_WIN_FREE will free the window memory that was allocated
Thus main question:
(a) Should the corresponding program fail or
(b) should the program work correctly (i..e. the MPI library recognizes
that the memory is still used in another window) and the shared memory
is freed when the window created by MPI_Win_create is freed ?
------- Pseudo code -------
MPI_Win_allocate_shared (shared_size, disp_unit, shared_info, comm,
MPI_Win_create (shared_baseptr, shared_size, disp_unit,
info2, comm, &win2);
/* Non-concurrent work/communication window shared_win */
/* Non-concurrent communication on window win2 */
/* Free window shared_win;
Is shared_baseptr really deallocated in MPI_Win_free
as defined on page 415 lines 6-8 ? */
/* Work on window win2 */
/* Free window win2;
Is shared_baseptr deallocated in following MPI_Win_free */
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mpiwg-rma