HcclCommGetHandleWithName

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Function

Obtains the handle to a communicator based on the communicator name.

Prototype

1
HcclResult HcclCommGetHandleWithName(const char* commName, HcclComm* comm)

Parameters

Parameter

Input/Output

Description

commName

Input

Communicator name.

The value is of the const char* type and can contain a maximum of 128 characters.

comm

Output

Handle obtained for the communicator.

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

Returns

HcclResult: HCCL_SUCCESS on success, or else failure.

Constraints

None.

Call Example

1
2
3
4
5
// Define the name of the communicator whose handle is to be obtained.
char commName[128] = "group_name_0";
HcclComm comm;
// Obtain the handle of the communicator corresponding to the communicator name.
HcclCommGetHandleWithName(commName, &comm);