MPI_WIN_FLUSH_LOCAL_ALL(3)
β¨ NAME β¨
MPI_Win_flush_local and MPI_Win_flush_local_all β they complete all outstanding RMA operations at the origin π
(the whole page lives in the Open MPI manual, bestie, that's the vibe)
π SYNTAX π
C Syntax
#include <mpi.h>
int MPI_Win_flush_local (int rank, MPI_Win win)
int MPI_Win_flush_local_all (MPI_Win win)
Fortran Syntax
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_WIN_FLUSH_LOCAL(RANK, WIN, IERROR)
INTEGER RANK, WIN, IERROR
MPI_WIN_FLUSH_LOCAL_ALL(WIN, IERROR)
INTEGER WIN, IERROR
Fortran 2008 Syntax
USE mpi_f08
MPI_Win_flush_local(rank, win, ierror)
INTEGER, INTENT(IN) :: rank
TYPE(MPI_Win), INTENT(IN) :: win
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
MPI_Win_flush_local_all(win, ierror)
TYPE(MPI_Win), INTENT(IN) :: win
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
πΈ INPUT PARAMETERS πΈ
rankβ Rank of the window, a nonnegative integer πwinβ the window object, as a handle β¨
π¦ OUTPUT PARAMETER π¦
ierrorβ Fortran only: error status, an integer π
π DESCRIPTION π
So MPI_Win_flush_local locally completes, at the origin, all the outstanding RMA operations that the calling process initiated toward the target process you named in rank, on that specified window. The way that works is: once this routine finishes, you're literally free to reuse any buffers you handed over to put, get, or accumulate operations π«Ά
And MPI_Win_flush_local_all is the glow-up version β it locally completes, at the origin, all outstanding RMA operations to all targets. Periodt π₯
Bestie, this one has a rule: it can only be called from within a passive target epoch. No notes. π
π ERRORS π
Okay so, almost all MPI routines return an error value β C routines hand it back as the return result of the function, and Fortran routines put it in the last argument. β¨
Before that error value comes back, the current MPI error handler associated with the communication object (think communicator, window, file) gets called. And if there's, like, no communication object attached to the MPI call? Then the call is considered attached to MPI_COMM_SELF and it'll call that associated MPI error handler instead. When MPI_COMM_SELF isn't initialized (that's before MPI_Init/MPI_Init_thread, after MPI_Finalize, or when you're using the Sessions Model exclusively), the error raises the initial error handler. You can change that initial error handler by calling MPI_Comm_set_errhandler on MPI_COMM_SELF when you're on the World model, or via the mpi_initial_errhandler CLI argument to mpiexec, or the info key to MPI_Comm_spawn/MPI_Comm_spawn_multiple. And if no other appropriate error handler has been set? Then MPI_ERRORS_RETURN gets called for MPI I/O functions, and MPI_ERRORS_ABORT gets called for all other MPI functions. π
Open MPI ships three predefined error handlers you can use:
MPI_ERRORS_ARE_FATALβ causes the program to abort all connected MPI processes πMPI_ERRORS_ABORTβ an error handler that can be invoked on a communicator, window, file, or session. When it's called on a communicator, it acts as ifMPI_Abortwas called on that communicator. If it's called on a window or file, it acts as ifMPI_Abortwas called on a communicator containing the group of processes in the corresponding window or file. If it's called on a session, it aborts only the local process π«ΆMPI_ERRORS_RETURNβ returns an error code to the application β¨
MPI applications can also implement their own error handlers, by calling:
MPI_Comm_create_errhandlerthenMPI_Comm_set_errhandlerMPI_File_create_errhandlerthenMPI_File_set_errhandlerMPI_Session_create_errhandlerthenMPI_Session_set_errhandleror atMPI_Session_initMPI_Win_create_errhandlerthenMPI_Win_set_errhandler
Heads up bestie: MPI does not guarantee that an MPI program can continue past an error. Not me being dramatic, that's just the truth π
See the MPI man page for a full list of MPI error codes. π
See the Error Handling section of the MPI-3.1 standard for more information. π
See also:
MPI_Win_flushMPI_Win_lockMPI_Win_lock_all
π Copyright π
2003-2026, The Open MPI Community
okay that's the whole page, no cap β this was transcribed from Open MPI's manual page MPI_WIN_FLUSH_LOCAL_ALL(3) dated Sep 10, 2026. go flush those windows, main character π¦πβ¨
π¦ where this page comes from
- ubuntu stonking: openmpi-doc 5.0.10-6 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms