MPI_Abi_set_fortran_booleans(3)
π 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 FortranLOGICAL, 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_WTIMEandMPI_WTICK) gets one extra argument at the end of the argument list:ierr.ierris 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
callstatement. yes,call. we stan. - all MPI objects (like
MPI_Datatype,MPI_Comm) are of typeINTEGERin 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. useMPI_Error_stringto 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
- 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