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 for name. it goes in, and it comes back out changed, iykyk πŸ‘€
  • desc_len β€” length of the string and/or buffer for desc. 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 πŸ’€

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