18 #include "smith/smith_config.hpp"
20 #ifdef SMITH_USE_ADIAK
24 #ifdef SMITH_USE_CALIPER
25 #include "caliper/cali-manager.h"
26 #include "caliper/cali.h"
36 #ifdef SMITH_USE_ADIAK
37 #define SMITH_SET_METADATA(name, data) adiak::value(name, data)
39 #define SMITH_SET_METADATA(name, data)
80 #ifdef SMITH_USE_CALIPER
81 #define SMITH_MARK_FUNCTION CALI_CXX_MARK_FUNCTION
82 #define SMITH_MARK_LOOP_BEGIN(id, name) CALI_CXX_MARK_LOOP_BEGIN(id, name)
83 #define SMITH_MARK_LOOP_ITERATION(id, i) CALI_CXX_MARK_LOOP_ITERATION(id, i)
84 #define SMITH_MARK_LOOP_END(id) CALI_CXX_MARK_LOOP_END(id)
85 #define SMITH_MARK_BEGIN(name) CALI_MARK_BEGIN(name)
86 #define SMITH_MARK_END(name) CALI_MARK_END(name)
87 #define SMITH_MARK_SCOPE(name) CALI_CXX_MARK_SCOPE(name)
90 #define SMITH_MARK_FUNCTION
91 #define SMITH_MARK_LOOP_BEGIN(id, name)
92 #define SMITH_MARK_LOOP_ITERATION(id, i)
93 #define SMITH_MARK_LOOP_END(id)
94 #define SMITH_MARK_BEGIN(name)
95 #define SMITH_MARK_END(name)
96 #define SMITH_MARK_SCOPE(name)
108 void initialize([[maybe_unused]] MPI_Comm comm = MPI_COMM_WORLD, [[maybe_unused]] std::string options =
"");
116 template <
typename... T>
119 std::stringstream ss;
void initialize([[maybe_unused]] MPI_Comm comm, [[maybe_unused]] std::string options)
Initializes performance monitoring using the Caliper and Adiak libraries.
std::string concat(T... args)
Produces a string by applying << to all arguments.
void finalize()
Concludes performance monitoring and writes collected data to a file.