18.2.272. PMIx_tool_disconnect
PMIx_tool_disconnect — Disconnect a tool from a specified PMIx server.
18.2.272.1. SYNOPSIS
#include <pmix_tool.h>
pmix_status_t PMIx_tool_disconnect(const pmix_proc_t *server);
18.2.272.1.1. Python Syntax
from pmix import *
foo = PMIxTool()
rc, myname = foo.init(None)
# ... attach to one or more servers ...
srvr = {'nspace': "myserver", 'rank': 0}
rc = foo.disconnect(srvr)
18.2.272.2. INPUT PARAMETERS
server: Pointer to a pmix_proc_t(5) structure giving the process identifier of the server from which the tool is to be disconnected.
18.2.272.3. DESCRIPTION
Disconnect the tool from the specified server connection while leaving the tool library itself initialized. The tool remains free to continue operating and to establish new connections via PMIx_tool_attach_to_server(3).
If the identified server is the tool’s current primary (active) server, the
tool transitions to a “disconnected” state: the active server is pointed back at
the tool itself — effectively the same condition as when a tool is
initialized without connecting to a server — and
PMIx_tool_is_connected(3) will subsequently
report false. Connections to any other servers are unaffected.
This is a blocking call: internally the request is thread-shifted onto the progress thread, which locates the matching server, drops the connection, and wakes the caller.
18.2.272.4. RETURN VALUE
Returns PMIX_SUCCESS when the tool has been disconnected from the specified
server. On error, a negative value corresponding to a PMIx error constant is
returned, including:
PMIX_ERR_INIT— the tool library has not been initialized.PMIX_ERR_NOT_AVAILABLE— the internal progress thread has been stopped, so the operation cannot be serviced.PMIX_ERR_NOT_FOUND— the tool has no connection to a server matching the supplied identifier.
Other negative values indicate an appropriate error condition. PMIx error
constants are defined in pmix_common.h.
18.2.272.5. NOTES
To close all connections and release the library, call PMIx_tool_finalize(3) instead. Use PMIx_tool_get_servers(3) to obtain the set of currently connected servers before selecting one to disconnect.