MPI_T_ENUM_GET_INFO(3)

✨ NAME ✨

MPI_T_enum_get_info β€” Query information about an enumerator. Okay so this is the Open MPI manual page for MPI_T_ENUM_GET_INFO(3), and yes bestie, it’s giving β€œtiny tool-interface function with big main character energy.” πŸ’…


πŸ› οΈ SYNTAX πŸ› οΈ

C Syntax

#include <mpi.h>

int MPI_T_enum_get_info(MPI_T_enum enumtype, int *num, char *name, int *name_len)

πŸ“₯ INPUT PARAMETERS πŸ“₯

  • enumtype β€” Enumerator to be queried. This is the enum bestie you’re asking about. ✨

πŸ” INPUT/OUTPUT PARAMETERS πŸ”

  • name_len β€” Length of the string and/or buffer for name.

πŸ“€ OUTPUT PARAMETERS πŸ“€

  • num β€” number of discrete values represented by this enumeration.
  • name β€” Buffer to return the string containing the name of the category.

πŸ’¬ DESCRIPTION πŸ’¬

MPI_T_enum_get_info can be used to query information about an enumerator. The function returns the number of discrete values represented by this enumerator in the num parameter. That’s literally the vibe: ask the enumerator, get the count. πŸ”₯


πŸ—’οΈ NOTES πŸ—’οΈ

This MPI tool interface function returns the name of the enumeration as a string. It takes two arguments for the string: name, which specifies a buffer where the name should be stored, and name_len, which must initially specify the size of the buffer pointed to by name. This function will copy at most name_len - 1 characters of the name and sets name_len to the number of characters returned + 1. If name_len is NULL or the value specified in name_len is 0, the name buffer is ignored and the name of the enumeration is not returned. No cap, that’s the buffer behavior. πŸŽ€

bestie PSA: that name_len situation is lowkey the whole point β€” don’t skip it. 🫢

🚨 ERRORS 🚨

MPI_T_enum_get_info will fail if:

  • MPI_T_ERR_NOT_INITIALIZED: The MPI Tools interface not initialized
  • MPI_T_ERR_INVALID_INDEX: The enumeration is invalid or has been deleted

Periodt. πŸ’€


2003-2026, The Open MPI Community

xoxo, your Unix bestie πŸ’– β€” this iconic MPI_T_ENUM_GET_INFO(3) page is from Open MPI, dated Sep 11, 2026. Slay. πŸ¦‹

πŸ“¦ where this page comes from