diff --git a/projects/rccl-tests/src/gather.cu b/projects/rccl-tests/src/gather.cu index 65dc714893..4b98ede241 100644 --- a/projects/rccl-tests/src/gather.cu +++ b/projects/rccl-tests/src/gather.cu @@ -64,10 +64,10 @@ testResult_t GatherInitData(struct threadArgs* args, ncclDataType_t type, ncclRe } void GatherGetBw(size_t count, int typesize, double sec, double* algBw, double* busBw, int nranks) { - double baseBw = (double)(count * typesize * (nranks - 1)) / 1.0E9 / sec; + double baseBw = (double)(count * typesize) / 1.0E9 / sec; *algBw = baseBw; - double factor = 1; + double factor = ((double)(nranks-1))/((double)(nranks)); *busBw = baseBw * factor; } @@ -79,7 +79,10 @@ testResult_t GatherRunColl(void* sendbuff, void* recvbuff, size_t count, ncclDat int rank; NCCLCHECK(ncclCommUserRank(comm, &rank)); -#if NCCL_MAJOR >= 2 && NCCL_MINOR >= 7 +#if NCCL_MAJOR < 2 || NCCL_MINOR < 7 + printf("NCCL 2.7 or later is needed for gather. This test was compiled with %d.%d.\n", NCCL_MAJOR, NCCL_MINOR); + return testNcclError; +#else #if defined(RCCL_GATHER_SCATTER) && defined(USE_RCCL_GATHER_SCATTER) if (rank == root) NCCLCHECK(ncclGather(sendbuff, recvbuff, count, type, root, comm, stream)); @@ -93,9 +96,9 @@ testResult_t GatherRunColl(void* sendbuff, void* recvbuff, size_t count, ncclDat } NCCLCHECK(ncclSend(sendbuff, count, type, root, comm, stream)); NCCLCHECK(ncclGroupEnd()); -#endif #endif return testSuccess; +#endif } struct testColl gatherTest = { diff --git a/projects/rccl-tests/src/scatter.cu b/projects/rccl-tests/src/scatter.cu index d741391300..4dbbda25a3 100644 --- a/projects/rccl-tests/src/scatter.cu +++ b/projects/rccl-tests/src/scatter.cu @@ -66,10 +66,10 @@ testResult_t ScatterInitData(struct threadArgs* args, ncclDataType_t type, ncclR } void ScatterGetBw(size_t count, int typesize, double sec, double* algBw, double* busBw, int nranks) { - double baseBw = (double)(count * typesize * (nranks - 1)) / 1.0E9 / sec; + double baseBw = (double)(count * typesize) / 1.0E9 / sec; *algBw = baseBw; - double factor = 1; + double factor = ((double)(nranks-1))/((double)(nranks)); *busBw = baseBw * factor; } @@ -81,7 +81,10 @@ testResult_t ScatterRunColl(void* sendbuff, void* recvbuff, size_t count, ncclDa int rank; NCCLCHECK(ncclCommUserRank(comm, &rank)); -#if NCCL_MAJOR >= 2 && NCCL_MINOR >= 7 +#if NCCL_MAJOR < 2 || NCCL_MINOR < 7 + printf("NCCL 2.7 or later is needed for scatter. This test was compiled with %d.%d.\n", NCCL_MAJOR, NCCL_MINOR); + return testNcclError; +#else #if defined(RCCL_GATHER_SCATTER) && defined(USE_RCCL_GATHER_SCATTER) NCCLCHECK(ncclScatter(sendbuff, recvbuff, count, type, root, comm, stream)); #else @@ -92,9 +95,9 @@ testResult_t ScatterRunColl(void* sendbuff, void* recvbuff, size_t count, ncclDa } NCCLCHECK(ncclRecv(recvbuff, count, type, root, comm, stream)); NCCLCHECK(ncclGroupEnd()); -#endif #endif return testSuccess; +#endif } struct testColl scatterTest = {