13.5.4. Flush and Sync

PreviousUpNext
Up: Synchronization Calls Next: Assertions Previous: Lock

All flush and sync functions can be called only within passive target epochs.

MPI_WIN_FLUSH(rank, win)
IN rankrank of target MPI process in the group of the window win (non-negative integer)
IN winwindow object (handle)
C binding
int MPI_Win_flush(int rank, MPI_Win win)
Fortran 2008 binding
MPI_Win_flush(rank, win, ierror)

INTEGER, INTENT(IN) :: rank
TYPE(MPI_Win), INTENT(IN) :: win
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_WIN_FLUSH(RANK, WIN, IERROR)

INTEGER RANK, WIN, IERROR

All outstanding RMA operations on win initiated by the MPI process calling this procedure to the target with rank in the group of the specified window will have completed when MPI_WIN_FLUSH returns. The operations are completed both at the origin and at the target.

MPI_WIN_FLUSH_ALL(win)
IN winwindow object (handle)
C binding
int MPI_Win_flush_all(MPI_Win win)
Fortran 2008 binding
MPI_Win_flush_all(win, ierror)

TYPE(MPI_Win), INTENT(IN) :: win
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_WIN_FLUSH_ALL(WIN, IERROR)

INTEGER WIN, IERROR

All RMA operations initiated by the MPI process calling this procedure to any target on the specified window prior to this call will have completed both at the origin and at the target when MPI_WIN_FLUSH_ALL returns.

MPI_WIN_FLUSH_LOCAL(rank, win)
IN rankrank of target MPI process in the group of the window win (non-negative integer)
IN winwindow object (handle)
C binding
int MPI_Win_flush_local(int rank, MPI_Win win)
Fortran 2008 binding
MPI_Win_flush_local(rank, win, ierror)

INTEGER, INTENT(IN) :: rank
TYPE(MPI_Win), INTENT(IN) :: win
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_WIN_FLUSH_LOCAL(RANK, WIN, IERROR)

INTEGER RANK, WIN, IERROR

All outstanding RMA operations initiated on win by the MPI process calling this procedure to the target with rank in the group of the specified window will have completed at the origin when MPI_WIN_FLUSH_LOCAL returns. For example, after this procedure returns, the user may reuse any buffers provided to put, get, or accumulate operations.

MPI_WIN_FLUSH_LOCAL_ALL(win)
IN winwindow object (handle)
C binding
int MPI_Win_flush_local_all(MPI_Win win)
Fortran 2008 binding
MPI_Win_flush_local_all(win, ierror)

TYPE(MPI_Win), INTENT(IN) :: win
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_WIN_FLUSH_LOCAL_ALL(WIN, IERROR)

INTEGER WIN, IERROR

All RMA operations initiated by the MPI process calling this procedure to any target on the specified window prior to this call will have completed at the origin when MPI_WIN_FLUSH_LOCAL_ALL returns.

MPI_WIN_SYNC(win)
IN winwindow object (handle)
C binding
int MPI_Win_sync(MPI_Win win)
Fortran 2008 binding
MPI_Win_sync(win, ierror)

TYPE(MPI_Win), INTENT(IN) :: win
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_WIN_SYNC(WIN, IERROR)

INTEGER WIN, IERROR

For windows in the separate memory model, a call to MPI_WIN_SYNC synchronizes the private and public window copies of win at the calling MPI process, as described in Section Semantics and Correctness.

In the unified memory model, MPI_WIN_SYNC may be used to order load and store accesses to shared memory and to ensure visibility of store updates in shared memory for other threads and MPI processes.

A call to MPI_WIN_SYNC does not open or close an epoch and does not complete any pending RMA operations. A call to MPI_WIN_SYNC does not guarantee progress of any pending MPI operation.


PreviousUpNext
Up: Synchronization Calls Next: Assertions Previous: Lock


Return to MPI-4.1 Standard Index
Return to MPI Forum Home Page

(Unofficial) MPI-4.1 of November 2, 2023
HTML Generated on November 19, 2023