MPI_KEYVAL_FREE(3)
π MPI_Keyval_free π
okay so bestie, welcome to MPI_KEYVAL_FREE(3) β yes that's the page name, it's a whole Open MPI manual page and we're gonna get through it together π«Ά
πΈ NAME πΈ
MPI_Keyval_free β frees attribute key for communicator cache attribute.
fr fr, heads up: this routine is deprecated in favor of MPI_Comm_free_keyval.
β¨ SYNTAX β¨
π C Syntax
#include <mpi.h>
int MPI_Keyval_free(int *keyval)
π Fortran Syntax
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_KEYVAL_FREE(KEYVAL, IERROR)
INTEGER KEYVAL, IERROR
π INPUT PARAMETER π
keyvalβ frees the integer key value (integer). that's it, that's the whole input, she's simple π
π OUTPUT PARAMETER π
ierrorβ Fortran only: error status (integer).
π« DESCRIPTION π«
okay so, real talk: use of this routine is deprecated as of MPI-2. like, please just use MPI_Comm_free_keyval instead. it's giving "old faithful but we moved on" π
π 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 tuck it into the last argument. iconic behavior, honestly.
Before that error value gets returned, the current MPI error handler associated with the communication object (like a communicator, window, or file) is called. And if there's no communication object associated with the MPI call? then the call counts as attached to MPI_COMM_SELF and it'll call the associated MPI error handler. Now β when MPI_COMM_SELF is not initialized (i.e., 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. The initial error handler can be changed by calling MPI_Comm_set_errhandler on MPI_COMM_SELF when using the World model, or 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 the MPI_ERRORS_RETURN error handler is called for MPI I/O functions, and the MPI_ERRORS_ABORT error handler is called for all the other MPI functions. no cap β¨
Open MPI includes three predefined error handlers that can be used:
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 called on a communicator, it acts as ifMPI_Abortwas called on that communicator. If 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 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
note that MPI does not guarantee that an MPI program can continue past an error. like, it might just be over, that's the vibe π
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_Keyval_createMPI_Comm_create_keyvalMPI_Comm_free_keyval
π Copyright π
2003-2026, The Open MPI Community.
okay bestie that's the whole page, and lemme leave you with the receipts: this one came from Open MPI, dated Sep 10, 2026, and it's the MPI_KEYVAL_FREE(3) page. go forth and free your keyvals (the right way, with MPI_Comm_free_keyval, iykyk) πβ¨ππ¦
π¦ 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