HcclGetRankId

Description

Obtains the rank ID of a device in a collective communicator.

Prototype

HcclResult HcclGetRankId(HcclComm comm, uint32_t *rank)

Parameters

Parameter

Input/Output

Description

comm

Input

Communicator where the operation is performed.

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

rank

Output

Pointer to the output address of the rank ID in the collective communicator.

Returns

HcclResult: HCCL_SUCCESS on success; else, failure.

Constraints

None

Applicability

Atlas Training Series Product

Example

1
2
3
uint32_t rank;
HcclComm comm;
HcclGetRankId(comm, &rank);