MPI_WIN_FREE_KEYVAL(3)
π MPI_Win_free_keyval π
okay bestie, welcome to the Open MPI manual, section 3 π β this page is all about MPI_Win_free_keyval, and it does exactly one (1) thing: it frees a window keyval. that's it. that's the whole vibe. β¨
β¨ SYNTAX β¨
πΈ C Syntax
#include <mpi.h>
int MPI_Win_free_keyval(int *win_keyval)
πΈ Fortran Syntax
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_WIN_FREE_KEYVAL(WIN_KEYVAL, IERROR)
INTEGER WIN_KEYVAL, IERROR
πΈ Fortran 2008 Syntax
USE mpi_f08
MPI_Win_free_keyval(win_keyval, ierror)
INTEGER, INTENT(INOUT) :: win_keyval
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
π¦ INPUT/OUTPUT PARAMETER
win_keyvalβ the key value, and it's an integer. it'sINOUTenergy, meaning she goes in and she comes back changed. queen behavior π (integer, obviously)
π OUTPUT PARAMETER
ierrorβ Fortran only, bestie π«Ά this is the error status, and yes it's an integer.
π ERRORS
ngl this section is a whole saga, so let's get into it. literally 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. periodt.
Before that error value ever comes back to you, the current MPI error handler that's attached to the communication object (think: communicator, window, file) gets called. and if there's no communication object attached to the MPI call? then the call is considered attached to MPI_COMM_SELF, and it'll call the error handler associated with that. π
When MPI_COMM_SELF isn't initialized β that means 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. and you can change that initial error handler:
- by calling
MPI_Comm_set_errhandleronMPI_COMM_SELFwhen you're using the World model, or - via the
mpi_initial_errhandlerCLI argument tompiexec, or - via an info key to
MPI_Comm_spawn/MPI_Comm_spawn_multiple.
If no other appropriate error handler has been set, then the MPI_ERRORS_RETURN error handler is called for MPI I/O functions, and the MPI_ERRORS_ABORT error handler is called for all other MPI functions.
Open MPI ships three predefined error handlers you can use, and they're iconic tbh:
MPI_ERRORS_ARE_FATALβ causes the program to abort all connected MPI processes. yeah. all of them. πMPI_ERRORS_ABORTβ an error handler you can invoke 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. And if it's called on a session, it aborts only the local process.MPI_ERRORS_RETURNβ returns an error code to the application. polite. respectful. we love her. π
MPI applications can also implement their own error handlers by calling:
MPI_Comm_create_errhandlerand thenMPI_Comm_set_errhandlerMPI_File_create_errhandlerand thenMPI_File_set_errhandlerMPI_Session_create_errhandlerand thenMPI_Session_set_errhandler, or atMPI_Session_initMPI_Win_create_errhandlerand thenMPI_Win_set_errhandler
β οΈ heads up bestie: note that MPI does not guarantee that an MPI program can continue past an error. fr fr. no cap.
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 π
π Copyright
2003-2026, The Open MPI Community
okay that's the whole page, you ate that π
β¨ this was Open MPI, dated Sep 10, 2026, and you've been reading MPI_WIN_FREE_KEYVAL(3) π go free those keyvals, 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