MPI_T_CATEGORY_GET_INFO(3)
π MPI_T_CATEGORY_GET_INFO
okay so bestie, we're looking at MPI_T_CATEGORY_GET_INFO(3) from the Open MPI manual, and honestly? this one's a little cutie. it's the function that pulls info out of a category in the MPI Tools interface π
β¨ SYNTAX β¨
C Syntax
#include <mpi.h>
int MPI_T_category_get_info(int cat_index, char *name, int *name_len,
char *desc, int *desc_len, int *num_cvars, int *num_pvars,
int *num_categories)
πΈ INPUT PARAMETERS πΈ
cat_indexβ the index of the category you're tryna query. that's the one you're asking about π
π¦ INPUT/OUTPUT PARAMETERS π¦
name_lenβ length of the string and/or buffer forname. it goes in, and it comes back out changed, iykyk πdesc_lenβ length of the string and/or buffer fordesc. same deal, in and out π«Ά
β OUTPUT PARAMETERS β
nameβ buffer where the string containing the name of the category gets returned β¨descβ buffer where the string containing the description of the category gets returned πnum_cvarsβ number of control variables in the category π₯num_pvarsβ number of performance variables in the category β‘num_categoriesβ number of categories contained in the category (categories in categories, we love a nested moment π)
π DESCRIPTION π
so MPI_T_category_get_info can be used to query information from a category. literally what it says on the tin π
the function returns the number of control variables, performance variables, and sub-categories in the queried category in the arguments num_cvars, num_pvars, and num_categories, respectively. three numbers, one call, slay.
π§ NOTES π§
this MPI tool interface function returns two strings, which is lowkey the spicy part πΆοΈ this function takes two arguments for each string: a buffer to store the string, and a length which must initially specify the size of the buffer.
if the length passed is n then this function will copy at most n - 1 characters of the string into the corresponding buffer and set the length to the number of characters copied - 1.
if the length argument is NULL or the value specified in the length is 0, the corresponding string buffer is ignored and the string is not returned. no buffer, no string, no drama π
π ERRORS π
MPI_T_category_get_info will fail if:
MPI_T_ERR_NOT_INITIALIZEDβ the MPI Tools interface not initialized π (bestie please init it first)MPI_T_ERR_INVALID_INDEXβ the category index is invalid π
π COPYRIGHT π
2003-2026, The Open MPI Community
and that's the whole page, no cap π«Άπ source/version is Open MPI, dated Sep 11, 2026, and this lil manual was MPI_T_CATEGORY_GET_INFO(3) β go query those categories, bestie, and ate β¨π
π¦ where this page comes from
- arch rolling: openmpi 5.0.11-1 Β· BSD-3-Clause AND LicenseRef-MPICH
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms