Smith  0.1
Smith is an implicit thermal structural mechanics simulation code.
Namespaces | Macros | Functions
profiling.hpp File Reference

Various helper functions and macros for profiling using Caliper. More...

#include <string>
#include <sstream>
#include "smith/smith_config.hpp"
#include "mpi.h"
Include dependency graph for profiling.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 smith
 Accelerator functionality.
 
 smith::profiling
 profiling namespace
 

Macros

#define SMITH_SET_METADATA(name, data)
 
#define SMITH_MARK_FUNCTION
 
#define SMITH_MARK_LOOP_BEGIN(id, name)
 
#define SMITH_MARK_LOOP_ITERATION(id, i)
 
#define SMITH_MARK_LOOP_END(id)
 
#define SMITH_MARK_BEGIN(name)
 
#define SMITH_MARK_END(name)
 
#define SMITH_MARK_SCOPE(name)
 

Functions

void smith::profiling::initialize ([[maybe_unused]] MPI_Comm comm=MPI_COMM_WORLD,[[maybe_unused]] std::string options="")
 Initializes performance monitoring using the Caliper and Adiak libraries. More...
 
void smith::profiling::finalize ()
 Concludes performance monitoring and writes collected data to a file.
 
template<typename... T>
std::string smith::profiling::concat (T... args)
 Produces a string by applying << to all arguments.
 

Detailed Description

Various helper functions and macros for profiling using Caliper.

Definition in file profiling.hpp.

Macro Definition Documentation

◆ SMITH_MARK_BEGIN

#define SMITH_MARK_BEGIN (   name)

Marks the start of a region Caliper profiling. No-op macro when ENABLE_PROFILING is off.

Definition at line 94 of file profiling.hpp.

◆ SMITH_MARK_END

#define SMITH_MARK_END (   name)

Marks the end of a region Caliper profiling. No-op macro when ENABLE_PROFILING is off.

Definition at line 95 of file profiling.hpp.

◆ SMITH_MARK_FUNCTION

#define SMITH_MARK_FUNCTION

Marks a function for Caliper profiling. No-op macro when ENABLE_PROFILING is off.

Definition at line 90 of file profiling.hpp.

◆ SMITH_MARK_LOOP_BEGIN

#define SMITH_MARK_LOOP_BEGIN (   id,
  name 
)

Marks the beginning of a loop block for Caliper profiling. No-op macro when ENABLE_PROFILING is off.

Definition at line 91 of file profiling.hpp.

◆ SMITH_MARK_LOOP_END

#define SMITH_MARK_LOOP_END (   id)

Marks the end of a loop block for Caliper profiling. No-op macro when ENABLE_PROFILING is off.

Definition at line 93 of file profiling.hpp.

◆ SMITH_MARK_LOOP_ITERATION

#define SMITH_MARK_LOOP_ITERATION (   id,
 
)

Marks the beginning of a loop iteration for Caliper profiling. No-op macro when ENABLE_PROFILING is off.

Definition at line 92 of file profiling.hpp.

◆ SMITH_MARK_SCOPE

#define SMITH_MARK_SCOPE (   name)

Marks a particular scope for Caliper profiling. No-op macro when ENABLE_PROFILING is off.

Definition at line 96 of file profiling.hpp.

◆ SMITH_SET_METADATA

#define SMITH_SET_METADATA (   name,
  data 
)

Sets metadata in adiak/caliper. Calls adiak::value

Definition at line 39 of file profiling.hpp.