MPI_Remove_error_class(3)

πŸ“¦
version 5.0.1 Β· 4 versions
, in nixos 26.05, ubuntu stonking

πŸ’– 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 communicators
  • MPI_File_set_errhandler β€” for files
  • MPI_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; use MPI_Error_string to 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