diff --git a/projects/rccl-tests/src/common.cu b/projects/rccl-tests/src/common.cu index 332cc3f272..7107d8b4e6 100644 --- a/projects/rccl-tests/src/common.cu +++ b/projects/rccl-tests/src/common.cu @@ -1127,11 +1127,13 @@ int main(int argc, char* argv[]) { } HIPCHECK(hipGetDeviceCount(&numDevices)); +#ifndef MPI_SUPPORT if (nGpus > numDevices) { fprintf(stderr, "[ERROR] The number of requested GPUs (%d) is greater than the number of GPUs available (%d)\n", nGpus, numDevices); return testNcclError; } +#endif if (minBytes > maxBytes) { fprintf(stderr, "invalid sizes for 'minbytes' and 'maxbytes': %llu > %llu\n", (unsigned long long)minBytes, @@ -1163,6 +1165,7 @@ int main(int argc, char* argv[]) { testResult_t run() { int nProcs = 1, proc = 0; int localRank = 0; + int localSize = 0; char hostname[1024]; getHostName(hostname, 1024); @@ -1176,6 +1179,14 @@ testResult_t run() { if (p == proc) break; if (hostHashs[p] == hostHashs[proc]) localRank++; } + for (int p=0; p numDevices) + { + fprintf(stderr, "[ERROR] The number of requested GPUs (%d) is greater than the number of GPUs available (%d) on node (%s)\n", nGpus*localSize, numDevices, hostname); + return testNcclError; + } #endif is_main_thread = (proc == 0) ? 1 : 0;