From bf4a866109667bea8c7fa142d940ef00f46fc2d6 Mon Sep 17 00:00:00 2001 From: Wenkai Du Date: Mon, 19 Oct 2020 14:06:23 -0400 Subject: [PATCH] Uses nullptr as send buffer for non-root ranks during scatter --- src/scatter.cu | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scatter.cu b/src/scatter.cu index 4dbbda25a3..b18ed382ce 100644 --- a/src/scatter.cu +++ b/src/scatter.cu @@ -86,7 +86,10 @@ testResult_t ScatterRunColl(void* sendbuff, void* recvbuff, size_t count, ncclDa return testNcclError; #else #if defined(RCCL_GATHER_SCATTER) && defined(USE_RCCL_GATHER_SCATTER) - NCCLCHECK(ncclScatter(sendbuff, recvbuff, count, type, root, comm, stream)); + if (rank == root) + NCCLCHECK(ncclScatter(sendbuff, recvbuff, count, type, root, comm, stream)); + else + NCCLCHECK(ncclScatter(0, recvbuff, count, type, root, comm, stream)); #else NCCLCHECK(ncclGroupStart()); if (rank == root) {