18 #include "serac/serac_config.hpp"
20 #ifdef SERAC_USE_ADIAK
24 #ifdef SERAC_USE_CALIPER
25 #include "caliper/cali-manager.h"
26 #include "caliper/cali.h"
36 #ifdef SERAC_USE_ADIAK
37 #define SERAC_SET_METADATA(name, data) adiak::value(name, data)
39 #define SERAC_SET_METADATA(name, data)
80 #ifdef SERAC_USE_CALIPER
81 #define SERAC_MARK_FUNCTION CALI_CXX_MARK_FUNCTION
82 #define SERAC_MARK_LOOP_BEGIN(id, name) CALI_CXX_MARK_LOOP_BEGIN(id, name)
83 #define SERAC_MARK_LOOP_ITERATION(id, i) CALI_CXX_MARK_LOOP_ITERATION(id, i)
84 #define SERAC_MARK_LOOP_END(id) CALI_CXX_MARK_LOOP_END(id)
85 #define SERAC_MARK_BEGIN(name) CALI_MARK_BEGIN(name)
86 #define SERAC_MARK_END(name) CALI_MARK_END(name)
87 #define SERAC_MARK_SCOPE(name) CALI_CXX_MARK_SCOPE(name)
90 #define SERAC_MARK_FUNCTION
91 #define SERAC_MARK_LOOP_BEGIN(id, name)
92 #define SERAC_MARK_LOOP_ITERATION(id, i)
93 #define SERAC_MARK_LOOP_END(id)
94 #define SERAC_MARK_BEGIN(name)
95 #define SERAC_MARK_END(name)
96 #define SERAC_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;
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.
void initialize([[maybe_unused]] MPI_Comm comm, [[maybe_unused]] std::string options)
Initializes performance monitoring using the Caliper and Adiak libraries.