dragon.infrastructure.facts
Specified constants and names used in the Dragon runtime.
Module Attributes
Input channel unique ID for Global Services head |
|
Unique process ID for head user process started by the launcher |
|
Unique process ID given for the global services process |
|
The first PUID for user applications launched by local services |
|
Starting value of the PUID namespace reserved for externally attached processes. |
|
Number of external process identities assigned to each node for one runtime. |
|
Base index used by the transport services for the unique process ID (puid) |
|
Range of the unique process ID's for the transport services |
|
Starting value for PMOD launch Channel ID (cuid) that communicates with the client pmod at process launch |
|
Range for the PMOD launch channel ID's (cuid) that communicates with the client pmod at process launch |
|
Starting value of a reserved range of cuids that can be managed by a user |
|
Range for the user managed cuids |
|
Starting value of the local transport agent channel unique ID (cuid) |
|
Range for the local transport agent channel ID's (cuid) |
|
Starting value for the backend channel ID (cuid) that communicates with the frontend |
|
Range for the backend channel ID's (cuid) that communicate with the frontend |
|
Starting value for the local launcher backend channel unique ID (cuid) |
|
Range for the local launcher backend channel ID's (cuid) |
|
Starting value for the gateway channel unique ID (cuid) |
|
Range for the gateway channel ID's (cuid) |
|
Base value for the logging channel ID (cuid) |
|
Range for the logging channel ID's (cuid) |
|
Starting value for the backend channel ID (cuid) of the infrastructure transport gateway channel |
|
Range for the backend channel ID's (cuid) of the infrastructure transport gateway channel |
|
Starting value for the backend channel ID (cuid) that communicates with its transport agent |
|
Range for the backend channel ID's (cuid) that communicate with its transport agent |
|
Starting value of the local services channel unique ID (cuid) |
|
Range for the local services channel ID's (cuid) |
|
Starting value of the User created channel ID (cuid) |
|
Filename written under attach_runtime_dir() at startup |
|
Name of the per-user attach-info directory created under tempfile.gettempdir(); the C side (src/lib/ext_attach.cpp) duplicates this and uses dragon_gettempdir() |
|
Environment variable that overrides the attach-info directory (writer, readers, and cleanup) |
|
Well-known key in the Local Services key-value store holding the attach-info JSON. |
|
Well-known key in the Local Services key-value store holding the serialized ctrl_event for the runtime head process. |
|
Environment variable holding the attach auth token. |
|
Starting value of the temporary reply channel CUIDs used during co-located process attach. |
|
Number of distinct temporary attach CUIDs available (one per concurrent PID) |
|
First MUID managed by Local Services. |
|
Number of MUIDs possible allowable for each Local Services The difference between FIRST_LS_MANAGED_MUID and FIRST_BE_MUID is 2**59 (i.e. FIRST_LS_MANAGED_MUID). |
|
First backend pool ID (MUID) needed for the overlay network transport |
|
Range of the backend pool ID's (MUID) needed for the overlay network transport |
|
Pool for the frontend overlay network transport agent |
|
First Logging MUID |
|
First MUID of Default Pools. |
|
User Pool MUID starting value. |
|
Starting value for the Group of resources (guid) |
|
Frontend's magic host ID |
|
Timeout for launch of the runtime. |
Functions
Return |
|
Return a deterministic temporary CUID for the given OS process ID. |
|
|
Return the unique backend Channel ID that communicates with the fronted, based on the host id |
|
Return the unique backend channel ID of the overlay network transport gateway channel, based on the host id |
|
Return the unique channel ID based on host id, for a backend channel that acts as an inbound initializer for its communication with transport agent |
|
Return the unique channel ID based on host id, for a backend channel that acts as an outbound initializer for its communication with transport agent |
|
Return the backend memory pool unique ID based on the host index |
Return this user's attach-info directory under |
|
|
Return the unique managed memory pool ID of the default user pool from the node index. |
|
|
|
Return the half-open external PUID interval assigned to a node. |
|
Return the node owning an external PUID, rejecting non-members. |
|
|
|
Return the unique Channel ID of the first gateway channel from the local node index |
|
Return the unique node index from the default pool id. |
Return the node index from the unique managed memory pool ID of the default infrastructure pool. |
|
Retun the local node index from the |
|
Return the unique managed memory pool ID of the default infrastructure pool from the node index. |
|
|
Check if the given |
|
Return whether puid belongs to the external-only PUID namespace. |
|
Return if the pool corresponding to the given |
|
Check whether a puid is associated with a transport agent |
|
Get the unique Channel ID of the local Launcher backend from the node index. |
|
Lazily imports a module so the module isn't loaded into memory unless it's executed |
|
Return the first muid for local services managed pools given the node index |
Get the unique Channel ID of local services from the node index. |
|
|
Return the unique managed memory pool ID of the default logging pool from the node index. |
|
Return the unique channel ID based on host id, for a channel that initializes a client PMI process with its required pmod data. |
|
|
|
|
|
Get the unique Channel ID of the local transport agent from the nodex index. |
|
Get the unique process ID from the node index. |
|
Validate an external PUID block size against the public integer range. |
Classes
Enumerated list of supported high-speed transport backends |
|
Supported backends for launching MPI applications with ProcessGroup |
|
Enumerated list of supported transport agents |
- GS_INPUT_CUID = 2
Input channel unique ID for Global Services head
- LAUNCHER_PUID = 0
Unique process ID for head user process started by the launcher
- GS_PUID = 1
Unique process ID given for the global services process
- FIRST_PUID = 4294967296
The first PUID for user applications launched by local services
- BASE_EXTERNAL_PUID = 281474976710656
Starting value of the PUID namespace reserved for externally attached processes. External PUIDs are handed out by LocalServices from this initial puid and with the block size below. This may not be enough space for all nodes in extremely large deployments. In such cases, adjustments to the FIRST_PUID and the BASE_EXTERNAL_PUID may need to be made.
- EXTERNAL_PUID_BLOCK_SIZE = 512
Number of external process identities assigned to each node for one runtime.
- validate_external_puid_block_size(block_size: int) int[source]
Validate an external PUID block size against the public integer range.
- external_puid_bounds(node_index: int) tuple[int, int][source]
Return the half-open external PUID interval assigned to a node.
- is_external_puid(puid: int) bool[source]
Return whether puid belongs to the external-only PUID namespace.
- external_puid_node_index(puid: int) int[source]
Return the node owning an external PUID, rejecting non-members.
- FIRST_TRANSPORT_PUID = 256
Base index used by the transport services for the unique process ID (puid)
- RANGE_TRANSPORT_PUID = 4294967040
Range of the unique process ID’s for the transport services
- BASE_PMOD_LAUNCH_CUID = 18014398509481984
Starting value for PMOD launch Channel ID (cuid) that communicates with the client pmod at process launch
- RANGE_PMOD_LAUNCH_CUID = 18014398509481984
Range for the PMOD launch channel ID’s (cuid) that communicates with the client pmod at process launch
- BASE_USER_MANAGED_CUID = 18014398509481984
Starting value of a reserved range of cuids that can be managed by a user
- RANGE_USER_MANAGED_CUID = 18014398509481984
Range for the user managed cuids
- BASE_TA_CUID = 36028797018963968
Starting value of the local transport agent channel unique ID (cuid)
- RANGE_TA_CUID = 36028797018963968
Range for the local transport agent channel ID’s (cuid)
- BASE_BE_FE_CUID = 72057594037927936
Starting value for the backend channel ID (cuid) that communicates with the frontend
- RANGE_BE_FE_CUID = 72057594037927936
Range for the backend channel ID’s (cuid) that communicate with the frontend
- BASE_BE_CUID = 144115188075855872
Starting value for the local launcher backend channel unique ID (cuid)
- RANGE_BE_CUID = 144115188075855872
Range for the local launcher backend channel ID’s (cuid)
- BASE_GW_CUID = 288230376151711744
Starting value for the gateway channel unique ID (cuid)
- RANGE_GW_CUID = 288230376151711744
Range for the gateway channel ID’s (cuid)
- BASE_LOG_CUID = 576460752303423488
Base value for the logging channel ID (cuid)
- RANGE_LOG_CUID = 576460752303423488
Range for the logging channel ID’s (cuid)
- BASE_BE_GW_CUID = 1152921504606846976
Starting value for the backend channel ID (cuid) of the infrastructure transport gateway channel
- RANGE_BE_GW_CUID = 1152921504606846976
Range for the backend channel ID’s (cuid) of the infrastructure transport gateway channel
- BASE_BE_LOCAL_CUID = 2305843009213693952
Starting value for the backend channel ID (cuid) that communicates with its transport agent
- RANGE_BE_LOCAL_CUID = 2305843009213693952
Range for the backend channel ID’s (cuid) that communicate with its transport agent
- LS_CUID_POW = 62
Starting value of the local services channel unique ID (cuid)
- RANGE_LS_CUID = 4611686018427387904
Range for the local services channel ID’s (cuid)
- FIRST_CUID = 9223372036854775808
Starting value of the User created channel ID (cuid)
- ATTACH_INFO_FILENAME = 'attach_info.txt'
Filename written under attach_runtime_dir() at startup
- ATTACH_RUNTIME_DIR_NAME_TEMPLATE = 'dragon_{uid}'
Name of the per-user attach-info directory created under tempfile.gettempdir(); the C side (src/lib/ext_attach.cpp) duplicates this and uses dragon_gettempdir()
- ATTACH_DIR_ENV = 'DRAGON_ATTACH_DIR'
Environment variable that overrides the attach-info directory (writer, readers, and cleanup)
- default_attach_runtime_dir() str[source]
Return this user’s attach-info directory under
tempfile.gettempdir().
- attach_runtime_dir() str[source]
Return
DRAGON_ATTACH_DIRif set, otherwisedefault_attach_runtime_dir().
- ATTACH_INFO_KVS_KEY = 'dragon_attach_info'
Well-known key in the Local Services key-value store holding the attach-info JSON. Local Services populates this at startup (single-node mode) so that managed processes can retrieve attach metadata via
dragon.utils.get_local_kv()instead of reading a file.
- CTRL_EVENT_KVS_KEY = 'dragon_ctrl_event'
Well-known key in the Local Services key-value store holding the serialized ctrl_event for the runtime head process. Written by every LS node when GS broadcasts a
LSStoreCtrlEventmessage so that any attached process can retrieve and set it viadragon.utils.get_local_kv().
- DRAGON_ATTACH_TOKEN_ENV = 'DRAGON_ATTACH_TOKEN'
Environment variable holding the attach auth token. Used both to hand the token to the multi-node Global Services subprocess and as the fallback token source for
dragon.attach()when no token argument is supplied.
- BASE_ATTACH_TEMP_CUID = 9007199254740992
Starting value of the temporary reply channel CUIDs used during co-located process attach. The range 2**53 .. 2**53 + 2**20 - 1 is free; defined infrastructure ranges start at 2**54.
- RANGE_ATTACH_TEMP_CUID = 1048576
Number of distinct temporary attach CUIDs available (one per concurrent PID)
- attach_temp_cuid_from_pid(pid: int) int[source]
Return a deterministic temporary CUID for the given OS process ID.
The result lies in
[BASE_ATTACH_TEMP_CUID, BASE_ATTACH_TEMP_CUID + RANGE_ATTACH_TEMP_CUID).
- FIRST_LS_MANAGED_MUID = 576460752303423488
First MUID managed by Local Services.
- RANGE_LS_MUIDS_PER_NODE = 34359738368
Number of MUIDs possible allowable for each Local Services The difference between FIRST_LS_MANAGED_MUID and FIRST_BE_MUID is 2**59 (i.e. FIRST_LS_MANAGED_MUID). So we can take FIRST_LS_MANAGED_MUID and divide by max nodes to get the range provided by each node.
- FIRST_BE_MUID = 1152921504606846976
First backend pool ID (MUID) needed for the overlay network transport
- RANGE_BE_MUID = 1152921504606846976
Range of the backend pool ID’s (MUID) needed for the overlay network transport
- FE_OVERLAY_TRANSPORT_AGENT_MUID = 1152921504606846975
Pool for the frontend overlay network transport agent
- FIRST_LOGGING_MUID = 2305843009213693952
First Logging MUID
- FIRST_DEFAULT_MUID = 4611686018427387904
First MUID of Default Pools.
- FIRST_MUID = 9223372036854775808
User Pool MUID starting value.
- FIRST_GUID = 9223372036854775808
Starting value for the Group of resources (guid)
- FRONTEND_HOSTID = 1
Frontend’s magic host ID
- LOCAL_LAUNCH_TIMEOUT = 60
Timeout for launch of the runtime. Local for node-local comms. Remote for transport agent enabled.
- transport_puid_from_index(index) int[source]
Get the unique process ID from the node index. Otherwise, throw an
AssertionError
- launcher_cuid_from_index(index: int) int[source]
Get the unique Channel ID of the local Launcher backend from the node index.
- transport_cuid_from_index(index: int) int[source]
Get the unique Channel ID of the local transport agent from the nodex index.
- localservices_cuid_from_index(index: int) int[source]
Get the unique Channel ID of local services from the node index.
- gw_cuid_from_index(index: int, num_gw_channels: int) int[source]
Return the unique Channel ID of the first gateway channel from the local node index
- be_gw_cuid_from_hostid(host_id)[source]
Return the unique backend channel ID of the overlay network transport gateway channel, based on the host id
- be_fe_cuid_from_hostid(host_id)[source]
Return the unique backend Channel ID that communicates with the fronted, based on the host id
- be_local_cuid_in_from_hostid(host_id)[source]
Return the unique channel ID based on host id, for a backend channel that acts as an inbound initializer for its communication with transport agent
- be_local_cuid_out_from_hostid(host_id)[source]
Return the unique channel ID based on host id, for a backend channel that acts as an outbound initializer for its communication with transport agent
- pmod_launch_cuid_from_jobinfo(host_id, job_id, lrank)[source]
Return the unique channel ID based on host id, for a channel that initializes a client PMI process with its required pmod data.
- default_pool_muid_from_index(index: int) int[source]
Return the unique managed memory pool ID of the default user pool from the node index.
- logging_pool_muid_from_index(index: int) int[source]
Return the unique managed memory pool ID of the default logging pool from the node index.
- infrastructure_pool_muid_from_index(index: int) int[source]
Return the unique managed memory pool ID of the default infrastructure pool from the node index.
- local_pool_first_muid(index: int) int[source]
- Return the first muid for local services managed pools given the node index
provided. Each local services uses this to begin allocating muids starting at a specfic integer.
- index_from_infrastructure_pool_muid(m_uid: int) int[source]
Return the node index from the unique managed memory pool ID of the default infrastructure pool.
- Parameters:
m_uid – m_uid of the infrastructure pool
- Returns:
unique node index of this node
- Return type:
- be_pool_muid_from_hostid(host_id)[source]
Return the backend memory pool unique ID based on the host index
- Parameters:
host_id – host id
- Returns:
unique ID of the backend memory pool
- Return type:
- is_pre_defined_pool(m_uid: int) bool[source]
Return if the pool corresponding to the given
m_uidis pre-defined by the runtime.
- index_from_localservices_cuid(cuid: int) int[source]
Retun the local node index from the
c_uidof local services.
- is_default_pool(m_uid: int) bool[source]
Check if the given
m_uidis a defaultm_uid. Otherwise throw anAssertionError.
- index_from_default_pool_muid(m_uid: int) int[source]
Return the unique node index from the default pool id.
- class TransportAgentOptions[source]
Bases:
EnumEnumerated list of supported transport agents
- HSTA = 'hsta'
- TCP = 'tcp'
- DRAGON_CONFIG = 'configured'
- class HighSpeedTransportBackends[source]
-
Enumerated list of supported high-speed transport backends
- UCX = 'ucx'
- OFI = 'ofi'