HcclGetRootInfo
Description
This API needs to be called only on the root rank before the HCCL initialization API HcclCommInitRootInfo or HcclCommInitRootInfoConfig is called, to generate the rank identification information (HcclRootInfo) of the root rank.
Prototype
HcclResult HcclGetRootInfo(HcclRootInfo *rootInfo)
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
rootInfo |
Output |
Rank identification information, including the device IP address and device ID. The information needs to be broadcast to all ranks in the cluster for HCCL initialization. For details about the definition of the HcclRootInfo type, see HcclRootInfo. |
Returns
HcclResult: HCCL_SUCCESS on success; else, failure.
Constraints
- (Optional) In the multi-server collective communication scenario, perform the following operations before calling HcclGetRootInfo:
- Configure the environment variable HCCL_IF_IP or HCCL_SOCKET_IFNAME to specify the IP address of the root NIC for HCCL initialization. (HCCL_IF_IP takes precedence over HCCL_SOCKET_IFNAME. If neither of them is specified, the root NIC is selected in ascending order of NIC names by default.)
- Configure the environment variable HCCL_WHITELIST_DISABLE to enable whitelist verification and use HCCL_WHITELIST_FILE to specify the communication whitelist configuration file. (If this environment variable is not set, communication whitelist verification is disabled by default.)
- After this API is called, the current rank is used as the root rank and its identification information is broadcast to all ranks in the cluster. Then, the HcclCommInitRootInfo or HcclCommInitRootInfoConfig API is then called to initialize the HCCL using the received rootInfo.
- This API must be used in conjunction with the initialization API HcclCommInitRootInfo or HcclCommInitRootInfoConfig.
Applicability
Parent topic: Communicator Management