MPI_TYPE_FREE_KEYVAL(3)
π MPI_TYPE_FREE_KEYVAL(3) π
okay so this one lives in the Open MPI manual, and it's literally just one tiny little function that cleans up after you. bestie behavior fr fr π«Ά
β¨ NAME β¨
MPI_Type_free_keyval β frees a previously created type key value. that's it, that's the whole job π
β¨ SYNTAX β¨
π C Syntax
#include <mpi.h>
int MPI_Type_free_keyval(int *type_keyval)
π Fortran Syntax
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_TYPE_FREE_KEYVAL(TYPE_KEYVAL, IERROR)
INTEGER TYPE_KEYVAL, IERROR
π Fortran 2008 Syntax
USE mpi_f08
MPI_Type_free_keyval(type_keyval, ierror)
INTEGER, INTENT(INOUT) :: type_keyval
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
β¨ INPUT/OUTPUT PARAMETER β¨
type_keyvalβ the key value you're freeing, queen. it's an integer, and yes it counts as input/output because it gets modified in the process. slay.
β¨ OUTPUT PARAMETER β¨
ierrorβ Fortran only, bestie: error status, and it's an integer. C girlies get their error as the return value instead, iykyk.
π DESCRIPTION π
soβ¦ this page is serving absolutely nothing under DESCRIPTION. like, the section exists, the heading is right there, and then β nothing. no cap. π (respect tho, it's the manual's call, not mine.)
π¨ ERRORS π¨
okay so almost every MPI routine hands you back an error value: C routines return it straight from the function, and Fortran routines put it in that last argument. periodt.
before that error value ever reaches you, the current MPI error handler attached to the communication object (think communicator, window, file) gets called. and if there's, like, no communication object attached to the MPI call at all? then the call is considered attached to MPI_COMM_SELF, and its associated MPI error handler gets called. π«
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. and you can change that initial error handler:
- call
MPI_Comm_set_errhandleronMPI_COMM_SELFwhen you're using the World model, or - use the
mpi_initial_errhandlerCLI argument tompiexec, or the info key toMPI_Comm_spawn/MPI_Comm_spawn_multiple.
and if no other appropriate error handler has been set at all? 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. bye bestie π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. very polite of it π
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, and this one's important: MPI does not guarantee that an MPI program can continue past an error. like, no promises, 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. π
see also:
MPI_Type_create_keyval
π Copyright π
2003-2026, The Open MPI Community β iconic, they've been at this for decades and we thank them for their service π«Ά
and that's the whole page, bestie! this was the Open MPI manual, page MPI_TYPE_FREE_KEYVAL(3), dated Sep 10, 2026. go free those key values, you absolute 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