HcclCommInitClusterInfoConfig

Description

Initializes the HCCL communicator with specific configurations based on the ranktable file.

Prototype

HcclResult HcclCommInitClusterInfoConfig(const char *clusterInfo, uint32_t rank, HcclCommConfig *config, 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.

config

Input

Configuration options of the communicator, including the buffer size, deterministic computing switch, and communicator name. The configuration parameters must be within the valid value range. For details, see HcclCommConfig.

Notes:

  • The input config must be initialized by calling HcclCommConfigInit.
  • If you use config to specify a communicator name, ensure that the name is unique.
  • In config, the configuration option hcclBufferSize takes precedence over the environment variable HCCL_BUFFSIZE, and the configuration option hcclDeterministic takes precedence over the environment variable HCCL_DETERMINISTIC. For details about environment variables, see Environment Variables.

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 is not supported in the same communicator.

Applicability

Atlas Training Series Product