MPI_T_CATEGORY_GET_INFO(3)

πŸ’– MPI_T_CATEGORY_GET_INFO πŸ’–

okay bestie, welcome to MPI_T_CATEGORY_GET_INFO(3) from the Open MPI manual πŸ’… this one lives in section 3 of the man pages and it's literally your little spyglass for looking inside an MPI Tools category. no cap.


✨ NAME ✨

MPI_T_category_get_info β€” query information from a category πŸ•΅οΈβ™€οΈ


🌸 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 trying to query. like, which category are we snooping on, bestie? πŸ‘€

πŸ¦‹ INPUT/OUTPUT PARAMETERS πŸ¦‹

  • name_len β€” length of the string and/or buffer for name. it goes in as the size and comes back as something else, it's giving main character energy ✨
  • desc_len β€” length of the string and/or buffer for desc. same deal, it's a two-way street 🫢

🌈 OUTPUT PARAMETERS 🌈

  • name β€” buffer to return the string containing the name of the category.
  • desc β€” buffer to return the string containing the description of the category.
  • num_cvars β€” number of control variables in the category. count 'em πŸ’…
  • num_pvars β€” number of performance variables in the category.
  • num_categories β€” number of categories contained in the category. yes, categories inside categories, it's nesting season πŸͺΊ

πŸ’œ DESCRIPTION πŸ’œ

MPI_T_category_get_info is what you call when you wanna query information from a category. it hands back the number of control variables, performance variables, and sub-categories in the queried category through num_cvars, num_pvars, and num_categories, respectively. three little counters, one iconic function. periodt. πŸ‘‘


⭐ NOTES ⭐

okay so this is the part you actually need to read, bestie, don't skip it πŸ™ˆ

This MPI tool interface function returns two strings. And for each string it takes two arguments: a buffer to store the string, and a length which must initially specify the size of the buffer.

Here's the tea β˜• β€” if the length you pass is n, then this function will copy at most n - 1 characters of the string into the corresponding buffer, and it sets the length to the number of characters copied - 1.

And if the length argument is NULL, or the value specified in the length is 0, then the corresponding string buffer is just ignored and the string is not returned at all. so if you're not feeling that string today, you can absolutely skip it πŸ’…


πŸ’€ ERRORS πŸ’€

MPI_T_category_get_info will fail if:

  • MPI_T_ERR_NOT_INITIALIZED β€” the MPI Tools interface not initialized. like girl, you gotta init first 😭
  • MPI_T_ERR_INVALID_INDEX β€” the category index is invalid. that index is not a real one, bestie, it's giving ghost πŸ‘»

2003-2026, The Open MPI Community πŸ’–


and that's the whole page, no cap. this was pulled from the Open MPI manual, dated Sep 10, 2026, and it lives at MPI_T_CATEGORY_GET_INFO(3). slay, go query some categories, you absolute legend πŸ¦‹βœ¨πŸŽ€

πŸ“¦ where this page comes from