MPI_ATTR_DELETE(3)
π MPI_ATTR_DELETE π
okay bestie, so this one is an oldie from the Open MPI manual pages, and I need you to sit down for this one because it's giving legacy code energy fr fr.
β¨ SYNTAX β¨
πΈ C Syntax
#include <mpi.h>
int MPI_Attr_delete(MPI_Comm comm, int keyval)
π Fortran Syntax
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_ATTR_DELETE(COMM, KEYVAL, IERROR)
INTEGER COMM, KEYVAL, IERROR
π INPUT PARAMETERS π
commβ the communicator that the attribute is attached to (it's a handle, bestie).keyvalβ the key value of the attribute you're deleting (an integer, yes ma'am).
π«Ά OUTPUT PARAMETER π«Ά
ierrorβ Fortran only: the error status (integer). The C girlies get it as a return value instead, iykyk.
π DESCRIPTION π
okay so here's the tea π΅ β using this routine is deprecated as of MPI-2, and it was deleted in MPI-3. like, fully gone. so please, for the love of everything, use MPI_Comm_delete_attr instead.
π¨ also important: this function does not have an mpi_f08 binding. not a vibe, just a fact.
π 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 drop it in the last argument. periodt.
Before that error value makes its way back to you, the current MPI error handler associated with the communication object (think: communicator, window, file) gets called. And if there's no communication object associated with the MPI call? Then the call is considered attached to MPI_COMM_SELF and it'll call the associated MPI error handler. π«
When MPI_COMM_SELF is not 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. The initial error handler can be changed by:
- calling
MPI_Comm_set_errhandleronMPI_COMM_SELFwhen you're using the World model, or - the
mpi_initial_errhandlerCLI argument tompiexec, or - the info key to
MPI_Comm_spawn/MPI_Comm_spawn_multiple.
If no other appropriate error handler has been set, then MPI_ERRORS_RETURN is the one that 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 β
MPI_ERRORS_ARE_FATALβ causes the program to abort all connected MPI processes. like everyone. gone. π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 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. the chill one.
π§ but wait, you can also make your own π§
MPI applications can 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
β οΈ real talk: note that MPI does not guarantee that an MPI program can continue past an error. so don't get cute with it.
See the MPI man page for a full list of MPI error codes, and the Error Handling section of the MPI-3.1 standard for more information. π
π See also:
MPI_Comm_delete_attr
Copyright π
2003-2026, The Open MPI Community
and that's the whole page, bestie!! hope she slays for you πβ¨ this was the Open MPI MPI_ATTR_DELETE(3) page, dated Sep 10, 2026 β go forth and use MPI_Comm_delete_attr instead, mwah π«Άπ
π¦ 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