Skip to content

Point-to-Point API

Directed transfers between two ranks. Pair them inside a group so both sides are posted before either blocks; see Point-to-Point.


LcclRecv

Receive data from rank peer into recvbuff.

1
LcclResult LcclRecv(void *recv_buff, size_t count, LcclDataType datatype, int peer, LcclComm comm);
Parameter Direction Description
recv_buff out Pointer to the receive buffer
count in Number of elements in the recvBuff.
datatype in Data type of the element
peer in Global rank of the peer communicator
comm in LCCL communicator

Returns — kLcclSuccess if the data is received successfully, error code otherwise

Rank peer needs to call LcclSend with the same datatype and the same count to this rank.

Note

On the LPU, a communicator with 2 or more ranks runs the call on the device loop, which waits at most LCCL_KERNEL_TIMEOUT_MS (5000 ms by default) per launch. If peer makes its matching call later than that, the call fails with a timeout and the communicator is aborted.


LcclSend

Send data from sendbuff to rank peer.

1
LcclResult LcclSend(const void *send_buff, size_t count, LcclDataType datatype, int peer, LcclComm comm);
Parameter Direction Description
send_buff in Pointer to the send buffer
count in Number of elements in the sendBuff.
datatype in Data type of the element
peer in Global rank of the peer communicator
comm in LCCL communicator

Returns — kLcclSuccess if the data is sent successfully, error code otherwise

Rank peer needs to call LcclRecv with the same datatype and the same count from this rank.

Note

On the LPU, a communicator with 2 or more ranks runs the call on the device loop, which waits at most LCCL_KERNEL_TIMEOUT_MS (5000 ms by default) per launch. If peer makes its matching call later than that, the call fails with a timeout and the communicator is aborted.