MPI_Abi_get_info(3)
π MPI_Abi_get_info(3) β the MPI manual page, bestie edition π
okay so you're here because you want the tea on MPI_Abi_get_info, and honestly? valid. This is page 3 of the MPI manual, and I'm about to walk you through it like we're texting at 2am. π«Ά
β¨ NAME β¨
MPI_Abi_get_info β hands you back an info object stuffed with deets about the ABI. That's it, that's the whole job. π
πΈ SYNOPSIS πΈ
int MPI_Abi_get_info(MPI_Info *info)
look at her. one argument. elegant. no notes. π
π OUTPUT PARAMETERS π
infoβ the ABI details info object. and what's in it? bestie, that's implementation-defined, so likeβ¦ ask your MPI. I literally cannot tell you more than the spec does. π€·ββοΈ
π₯ THREAD AND INTERRUPT SAFETY π₯
she is thread-safe, periodt. That means multiple threads can call this routine safely with zero user-provided thread locks needed β no mutexes, no vibes-checking, nothing. Go off, threads. π―ββοΈ
BUT. she is not interrupt safe. And why, you ask? Typically it's because of memory allocation routines like malloc, or other non-MPICH runtime routines that are themselves not interrupt-safe. So the interrupt safety is giving "borrowed from friends who don't text back." π
π¦ NOTES FOR FORTRAN π¦
Okay Fortran girlies, gather round, this one's for you. π
Every MPI routine in Fortran (except for MPI_WTIME and MPI_WTICK) gets an extra argument ierr tacked onto 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. Iconic, honestly.
Also! All MPI objects (e.g., MPI_Datatype, MPI_Comm) are of type INTEGER in Fortran. Yes, all of them. You're welcome. π
π ERRORS π
okay so here's the thing β all MPI routines (except MPI_Wtime and MPI_Wtick) return an error value. C routines return it as the value of the function, and Fortran routines put it in that last argument we just talked about.
Before the value actually gets returned, the current MPI error handler is called. And by default? That error handler aborts the MPI job. Not dramatic of it at all. π (it IS dramatic. it kills your whole job. respect it.)
You can swap that handler out 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 also be used, but heads up: its use is deprecated. We don't do that anymore, bestie. π«
If you want error values returned to you instead of everything exploding, you can use the predefined error handler MPI_ERRORS_RETURN. Very "let me handle this myself" energy. π
β οΈ big caveat, no cap: MPI does not guarantee that an MPI program can continue past an error. However, MPI implementations will attempt to continue whenever possible. So like, fingers crossed? π€
Here's the error code menu:
MPI_SUCCESSβ no error; the MPI routine completed successfully. we love a clean run. β¨MPI_ERR_ARGβ invalid argument. some argument is invalid and it's not 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. the "miscellaneous" of error codes. π«
π SEE ALSO π
go read these next, they're the whole squad:
MPI_Abi_get_versionMPI_Abi_get_fortran_info
and that's the page!! ty for coming to my TED talk. this was the MPI manual, MPI_Abi_get_info(3), dated 4/10/2026 β so if you're reading this way after that, hey, the ABI info is still out here slaying. mwah, go compile something. πβ¨ππ¦
π¦ 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