MPI_Abi_get_version(3)
β¨ NAME β¨
MPI_Abi_get_version β bestie, this one just hands you the standard ABI version. That's it. That's the whole job. π
(also, hi, this is page MPI_Abi_get_version(3) from the MPI manual set β welcome to the group chat π«Ά)
π SYNOPSIS π
int MPI_Abi_get_version(int *abi_major, int *abi_minor)
π OUTPUT PARAMETERS π
abi_majorβ the ABI major version, as an integer β¨abi_minorβ the ABI minor version, as an integer πΈ
π§΅ THREAD AND INTERRUPT SAFETY π§΅
Okay so, good news first: this routine is thread-safe. What that means fr fr is you can call it from multiple threads at the same time and it will not be weird about it β no user-provided thread locks required, none, zero, zip. π
But β and this is the important part, don't skip it β this routine is not interrupt safe. π And why is that, you ask? Typically it's because of memory allocation routines like malloc or other non-MPICH runtime routines, which are themselves not interrupt-safe. So like, the danger isn't coming from this page, it's coming from the friends it hangs out with. π
π NOTES FOR FORTRAN π
All MPI routines in Fortran β and yes, that's all of them, with exactly two exceptions, those being MPI_WTIME and MPI_WTICK β have an additional argument ierr tacked on at the end of the argument list. π ierr is an integer, and it carries the same meaning as the return value of the routine does in C.
In Fortran, MPI routines are subroutines, and you invoke them with the call statement. Periodt.
Also, every MPI object (like MPI_Datatype, MPI_Comm, etc.) is of type INTEGER in Fortran. π¦
π ERRORS π
Strap in, here's the tea. All MPI routines (again: except MPI_Wtime and MPI_Wtick) return an error value β in C it's the value of the function, in Fortran it's that last argument. Before that value gets returned, the current MPI error handler is called. And by default? That error handler aborts the MPI job. π³ Not a vibe check you want to fail.
You can change the error handler, though:
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. π
If you'd rather have error values handed back to you instead of the whole job getting aborted, the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned.
β οΈ Real talk though: MPI does not guarantee that an MPI program can continue past an error. That said, MPI implementations will attempt to continue whenever possible. So it's giving "we'll try" not "we promise". π
Here are the error codes you might catch:
MPI_SUCCESSβ No error; the MPI routine completed successfully. slay πMPI_ERR_ARGβ Invalid argument. Some argument is invalid and is 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. π
π SEE ALSO π
MPI_Abi_get_info
okay that's the whole page bestie, you ate that π«Άβ¨
sign-off time: this was MPI_Abi_get_version(3) from the MPI manual, dated 4/10/2026. go get that ABI version, icon. π
π
π¦ 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