From 16dfeaf89b3f0203c64cbdea7769884d6bb8f744 Mon Sep 17 00:00:00 2001 From: Wenkai Du <43822138+wenkaidu@users.noreply.github.com> Date: Thu, 2 May 2024 11:14:57 -0700 Subject: [PATCH] Fix incorrect device ordinal with limited device visibility (#74) --- src/common.cu | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common.cu b/src/common.cu index def6ca029e..691c2402dd 100644 --- a/src/common.cu +++ b/src/common.cu @@ -1100,7 +1100,7 @@ testResult_t run() { for (int p=0; p numDevices) + if (nGpus * localSize > numDevices && numDevices != 1) { 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; @@ -1124,7 +1124,7 @@ testResult_t run() { char* envstr = getenv("NCCL_TESTS_DEVICE"); int gpu0 = envstr ? atoi(envstr) : -1; for (int i=0; i