diff --git a/test/AllGatherTests.cpp b/test/AllGatherTests.cpp index a59a3522d4..a712673af7 100644 --- a/test/AllGatherTests.cpp +++ b/test/AllGatherTests.cpp @@ -127,7 +127,7 @@ namespace RcclUnitTesting const int nranks = 8; size_t count = 2048; std::vector sendBuff(count, 0); - std::vector recvBuff(count, 0); + std::vector recvBuff(nranks*count, 0); std::vector expected(nranks*count, 0); for (int i = 0; i < count; ++i){ @@ -146,7 +146,7 @@ namespace RcclUnitTesting const int nranks = 8; size_t count = 2048; std::vector sendBuff(count, 0); - std::vector recvBuff(count, 0); + std::vector recvBuff(nranks*count, 0); std::vector expected(nranks*count, 0); const bool use_managed_mem = true; for (int i = 0; i < count; ++i){