diff --git a/projects/rccl-tests/.gitignore b/projects/rccl-tests/.gitignore new file mode 100644 index 0000000000..a0a013e438 --- /dev/null +++ b/projects/rccl-tests/.gitignore @@ -0,0 +1,4 @@ +# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. +# +# See LICENCE.txt for license information +/build diff --git a/projects/rccl-tests/README.md b/projects/rccl-tests/README.md index dc3120f119..2661b00b85 100644 --- a/projects/rccl-tests/README.md +++ b/projects/rccl-tests/README.md @@ -29,9 +29,9 @@ Run on 8 GPUs (`-g 8`), scanning from 8 Bytes to 128MBytes : $ ./build/all_reduce_perf -b 8 -e 128M -f 2 -g 8 ``` -Run with MPI on 40 processes (potentially on multiple nodes) with 4 GPUs each, disabling checks : +Run with MPI on 40 processes (potentially on multiple nodes) with 4 GPUs each : ```shell -$ mpirun -np 40 ./build/all_reduce_perf -b 8 -e 128M -f 2 -g 4 -c 0 +$ mpirun -np 40 ./build/all_reduce_perf -b 8 -e 128M -f 2 -g 4 ``` ### Performance diff --git a/projects/rccl-tests/src/all_gather.cu b/projects/rccl-tests/src/all_gather.cu index 2e6c880160..6733807927 100644 --- a/projects/rccl-tests/src/all_gather.cu +++ b/projects/rccl-tests/src/all_gather.cu @@ -49,10 +49,10 @@ testResult_t AllGatherInitData(struct threadArgs* args, ncclDataType_t type, ncc } void AllGatherGetBw(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 * nranks) / 1.0E9 / sec; *algBw = baseBw; - double factor = 1; + double factor = ((double)(nranks - 1))/((double)nranks); *busBw = baseBw * factor; } diff --git a/projects/rccl-tests/src/alltoall.cu b/projects/rccl-tests/src/alltoall.cu index 41bbc780a8..956963fa1e 100644 --- a/projects/rccl-tests/src/alltoall.cu +++ b/projects/rccl-tests/src/alltoall.cu @@ -67,7 +67,10 @@ testResult_t AlltoAllRunColl(void* sendbuff, void* recvbuff, size_t count, ncclD size_t rankOffset = count * wordSize(type); if (count == 0) return testSuccess; -#if NCCL_MAJOR >= 2 && NCCL_MINOR >= 7 +#if NCCL_MAJOR < 2 || NCCL_MINOR < 7 + printf("NCCL 2.7 or later is needed for alltoall. 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(ncclAllToAll(sendbuff, recvbuff, count, type, comm, stream)); #else @@ -78,9 +81,8 @@ testResult_t AlltoAllRunColl(void* sendbuff, void* recvbuff, size_t count, ncclD } NCCLCHECK(ncclGroupEnd()); #endif -#endif - return testSuccess; +#endif } struct testColl alltoAllTest = { diff --git a/projects/rccl-tests/src/common.cu b/projects/rccl-tests/src/common.cu index ed88f51905..bc9ac3185c 100644 --- a/projects/rccl-tests/src/common.cu +++ b/projects/rccl-tests/src/common.cu @@ -352,9 +352,9 @@ testResult_t CheckData(struct threadArgs* args, ncclDataType_t type, ncclRedOp_t printf("%d:%d ", j, dataHost[j]); } printf("\n"); - free(dataHost); free(expectedHost); - //} + free(dataHost); + } #endif } double nranks = args->nProcs*args->nThreads*args->nGpus; diff --git a/projects/rccl-tests/src/reduce_scatter.cu b/projects/rccl-tests/src/reduce_scatter.cu index 10856cc3da..66bea0119e 100644 --- a/projects/rccl-tests/src/reduce_scatter.cu +++ b/projects/rccl-tests/src/reduce_scatter.cu @@ -48,10 +48,10 @@ testResult_t ReduceScatterInitData(struct threadArgs* args, ncclDataType_t type, } void ReduceScatterGetBw(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 * nranks) / 1.0E9 / sec; *algBw = baseBw; - double factor = 1; + double factor = ((double)(nranks - 1))/((double)nranks); *busBw = baseBw * factor; }