Allow better customization of Caliper "configurations"/ options
- Dominant language
- C++
- Stars
- 245
- Forks
- 36
- Avg merge
- 8d 23h
- Merged PRs (30d)
- 4
Description
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](https://software.llnl.gov/Caliper/CaliperBasics.html#more-on-configurations). We could alternatively do something like [Axom](https://github.com/LLNL/axom/blob/develop/src/axom/core/utilities/Annotations.cpp#L92). This is the current situation:
```cpp
// Serac Init
std::pair 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();
...
```
Contributor guide
Assessment
This issue has not been assessed yet.