MPI_Remove_error_class(3)
π MPI_Remove_error_class π
okay bestie, welcome to the MPI manual page for MPI_Remove_error_class(3) β yes that's the real title, and yes it's a whole mood. sit down, grab a strawberry π, and let's get into it.
β¨ NAME β¨
MPI_Remove_error_class β bestie, this one removes an MPI error class from the known classes. it's giving "we don't know her anymore" but for error codes π
β¨ SYNOPSIS β¨
int MPI_Remove_error_class(int errorclass)
β¨ INPUT PARAMETERS β¨
errorclassβ the value of the error class you want to be removed. it's an integer, no cap π«Ά
β¨ THREAD AND INTERRUPT SAFETY β¨
ngl this is the part where it gets iconic in a slightly unhinged way:
this routine is thread-safe. so like, multiple threads can use it at the same time and you do not need to bring your own user-provided thread locks. she's independent, she's got it π
but β and I cannot stress this enough, bestie π β the routine is not interrupt safe. typically this is because it uses memory allocation routines like malloc or other non-MPICH runtime routines, and those are themselves not interrupt-safe. so like... don't interrupt her mid-glow-up, okay? π
β¨ NOTES FOR FORTRAN β¨
okay so for my Fortran girlies π¦:
all MPI routines in Fortran (except for MPI_WTIME and MPI_WTICK) have an additional argument ierr at the end of the argument list. ierr is an integer and it means exactly the same thing as the return value of the routine in C. in Fortran, MPI routines are subroutines, and you invoke them with the call statement. periodt.
also important: all MPI objects (like MPI_Datatype, MPI_Comm) are of type INTEGER in Fortran. yes, ALL of them. π
β¨ ERRORS β¨
so here's the vibe check on errors π₯:
all MPI routines (except MPI_Wtime and MPI_Wtick) return an error value β C routines as the value of the function, and Fortran routines in the last argument. before that value comes back to you, the current MPI error handler gets called. and by default? yeah, that error handler aborts the MPI job. like, full send, no survivors π
the error handler can be changed with:
MPI_Comm_set_errhandlerβ for communicatorsMPI_File_set_errhandlerβ for filesMPI_Win_set_errhandlerβ for RMA windows
the MPI-1 routine MPI_Errhandler_set may be used, but its use is deprecated β so like, it's giving legacy, do not recommend π
the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned instead. note that MPI does not guarantee that an MPI program can continue past an error; however, MPI implementations will attempt to continue whenever possible. she tries her best π₯Ί
the actual error values:
MPI_SUCCESSβ no error; the MPI routine completed successfully. slay β¨MPI_ERR_OTHERβ other error; useMPI_Error_stringto get more information about this error code. she's mysterious, ask her directly π
π reminder bestie: error classes are like exes. you can absolutely remove them from the known list. MPI_Remove_error_class said "not on my watch" π
and that's the whole page, fr fr. this was the man page for MPI_Remove_error_class(3) from the MPI manual collection, dated 4/10/2026 β thanks for reading, you ate that π«Άβ¨
π¦ where this page comes from
- nixos 26.05: mpich 5.0.1
- ubuntu stonking: mpich-doc 5.0.1-9 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms