diff --git a/src/serac/infrastructure/about.cpp b/src/serac/infrastructure/about.cpp index 34b02559e..d94646763 100644 --- a/src/serac/infrastructure/about.cpp +++ b/src/serac/infrastructure/about.cpp @@ -221,4 +221,6 @@ std::string version(bool add_SHA) return version; } +std::string compiler() { return axom::fmt::format("{0} version {1}", SERAC_COMPILER_NAME, SERAC_COMPILER_VERSION); } + } // namespace serac diff --git a/src/serac/infrastructure/about.hpp b/src/serac/infrastructure/about.hpp index 82e016a80..e53060fc4 100644 --- a/src/serac/infrastructure/about.hpp +++ b/src/serac/infrastructure/about.hpp @@ -49,4 +49,11 @@ void printRunInfo(); */ std::string version(bool add_SHA = true); +/** + * @brief Returns a string for the current compiler name and version + * + * @return string value of the the current compiler name and version + */ +std::string compiler(); + } // namespace serac diff --git a/src/serac/infrastructure/profiling.cpp b/src/serac/infrastructure/profiling.cpp index 5a8607965..95a41e7b3 100644 --- a/src/serac/infrastructure/profiling.cpp +++ b/src/serac/infrastructure/profiling.cpp @@ -4,8 +4,8 @@ // // SPDX-License-Identifier: (BSD-3-Clause) +#include "serac/infrastructure/about.hpp" #include "serac/infrastructure/profiling.hpp" - #include "serac/infrastructure/logger.hpp" #ifdef SERAC_USE_CALIPER @@ -34,6 +34,8 @@ void initialize([[maybe_unused]] MPI_Comm comm, [[maybe_unused]] std::string opt adiak::walltime(); adiak::cputime(); adiak::systime(); + SERAC_SET_METADATA("serac_version", serac::version(true)); + SERAC_SET_METADATA("serac_compiler", serac::compiler()); #endif #ifdef SERAC_USE_CALIPER diff --git a/src/serac/serac_config.hpp.in b/src/serac/serac_config.hpp.in index fa3be2525..1aa686505 100644 --- a/src/serac/serac_config.hpp.in +++ b/src/serac/serac_config.hpp.in @@ -22,6 +22,10 @@ #define SERAC_REPO_DIR "@SERAC_REPO_DIR@" #define SERAC_BIN_DIR "@SERAC_BIN_DIR@" +// Compiler Information +#define SERAC_COMPILER_NAME "@CMAKE_CXX_COMPILER_ID@" +#define SERAC_COMPILER_VERSION "@CMAKE_CXX_COMPILER_VERSION@" + // General defines #cmakedefine SERAC_DEBUG