Loading src/TNL/MPI/selectGPU.h +6 −1 Original line number Diff line number Diff line Loading @@ -28,9 +28,14 @@ inline void selectGPU() const int local_rank = getRankOnNode(); const int gpuNumber = local_rank % gpuCount; // write debug output before calling cudaSetDevice const char* cuda_visible_devices = std::getenv("CUDA_VISIBLE_DEVICES"); if( !cuda_visible_devices ) cuda_visible_devices = ""; std::cout << "Rank " << GetRank() << ": rank on node is " << local_rank << ", using GPU id " << gpuNumber << " of " << gpuCount << ", CUDA_VISIBLE_DEVICES=" << std::getenv("CUDA_VISIBLE_DEVICES") << ", CUDA_VISIBLE_DEVICES=" << cuda_visible_devices << std::endl; cudaSetDevice(gpuNumber); Loading Loading
src/TNL/MPI/selectGPU.h +6 −1 Original line number Diff line number Diff line Loading @@ -28,9 +28,14 @@ inline void selectGPU() const int local_rank = getRankOnNode(); const int gpuNumber = local_rank % gpuCount; // write debug output before calling cudaSetDevice const char* cuda_visible_devices = std::getenv("CUDA_VISIBLE_DEVICES"); if( !cuda_visible_devices ) cuda_visible_devices = ""; std::cout << "Rank " << GetRank() << ": rank on node is " << local_rank << ", using GPU id " << gpuNumber << " of " << gpuCount << ", CUDA_VISIBLE_DEVICES=" << std::getenv("CUDA_VISIBLE_DEVICES") << ", CUDA_VISIBLE_DEVICES=" << cuda_visible_devices << std::endl; cudaSetDevice(gpuNumber); Loading