18.2.274. PMIx_tool_is_connected
PMIx_tool_is_connected — Test whether the tool is connected to a PMIx
server.
18.2.274.1. SYNOPSIS
#include <pmix_tool.h>
bool PMIx_tool_is_connected(void);
18.2.274.1.1. Python Syntax
from pmix import *
foo = PMIxTool()
rc, myname = foo.init(None)
if foo.is_connected():
# the tool currently has an active server connection
...
18.2.274.2. 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) that contacted a server, or after a
successful PMIx_tool_attach_to_server(3)
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) 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)) even when it reports as not connected to a primary server.
18.2.274.3. 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.