HcclGetRankSize
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
x |
|
x |
|
x |
For
Function
Queries the number of ranks in a specified communicator.
Prototype
1 | HcclResult HcclGetRankSize(HcclComm comm, uint32_t *rankSize) |
Parameters
Parameter |
Input/Output |
Description |
||
|---|---|---|---|---|
comm |
Input |
Communicator where the collective communication operation is performed. The HcclComm type is defined as follows:
|
||
rankSize |
Output |
Number of ranks in a communicator. |
Returns
HcclResult: HCCL_SUCCESS on success, or else failure.
Restrictions
None
Example
Take a communicator with four servers and eight devices as an example. The total number of ranks is 32.
1 2 3 4 | uint32_t rankSize; HcclComm comm; HcclGetRankSize(comm, &rankSize); // rankSize=32 |