MPI_WIN_COMPLETE(3)

πŸ’– MPI_WIN_COMPLETE(3) β€” the Open MPI girlies' edition πŸ’–

okay bestie, welcome to the Open MPI manual, page MPI_WIN_COMPLETE. this is a three-parter: MPI_WIN_COMPLETE(3), the Open MPI manual, and you, the main character reading it. let's GO ✨

🌸 NAME 🌸

MPI_Win_complete β€” this one completes an RMA access epoch on win that got started by a call to MPI_Win_start. that's it. that's the job. she's a closer πŸ’…


✨ SYNTAX ✨

πŸŽ€ C Syntax πŸŽ€

#include <mpi.h>

MPI_Win_complete(MPI_Win win)

πŸŽ€ Fortran Syntax πŸŽ€

USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_WIN_COMPLETE(WIN, IERROR)

πŸŽ€ Fortran 2008 Syntax πŸŽ€

USE mpi_f08
MPI_Win_complete(win, ierror)
     TYPE(MPI_Win), INTENT(IN) :: win
     INTEGER, OPTIONAL, INTENT(OUT) :: ierror

πŸ’œ INPUT PARAMETERS πŸ’œ

  • win β€” the Window object (a handle). this is the window you're completing, she's the whole point πŸͺŸ

🩷 OUTPUT PARAMETERS 🩷

  • ierror β€” Fortran only: the error status (an integer). only the Fortran girlies get this one πŸ™ˆ

πŸ¦‹ DESCRIPTION πŸ¦‹

MPI_Win_complete is a one-sided MPI communication synchronization call. she's out here completing an RMA access epoch on win that was started by a call to MPI_Win_start. no cap.

here's the tea that actually matters πŸ”₯: MPI_Win_complete enforces the completion of preceding RMA calls at the origin, and not at the target. so a put or accumulate call may not have completed at the target when it has completed at the origin. read that again, bestie, because that's the whole vibe β€” origin says "done", target says "…we'll see". 😭


πŸ’€ ERRORS πŸ’€

almost all MPI routines return an error value, bestie. C routines hand it back as the return result of the function, and Fortran routines put it in the last argument. consistency is slay.

before that error value even gets returned, the current MPI error handler associated with the communication object (like a communicator, window, or file, iykyk) is called. and if no communication object is associated with the MPI call, then the call counts as attached to MPI_COMM_SELF and will call the associated MPI error handler. when MPI_COMM_SELF is not initialized β€” like 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. that initial error handler can be changed by calling MPI_Comm_set_errhandler on MPI_COMM_SELF when you're using the World model, or by 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. periodt.

🌟 the three predefined error handlers Open MPI ships with 🌟

  • MPI_ERRORS_ARE_FATAL β€” causes the program to abort all connected MPI processes. dramatic. iconic. final. πŸ’€
  • 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 if MPI_Abort was called on that communicator. if it's called on a window or file, it acts as if MPI_Abort was called on a communicator containing the group of processes in the corresponding window or file. and if it's called on a session, it aborts only the local process. context-aware queen πŸ‘‘
  • MPI_ERRORS_RETURN β€” returns an error code to the application. the chill one 🫢

🌈 making your own error handler 🌈

MPI applications can also implement their own error handlers by calling:

  • MPI_Comm_create_errhandler then MPI_Comm_set_errhandler
  • MPI_File_create_errhandler then MPI_File_set_errhandler
  • MPI_Session_create_errhandler then MPI_Session_set_errhandler or at MPI_Session_init
  • MPI_Win_create_errhandler then MPI_Win_set_errhandler
⚠️ note that MPI does not guarantee that an MPI program can continue past an error. so like… don't count on it, bestie 😭

see the MPI man page for a full list of MPI error codes, and see the Error Handling section of the MPI-3.1 standard for more information. the lore is deep πŸ“š

See also:

  • MPI_Win_start

2003-2026, The Open MPI Community


and that's the whole page, bestie πŸ’– written by the Open MPI girlies, dated Sep 10, 2026, version 3 of the MPI_WIN_COMPLETE manual page. go complete your epoch, you absolute legend 🧚✨ slay, no cap, bye πŸ’…

πŸ“¦ where this page comes from