table of contents
| PMIX_TOOL_IS_CONNECTED(3) | OpenPMIx | PMIX_TOOL_IS_CONNECTED(3) |
PMIx_tool_is_connected — Test whether the tool is connected to a PMIx server.
SYNOPSIS¶
#include <pmix_tool.h> bool PMIx_tool_is_connected(void);
Python Syntax¶
from pmix import * foo = PMIxTool() rc, myname = foo.init(None) if foo.is_connected():
# the tool currently has an active server connection
...
DESCRIPTION¶
Return true if the tool currently has an active connection to a PMIx server, and false otherwise.
A tool is connected when it has an active primary-server connection — for example, immediately after a successful PMIx_tool_init(3) <#man3-pmix-tool-init> that contacted a server, or after a successful PMIx_tool_attach_to_server(3) <#man3-pmix-tool-attach-to-server> that designated the new server as primary. A tool is not connected when it was initialized with PMIX_TOOL_DO_NOT_CONNECT, when an optional connection attempt failed, or after PMIx_tool_disconnect(3) <#man3-pmix-tool-disconnect> has dropped the primary server (which leaves the tool pointing its active server back at itself).
This test reflects only the primary server association. A tool may still retain connections to other servers (retrievable via PMIx_tool_get_servers(3) <#man3-pmix-tool-get-servers>) even when it reports as not connected to a primary server.
RETURN VALUE¶
Returns the boolean connection state as described above. This routine does not return a pmix_status_t and never fails; if the tool library has not been initialized the returned value is simply false.
See also:
Copyright¶
2014-2026, OpenPMIx Community
| October 5, 2026 |