From 922379331201e344a91463a4439bd5732a24d8c7 Mon Sep 17 00:00:00 2001 From: Willem Deconinck Date: Wed, 25 Sep 2024 12:48:36 +0000 Subject: [PATCH] Library::print and ATLAS_DEBUG shows OpenACC and CUDA/HIP devices and features --- src/atlas/library/Library.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/atlas/library/Library.cc b/src/atlas/library/Library.cc index 99bebfe96..f93d7241a 100644 --- a/src/atlas/library/Library.cc +++ b/src/atlas/library/Library.cc @@ -44,6 +44,8 @@ static bool feature_MKL() { } // namespace #endif +#include "pluto/pluto.h" + #include "atlas_io/Trace.h" #include "atlas/library/FloatingPointExceptions.h" @@ -53,6 +55,7 @@ static bool feature_MKL() { #include "atlas/library/version.h" #include "atlas/parallel/mpi/mpi.h" #include "atlas/parallel/omp/omp.h" +#include "atlas/parallel/acc/acc.h" #include "atlas/runtime/Exception.h" #include "atlas/runtime/Log.h" #include "atlas/runtime/Trace.h" @@ -341,6 +344,9 @@ void Library::initialise(const eckit::Parametrisation& config) { out << " rank [" << mpi::rank() << "] \n"; out << " OMP\n"; out << " max_threads [" << atlas_omp_get_max_threads() << "] \n"; + out << " GPU\n"; + out << " devices [" << pluto::devices() << "] \n"; + out << " OpenACC [" << acc::devices() << "] \n"; out << " \n"; out << " log.info [" << str(info_) << "] \n"; out << " log.trace [" << str(trace()) << "] \n"; @@ -473,6 +479,8 @@ void Library::Information::print(std::ostream& out) const { bool feature_fortran(ATLAS_HAVE_FORTRAN); bool feature_OpenMP(ATLAS_HAVE_OMP); + bool feature_OpenACC(ATLAS_HAVE_ACC); + bool feature_GPU(ATLAS_HAVE_GPU); bool feature_ecTrans(ATLAS_HAVE_ECTRANS); bool feature_FFTW(ATLAS_HAVE_FFTW); bool feature_Eigen(ATLAS_HAVE_EIGEN); @@ -498,6 +506,8 @@ void Library::Information::print(std::ostream& out) const { << " Fortran : " << str(feature_fortran) << '\n' << " MPI : " << str(feature_MPI) << '\n' << " OpenMP : " << str(feature_OpenMP) << '\n' + << " OpenACC : " << str(feature_OpenACC) << '\n' + << " GPU : " << str(feature_GPU) << '\n' << " BoundsChecking : " << str(feature_BoundsChecking) << '\n' << " Init_sNaN : " << str(feature_Init_sNaN) << '\n' << " ecTrans : " << str(feature_ecTrans) << '\n'