MPI_T_category_get_events(3)
π MPI_T_category_get_events β the manual page, but make it cute π
okay bestie, so this is a page from the MPI manual, and it's all about MPI_T_category_get_events(3). Think of it as the lil' detective that peeks into a category and tells you which event types are living in there. no cap. π΅οΈβοΈβ¨
πΈ NAME πΈ
MPI_T_category_get_events β literally query which event types are contained in a particular category. that's it, that's the vibe. π
π SYNOPSIS π
int MPI_T_category_get_events(int cat_index, int len, int indices[])
β¨ INPUT PARAMETERS β¨
cat_indexβ the index of the category you wanna snoop on, and it's gotta be in the range $0$ and $num_cat-1$ (integer). stay in your lane, kween πlenβ the length of theindicesarray (integer). yes, the length of the array you're handing over. tell us how much room you got π«Ά
π¦ OUTPUT PARAMETERS π¦
indicesβ an integer array of sizelen, indicating event type indices (integer). this is where the answers land, bestie π
π₯ THREAD AND INTERRUPT SAFETY π₯
This routine is thread-safe. what does that mean fr fr? it means multiple threads can use it at the same time without you needing to provide any thread locks of your own. main character energy, no security detail needed π
BUT. it is not interrupt safe. and why? typically because of memory allocation routines like malloc, or other non-MPICH runtime routines β and those cuties are themselves not interrupt-safe. so yeah, don't interrupt it mid-slay π
π ERRORS π
okay here's the part where every MPI routine (except MPI_Wtime and MPI_Wtick) hands back an error value β C routines as the value of the function, Fortran routines in the last argument. and before that value comes back, the current MPI error handler gets called. by default, that error handler aborts the MPI job. periodt. π
You can swap the error handler 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 be used, but its use is deprecated π« (we don't do that anymore, bestie).
There's also the predefined error handler MPI_ERRORS_RETURN, which you can use to make error values get returned instead.
note that 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? π€
Now the error codes themselves:
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). something's off πMPI_T_ERR_INVALIDβ invalid use of the interface or bad parameter value(s).MPI_T_ERR_INVALID_INDEXβ index is invalid or has been deleted. rip to that index πͺ¦MPI_T_ERR_NOT_INITIALIZEDβ the MPI tool information interface is not initialized. you gotta turn it on first, babe πMPI_ERR_OTHERβ other error; useMPI_Error_stringto get more info about this error code. the classic "idk what happened, go look it up" π«
π«Ά SEE ALSO π«Ά
aww there's nothing down here, just vibes. go read the rest of the MPI manual, iykyk ππ
and that's the whole page, bestie! source is MPI, version/date stamped 4/10/2026, and this iconic lil doc is MPI_T_category_get_events(3) β¨π§π go forth and query those categories, you absolute legend ππ
π¦ 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