MPI_Abi_get_fortran_info(3)
π MPI_Abi_get_fortran_info(3) β the MPI manual, bestie edition π
okay so you're in the MPI manual, and this little guy is MPI_Abi_get_fortran_info. it's giving "tell me everything about the Fortran ABI" energy β¨ and honestly? we love a low-key utility. let's get into it π«Ά
β¨ NAME β¨
MPI_Abi_get_fortran_info β returns an info object that's FULL of info related to the Fortran ABI π
no cap, that's the whole job. it's your girl handing you a little info bag with the Fortran ABI deets inside π
πΈ SYNOPSIS πΈ
int MPI_Abi_get_fortran_info(MPI_Info *info)
that's it. one parameter. one return value. immaculate behavior, honestly π
π¦ OUTPUT PARAMETERS π¦
infoβ Fortran ABI details info object (handle) π
she's an output parameter, meaning you pass in the spot and the routine fills it in. it's a handle β an MPI_Info β and it's holding all the Fortran ABI details. main character energy, for real π
π THREAD AND INTERRUPT SAFETY π
okay so the important part:
this routine is thread-safe π§ that means multiple threads can use it at the same time and you don't have to bring your own user-provided thread locks. we love an independent queen β¨
BUT β and this is the β¨ twist β¨ β the routine is not interrupt safe π and typically the reason is memory allocation routines like malloc, or other non-MPICH runtime routines, that are themselves not interrupt-safe. so likeβ¦ thread-safe bestie, but don't go interrupting her mid-glow-up π
ngl if you're relying on interrupts here, that's your villain origin story, fr fr π
π NOTES FOR FORTRAN π
calling all Fortran girlies π listen up:
- all MPI routines in Fortran (except for
MPI_WTIMEandMPI_WTICK) have an extra argumentierrtacked on at the end of the argument list π ierris an integer and it means the exact same thing as the return value of the routine in C π―- in Fortran, MPI routines are subroutines, and you invoke them with the
callstatement β¨ - all MPI objects (e.g.,
MPI_Datatype,MPI_Comm) are of typeINTEGERin Fortran π
so yeah, Fortran gang gets a bonus argument and a whole different invocation vibe. periodt π
π ERRORS π
buckle up, bestie, here's the error tea β
all MPI routines (except MPI_Wtime and MPI_Wtick) return an error value. C routines give it back as the value of the function; Fortran routines hand it over in that last argument. before the value comes back, the current MPI error handler is called π
by default, that error handler aborts the MPI job π dramatic, I know, but that's the default, no cap.
the error handler can be swapped out 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β¦ don't. it's giving 1994.
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. fingers crossed, bestie π€
π the error codes π
MPI_SUCCESSβ no error; the MPI routine completed successfully π slay.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 π
π₯ SEE ALSO π₯
MPI_Abi_get_infoβ¨ (your other ABI info bestie β go say hi)
and that's the whole page, babe π
written up for the MPI manual, in the version dated 4/10/2026, living under the very iconic handle MPI_Abi_get_fortran_info(3) π thanks for reading, mwah π«Άππ
π¦ 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