MPI_Abi_get_version(3)

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

✨ NAME ✨

MPI_Abi_get_version β€” bestie, this one just hands you the standard ABI version. That's it. That's the whole job. πŸ’–

(also, hi, this is page MPI_Abi_get_version(3) from the MPI manual set β€” welcome to the group chat 🫢)


πŸ’… SYNOPSIS πŸ’…

int MPI_Abi_get_version(int *abi_major, int *abi_minor)

πŸŽ€ OUTPUT PARAMETERS πŸŽ€

  • abi_major β€” the ABI major version, as an integer ✨
  • abi_minor β€” the ABI minor version, as an integer 🌸

🧡 THREAD AND INTERRUPT SAFETY 🧡

Okay so, good news first: this routine is thread-safe. What that means fr fr is you can call it from multiple threads at the same time and it will not be weird about it β€” no user-provided thread locks required, none, zero, zip. πŸ‘‘

But β€” and this is the important part, don't skip it β€” this routine is not interrupt safe. 😭 And why is that, you ask? Typically it's because of memory allocation routines like malloc or other non-MPICH runtime routines, which are themselves not interrupt-safe. So like, the danger isn't coming from this page, it's coming from the friends it hangs out with. πŸ’€


🌈 NOTES FOR FORTRAN 🌈

All MPI routines in Fortran β€” and yes, that's all of them, with exactly two exceptions, those being MPI_WTIME and MPI_WTICK β€” have an additional argument ierr tacked on at the end of the argument list. 😌 ierr is an integer, and it carries the same meaning as the return value of the routine does in C.

In Fortran, MPI routines are subroutines, and you invoke them with the call statement. Periodt.

Also, every MPI object (like MPI_Datatype, MPI_Comm, etc.) is of type INTEGER in Fortran. πŸ¦‹


πŸ’€ ERRORS πŸ’€

Strap in, here's the tea. All MPI routines (again: except MPI_Wtime and MPI_Wtick) return an error value β€” in C it's the value of the function, in Fortran it's that last argument. Before that value gets returned, the current MPI error handler is called. And by default? That error handler aborts the MPI job. 😳 Not a vibe check you want to fail.

You can change the error handler, though:

  • 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. πŸ™ˆ

If you'd rather have error values handed back to you instead of the whole job getting aborted, the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned.

⚠️ Real talk though: MPI does not guarantee that an MPI program can continue past an error. That said, MPI implementations will attempt to continue whenever possible. So it's giving "we'll try" not "we promise". πŸ’œ

Here are the error codes you might catch:

  • MPI_SUCCESS β€” No error; the MPI routine completed successfully. slay πŸ’–
  • MPI_ERR_ARG β€” Invalid argument. Some argument is invalid and is 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

okay that's the whole page bestie, you ate that 🫢✨

sign-off time: this was MPI_Abi_get_version(3) from the MPI manual, dated 4/10/2026. go get that ABI version, icon. πŸ’…πŸ‘‘

πŸ“¦ where this page comes from