MPI_Abi_get_info(3)

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

πŸ’– MPI_Abi_get_info(3) β€” the MPI manual page, bestie edition πŸ’–

okay so you're here because you want the tea on MPI_Abi_get_info, and honestly? valid. This is page 3 of the MPI manual, and I'm about to walk you through it like we're texting at 2am. 🫢


✨ NAME ✨

MPI_Abi_get_info β€” hands you back an info object stuffed with deets about the ABI. That's it, that's the whole job. πŸ‘‘


🌸 SYNOPSIS 🌸

int MPI_Abi_get_info(MPI_Info *info)

look at her. one argument. elegant. no notes. πŸ’…


πŸŽ€ OUTPUT PARAMETERS πŸŽ€

  • info β€” the ABI details info object. and what's in it? bestie, that's implementation-defined, so like… ask your MPI. I literally cannot tell you more than the spec does. πŸ€·β€β™€οΈ

πŸ”₯ THREAD AND INTERRUPT SAFETY πŸ”₯

she is thread-safe, periodt. That means multiple threads can call this routine safely with zero user-provided thread locks needed β€” no mutexes, no vibes-checking, nothing. Go off, threads. πŸ‘―β€β™€οΈ

BUT. she is not interrupt safe. And why, you ask? Typically it's because of memory allocation routines like malloc, or other non-MPICH runtime routines that are themselves not interrupt-safe. So the interrupt safety is giving "borrowed from friends who don't text back." πŸ’€


πŸ¦‹ NOTES FOR FORTRAN πŸ¦‹

Okay Fortran girlies, gather round, this one's for you. 🌈

Every MPI routine in Fortran (except for MPI_WTIME and MPI_WTICK) gets an extra argument ierr tacked onto the end of the argument list. ierr is an integer, and it means exactly the 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. Iconic, honestly.

Also! All MPI objects (e.g., MPI_Datatype, MPI_Comm) are of type INTEGER in Fortran. Yes, all of them. You're welcome. πŸ’œ


πŸ’€ ERRORS πŸ’€

okay so here's the thing β€” all MPI routines (except MPI_Wtime and MPI_Wtick) return an error value. C routines return it as the value of the function, and Fortran routines put it in that last argument we just talked about.

Before the value actually gets returned, the current MPI error handler is called. And by default? That error handler aborts the MPI job. Not dramatic of it at all. 😭 (it IS dramatic. it kills your whole job. respect it.)

You can swap that handler 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. We don't do that anymore, bestie. 🚫

If you want error values returned to you instead of everything exploding, you can use the predefined error handler MPI_ERRORS_RETURN. Very "let me handle this myself" energy. πŸ’…

⚠️ big caveat, no cap: MPI does not guarantee that an MPI program can continue past an error. However, MPI implementations will attempt to continue whenever possible. So like, fingers crossed? 🀞

Here's the error code menu:

  • MPI_SUCCESS β€” no error; the MPI routine completed successfully. we love a clean run. ✨
  • 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. the "miscellaneous" of error codes. 🫠

🌟 SEE ALSO 🌟

go read these next, they're the whole squad:

  • MPI_Abi_get_version
  • MPI_Abi_get_fortran_info

and that's the page!! ty for coming to my TED talk. this was the MPI manual, MPI_Abi_get_info(3), dated 4/10/2026 β€” so if you're reading this way after that, hey, the ABI info is still out here slaying. mwah, go compile something. πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from