table of contents
| PMIX_ERROR_CODE(3) | OpenPMIx | PMIX_ERROR_CODE(3) |
PMIx_Error_code — Return the PMIx status code corresponding to a status name string.
SYNOPSIS¶
#include <pmix.h> pmix_status_t PMIx_Error_code(const char *errname);
Python Syntax¶
from pmix import *
foo = PMIxClient()
# the inverse of error_string - returns the integer status code
status = foo.error_code("PMIX_ERR_NOT_FOUND")
INPUT PARAMETERS¶
- •
- errname: A NULL-terminated string naming a PMIx status or event constant, as would be returned by PMIx_Error_string(3) <#man3-pmix-error-string>. A NULL pointer names no constant and is reported as unrecognized.
DESCRIPTION¶
Return the numeric pmix_status_t value whose symbolic name matches the provided string. The function searches the library’s table of known status and event constants for an entry whose name matches errname and returns that entry’s code. The comparison is case-insensitive.
PMIx_Error_code is the inverse of PMIx_Error_string(3) <#man3-pmix-error-string>: given a name produced by that function, it recovers the corresponding numeric status value.
Note:
RETURN VALUE¶
Returns the pmix_status_t value corresponding to errname on success. If no known status or event constant has a matching name — including when errname is NULL — the function returns INT32_MIN to indicate that the name was not recognized.
NOTES¶
Because a successful lookup can legitimately return a large negative value (PMIx error codes are negative), callers that need to detect failure should test explicitly for the INT32_MIN sentinel rather than assuming any negative return denotes an unrecognized name.
See also:
Copyright¶
2014-2026, OpenPMIx Community
| October 5, 2026 |