MPI_T_source_get_info(3)
π MPI_T_source_get_info β bestie edition π
okay so this is a page from the MPI manual (section 3, the library-calls girlies) and it's all about MPI_T_source_get_info. buckle up π
β¨ NAME β¨
MPI_T_source_get_info β the lil function that returns additional information on the source identified by the source_index argument. that's it. that's the job. π«Ά
πΈ SYNOPSIS πΈ
int MPI_T_source_get_info(int source_index, char *name, int *name_len,
char *desc, int *desc_len,
MPI_T_source_order *ordering,
MPI_Count *ticks_per_second, MPI_Count *max_ticks,
MPI_Info *info)
look at her. eight arguments. she's doing the MOST and honestly? iconic. π
π¦ INPUT PARAMETERS π¦
source_indexβ the index of the source you wanna interrogate, and it has to be somewhere between0andnum_sources-1(integer). stay in your lane, bestie, this is a bounded range π
π« INPUT/OUTPUT PARAMETERS π«
these ones go both ways, no cap:
name_lenβ the length of the string and/or buffer forname(integer)desc_lenβ the length of the string and/or buffer fordesc(integer)
π OUTPUT PARAMETERS π
the goodies she hands back to you:
nameβ buffer to return the string containing the name of the source (string)descβ buffer to return the string containing the description of the source (string)orderingβ flag indicating chronological ordering guarantees given by the source (integer). it's giving order β¨ticks_per_secondβ the number of ticks per second for the timer of this source (integer)max_ticksβ the maximum count of ticks reported by this source before overflow occurs (integer). yes, overflow. she has limits, and that's valid π«Άinfoβ info argument (handle)
π THREAD AND INTERRUPT SAFETY π
good news first: this routine is thread-safe. that means it may be safely used by multiple threads with no user-provided thread locks needed. no mutexes, no stress, we love a low-maintenance queen π
but bestieβ¦ she is not interrupt safe. typically this is because of memory allocation routines like malloc or other non-MPICH runtime routines that are themselves not interrupt-safe. so don't interrupt her mid-glow-up π
π ERRORS π
okay so ALL MPI routines (except MPI_Wtime and MPI_Wtick) return an error value β C routines give it 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. by default, this error handler aborts the MPI job. yes, straight up aborts. dramatic but that's her vibe.
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 β like, we don't do that anymore, okay? π 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 likeβ¦ good luck but no promises π
and here's the error code lineup:
MPI_SUCCESSβ No error; MPI routine completed successfully. slay, we ate πMPI_T_ERR_INVALIDβ Invalid use of the interface or bad parameter values(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.MPI_ERR_OTHERβ Other error; useMPI_Error_stringto get more information about this error code.
π SEE ALSO π
nothing listed here, bestie β this page is a solo main character. periodt. β¨
this was pulled from the MPI manual, MPI_T_source_get_info(3), dated 4/10/2026 β mwah, tysm for reading, go query those sources responsibly π«Άπ
π¦ 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