Skip to content

Allow better customization of Caliper "configurations"/ options #1246

@chapman39

Description

@chapman39

Adding extra options to Caliper besides the default has some support but there isn't really a way to utilize it using the Serac initialize function. Allowing extra Caliper options would help when we want to test MPI in more depth as well as HIP and CUDA. I haven't tested other Caliper options very much yet, but you can see them here. We could alternatively do something like Axom. This is the current situation:

// Serac Init
std::pair<int, int> initialize(int argc, char* argv[], MPI_Comm comm)
{
  ...
  // Start the profiler (no-op if not enabled)
  profiling::initialize(comm); // <-- this call should include the "options" argument, seen below
  ...
}

// Caliper Init
void initialize([[maybe_unused]] MPI_Comm comm, [[maybe_unused]] std::string options)
{
  ...
#ifdef SERAC_USE_CALIPER
  // Initialize Caliper
  mgr               = cali::ConfigManager();
  auto check_result = mgr->check(options.c_str());

  if (check_result.empty()) {
    mgr->add(options.c_str());
  } else {
    SLIC_WARNING_ROOT("Caliper options invalid, ignoring: " << check_result);
  }

  // Defaults, should probably always be enabled
  mgr->add("runtime-report,spot");
  mgr->start();
  ...

Metadata

Metadata

Assignees

Labels

testingRelated to testing

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions