MPI_T_event_callback_set_info(3)

✨ MPI_T_event_callback_set_info ✨

okay bestie, so this is the tea: MPI_T_event_callback_set_info is the MPI tool-interface girly whose whole job is updating the hints of the callback function you already registered πŸ’… and like, specifically the callback registered for the callback safety level that cb_safety picks out, on the event-registration handle that goes with event_registration. it's giving "change of plans, bestie" energy, and honestly? we love that for her πŸŽ€

this page lives in the MPI manual, section 3 πŸ¦‹


🌸 SYNOPSIS 🌸

int MPI_T_event_callback_set_info(MPI_T_event_registration event_registration,
       MPI_T_cb_safety cb_safety, MPI_Info info)

like, that's the whole summoning ritual, no cap ✨


πŸ’– INPUT PARAMETERS πŸ’–

  • event_registration β€” the event registration, aka a handle 🫢
  • cb_safety β€” the callback safety level, and she's an integer babe πŸ”’
  • info β€” the info object, which is also a handle πŸ“‹

🧡 THREAD AND INTERRUPT SAFETY 🧡

okay so this routine is thread-safe, periodt πŸ’… that means multiple threads can use it at the same time and you do not need to bring your own user-provided thread locks, she handles herself fr fr 🫢

but 😭 she is not interrupt safe. and the reason is typically giving memory allocation routines β€” stuff like malloc, or other non-MPICH runtime routines β€” which are themselves not interrupt-safe. so like, don't be out here interrupting her mid-glow-up, iykyk πŸ’€


πŸ’€ ERRORS πŸ’€

okay so all MPI routines (except MPI_Wtime and MPI_Wtick) return an error value β€” C routines hand it back as the value of the function, and Fortran routines put it in the last argument πŸ“Œ before that value comes back, the current MPI error handler gets called. and by default, that error handler aborts the MPI job 😭 dramatic much?

the error handler can be changed with MPI_Comm_set_errhandler (for communicators), MPI_File_set_errhandler (for files), and MPI_Win_set_errhandler (for RMA windows) ✨ the MPI-1 routine MPI_Errhandler_set may be used but its use is deprecated β€” so like, she's retired bestie, don't πŸ‘‘ the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned 🫢

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, fingers crossed πŸ“

here's the full error roster, no skipping any of them, we don't do that here:

  • MPI_SUCCESS β€” no error; the MPI routine completed successfully πŸŽ‰ slay.
  • MPI_ERR_INFO β€” invalid Info πŸ™ˆ
  • MPI_T_ERR_INVALID_HANDLE β€” the handle is invalid πŸ’€
  • MPI_T_ERR_NOT_INITIALIZED β€” the MPI tool information interface is not initialized 😭
  • MPI_ERR_OTHER β€” other error; use MPI_Error_string to get more information about this error code 🧚

that's the whole page bestie, you ate this 🍽️✨

mwah πŸ’– this was the MPI implementation's manual page, version date 4/10/2026, filed under section 3 as MPI_T_event_callback_set_info(3) β€” go forth and set those callback infos, queen πŸ‘‘

πŸ“¦ where this page comes from