MPI_Abi_get_fortran_info(3)

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

πŸ’– 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_WTIME and MPI_WTICK) have an extra argument ierr tacked on at the end of the argument list πŸ“‹
  • ierr is 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 call statement ✨
  • all MPI objects (e.g., MPI_Datatype, MPI_Comm) are of type INTEGER in 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; use MPI_Error_string to 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