Merge pull request #5611 from multitalentloes/print_gpu_info_on_startup

Print gpus used on simulator startup
This commit is contained in:
Kjetil Olsen Lye
2024-10-31 21:29:08 +01:00
committed by GitHub
7 changed files with 141 additions and 14 deletions

View File

@@ -35,10 +35,6 @@
#include <opm/simulators/utils/DamarisOutputModule.hpp>
#endif
#if HAVE_CUDA
#include <opm/simulators/linalg/gpuistl/set_device.hpp>
#endif
namespace Opm {
Main::Main(int argc, char** argv, bool ownMPI)
@@ -163,7 +159,7 @@ void Main::initMPI()
}
#if HAVE_CUDA
Opm::gpuistl::setDevice(FlowGenericVanguard::comm().rank(), FlowGenericVanguard::comm().size());
Opm::gpuistl::setDevice();
#endif
#endif // HAVE_MPI

View File

@@ -72,6 +72,10 @@
#include <opm/simulators/utils/ParallelEclipseState.hpp>
#endif
#if HAVE_CUDA
#include <opm/simulators/linalg/gpuistl/device_management.hpp>
#endif
#if HAVE_DAMARIS
#include <opm/simulators/utils/DamarisKeywords.hpp>
#endif
@@ -426,6 +430,10 @@ protected:
return false;
}
#if HAVE_CUDA
Opm::gpuistl::printDevice();
#endif
exitCode = EXIT_SUCCESS;
return true;
}