MPI_Abi_set_fortran_booleans(3)

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

πŸ’– MPI_Abi_set_fortran_booleans β€” bestie edition πŸ’–

okay so welcome to the MPI manual, babe. today's hyperfixation is MPI_Abi_set_fortran_booleans(3) and honestly? she's a niche queen and we love her for it. πŸ’…


✨ NAME ✨

MPI_Abi_set_fortran_booleans β€” sets the Fortran logical type size and the values that count as .TRUE. and .FALSE. πŸŽ€


🌸 SYNOPSIS 🌸

int MPI_Abi_set_fortran_booleans(int logical_size, void *logical_true,
       void *logical_false)

like. she takes three things and she does her little thing. periodt. ✨


πŸ¦‹ INPUT PARAMETERS πŸ¦‹

  • logical_size β€” the size of a Fortran LOGICAL, in bytes (it's an integer, bestie)
  • logical_true β€” the Fortran literal value .TRUE. (a logical, obviously)
  • logical_false β€” the Fortran literal value .FALSE. (yes, this one too)

🧚 THREAD AND INTERRUPT SAFETY 🧚

okay so the good news first: this routine is thread-safe. that means multiple threads can run it at the same time and you do not need to bring your own thread locks, no cap. 🫢

the not-so-good news: she is not interrupt safe. typically this is because of memory allocation routines like malloc, or other non-MPICH runtime routines that are themselves not interrupt-safe. so like… interrupt at your own risk, babe. 😭


πŸ’œ NOTES FOR FORTRAN πŸ’œ

  • every MPI routine in Fortran (except for the iconic duo MPI_WTIME and MPI_WTICK) gets one extra argument at the end of the argument list: ierr. ierr is an integer and it means exactly the same thing as the return value of the routine in C. iykyk. πŸ’…
  • in Fortran, MPI routines are subroutines, and you invoke them with the call statement. yes, call. we stan.
  • all MPI objects (like MPI_Datatype, MPI_Comm) are of type INTEGER in Fortran. that's just the vibe.

⭐ ERRORS ⭐

so basically every MPI routine (except MPI_Wtime and MPI_Wtick) hands back an error value β€” C routines return it as the value of the function, and Fortran routines put it in that last argument. before the value comes back, the current MPI error handler gets called. πŸ“ž

by default, that error handler aborts the entire MPI job. like, the whole thing. gone. πŸ’€

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 also be used, but heads up β€” its use is deprecated. πŸ™ˆ

and if you're the type who wants error values returned instead of the whole program going poof, there's the predefined error handler MPI_ERRORS_RETURN. slay. πŸ’…

also important, and I need you to hear me on this: MPI does not guarantee that an MPI program can keep going after an error. however, MPI implementations will attempt to continue whenever possible. so… she'll try her best, bestie. πŸ₯Ί

the error codes:

  • MPI_SUCCESS β€” no error, everything ate, the routine completed successfully. πŸ‘‘
  • 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 info about this error code. she's vague on purpose. 😭

and that's the whole page, bestie!! now go forth and set those Fortran booleans, main character energy only. 🌈✨

this was the MPI manual manpage for MPI_Abi_set_fortran_booleans, dated 4/10/2026 πŸ’– mwah, love u, bye 🫢

πŸ“¦ where this page comes from