MPI_T_event_get_info(3)

πŸ’– MPI_T_event_get_info β€” ok bestie, let's get you that event tea πŸ’–

So this is the page for MPI_T_event_get_info, one of the MPI tool-info interface calls. It's the one you hit up when you want the whole 411 on one specific event type β€” its name, how chatty it is, what its data looks like on the wire, all of it. ✨


🌸 NAME 🌸

MPI_T_event_get_info β€” returns additional information about a specific event type. That's it, that's the whole job bestie. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

int MPI_T_event_get_info(int event_index, char *name, int *name_len,
int *verbosity, MPI_Datatype array_of_datatypes[],
MPI_Aint array_of_displacements[], int *num_elements,
MPI_T_enum *enumtype, MPI_Info *info, char *desc,
int *desc_len, int *bind)

Yeah she's a long one. Twelve arguments. She ate and left no crumbs. πŸ’…


🌈 INPUT PARAMETERS 🌈

  • event_index β€” the index of the event type you wanna interrogate. Gotta be between 0 and num_events-1, no cap. (integer)

🫢 INPUT/OUTPUT PARAMETERS 🫢

These ones go both ways, so pay attention bestie:

  • name_len β€” length of the string and/or buffer for name. (integer)
  • num_elements β€” length of the array_of_datatypes and array_of_displacements arrays. Has to be non-negative, we don't do negative lengths here. (non-negative integer)
  • desc_len β€” length of the string and/or buffer for desc. (integer)

✨ OUTPUT PARAMETERS ✨

The good stuff, the part you actually came for:

  • name β€” buffer to return the string containing the name of the event type. (string)
  • verbosity β€” verbosity level of this event type. How loud is she? (integer)
  • array_of_datatypes β€” array of mpi basic datatypes used to encode the event data. (handle)
  • array_of_displacements β€” array of byte displacements of the elements in the event buffer. (non-negative integer)
  • enumtype β€” optional descriptor for enumeration information. (handle)
  • info β€” optional info object. (handle)
  • desc β€” buffer to return the string containing a description of the event type. (string)
  • bind β€” type of mpi object to which an event of this type must be bound. (integer)

🧚 THREAD AND INTERRUPT SAFETY 🧚

Okay so the tea on safety:

This routine is thread-safe πŸ’– β€” meaning multiple threads can use it at the same time, and you do not need to bring your own thread locks. She handles herself.

But πŸ‘€ β€” she is not interrupt safe. Why, you ask? Typically because of memory allocation routines like malloc, or other non-MPICH runtime routines that are themselves not interrupt-safe. So like, threads fine, interrupts nope. Noted. πŸ“


πŸ’€ ERRORS πŸ’€

Okay so real talk, this part matters, don't skip it:

All MPI routines (except MPI_Wtime and MPI_Wtick ) return an error value. In C routines it's the return value of the function, and in Fortran routines it's the last argument. Before that value comes back to you, the current MPI error handler gets called. By default, this error handler aborts the MPI job β€” like, full shutdown, no survivors. 😭

The error handler can be swapped out with MPI_Comm_set_errhandler (for communicators), MPI_File_set_errhandler (for files), and MPI_Win_set_errhandler (for RMA windows). There's also the MPI-1 routine MPI_Errhandler_set which can be used, but heads up β€” its use is deprecated ⚠️. The predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned instead.

Also important: MPI does not guarantee that an MPI program can continue past an error. That said, MPI implementations will attempt to continue whenever possible. Fingers crossed energy. 🀞

Here's the error code menu:

  • MPI_SUCCESS β€” No error; MPI routine completed successfully. Slay. βœ…
  • MPI_T_ERR_INVALID β€” Invalid use of the interface or bad parameter values(s). Rude of you honestly.
  • MPI_T_ERR_INVALID_INDEX β€” Index is invalid or has been deleted. She's gone, or she never existed. πŸ’€
  • MPI_T_ERR_NOT_INITIALIZED β€” The MPI tool information interface is not initialized. Gotta init first bestie!!
  • MPI_ERR_OTHER β€” Other error; use MPI_Error_string to get more information about this error code. The mysterious one. πŸ™ˆ

πŸ’Œ tiny reminder from your girl: this whole page is from the MPI manual, and the version we're looking at is dated 4/10/2026. Page title's MPI_T_event_get_info(3), section 3, library calls. That's the whole footer, folded into a cute lil sign-off instead of some boring line at the bottom. πŸ’…

Now go read those event types, bestie. You got this. πŸ‘‘πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from