MPIX_File_create_errhandler_x(3)
π MPIX_File_create_errhandler_x(3) β the MPI manual page π
okay so bestie, welcome to section 3 of the MPI manual, and today's main character is MPIX_File_create_errhandler_x. yes, that whole thing. say it with your chest. π«Ά
β¨ NAME β¨
MPIX_File_create_errhandler_x β makes you an MPI-style file errorhandler, but with a little something extra: extra_state. π
β¨ SYNOPSIS β¨
int MPIX_File_create_errhandler_x(MPIX_File_errhandler_function_x *comm_errhandler_fn_x,
MPIX_Destructor_function *destructor_fn,
void *extra_state,
MPI_Errhandler *errhandler)
πΈ INPUT PARAMETERS πΈ
comm_errhandler_fn_xβ your very own, user-defined error handling procedure, except it comes withextra_statetoo. it's a function, bestie. (function)destructor_fnβ the callback that fires when the op gets freed. clean up after yourself, queen. (function)extra_stateβ extra state. that's it. that's the tea. (None)
π OUTPUT PARAMETERS π
errhandlerβ the MPI error handler handle you're getting back. (handle)
π¦ THREAD AND INTERRUPT SAFETY π¦
this routine is thread-safe. and what that means, fr fr, is that it can be safely used by multiple threads without you needing to provide any thread locks of your own. no extra work, no stress, no drama. β¨
BUT. π₯ it is not interrupt safe. and typically that's because of memory allocation routines like malloc, or other non-MPICH runtime routines, that are themselves not interrupt-safe. so likeβ¦ stay in your lane about interrupts, okay? π
π NOTES FOR FORTRAN π
every MPI routine in Fortran (except for MPI_WTIME and MPI_WTICK) has one extra argument called ierr chilling 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.
and in Fortran? MPI routines are subroutines, and you invoke them with the call statement. that's just how it is. π
also β all MPI objects (like MPI_Datatype, MPI_Comm) are of type INTEGER in Fortran. every single one. iykyk. π
β ERRORS β
all MPI routines (except MPI_Wtime and MPI_Wtick) return an error value. C routines give it back as the value of the function, and Fortran routines put it in that last argument. before that value is returned, the current MPI error handler gets called. and by default? that error handler aborts the MPI job. π³ yes, the whole thing.
the error handler can be changed with MPI_Comm_set_errhandler (for communicators), MPI_File_set_errhandler (for files), and MPI_Win_set_errhandler (for RMA windows). the MPI-1 routine MPI_Errhandler_set may also be used, but bestie β its use is deprecated, so maybe don't. π
the predefined error handler MPI_ERRORS_RETURN can be used to make error values come back to you 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. so likeβ¦ try your best, ig. π«Ά
the error codes, bestie:
MPI_SUCCESSβ no error; the MPI routine completed successfully. slay. πMPI_ERR_ARGβ invalid argument. some argument is invalid and it isn't identified by a specific error class (e.g.,MPI_ERR_RANK).MPI_ERR_OTHERβ other error; useMPI_Error_stringto get more information about this error code.
and that's the whole page!! π§β¨ this was the MPIX_File_create_errhandler_x(3) manpage, brought to you by MPI, dated 4/10/2026, and the page name to cite in your little SEE ALSO adventures is MPIX_File_create_errhandler_x(3). periodt. πππΈ
π¦ 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