HcclCommInitClusterInfo

Description

Initializes the HCCL communicator based on the ranktable file.

The ranktable file is in JSON format and configures the NPU resources involved in collective communication. For details about the configuration of the ranktable file, see Configuring Resource Information Through the Ranktable File.

Prototype

HcclResult HcclCommInitClusterInfo(const char *clusterInfo, uint32_t rank, HcclComm *comm)

Parameters

Parameter

Input/Output

Description

clusterInfo

Input

Directory (including the file name) of the ranktable file, which is of the string type and contains a maximum of 4096 bytes, including the end character.

rank

Input

ID of the current rank.

Note that the value of this parameter must be the same as the value of rank_id in the ranktable file.

comm

Output

Pointer to the initialized communicator.

For details about the definition of the HcclComm type, see HcclComm.

Returns

HcclResult: HCCL_SUCCESS on success; else, failure.

Constraints

Repeated initialization would cause an error.

Applicability

Atlas Training Series Product

Example

For details, see HcclCommInitClusterInfo Initialization.