Skip to content

Adding support for kokkos-tools#436

Draft
jeff-cohere wants to merge 3 commits into
masterfrom
jeff-cohere/kokkos-tools
Draft

Adding support for kokkos-tools#436
jeff-cohere wants to merge 3 commits into
masterfrom
jeff-cohere/kokkos-tools

Conversation

@jeff-cohere
Copy link
Copy Markdown
Contributor

@jeff-cohere jeff-cohere commented Apr 29, 2026

Motivation

At the 2026 ALCF hackathon, I've been using kokkos-tools (specifically the simple kernel timer) to understand performance bottlenecks in mam4xx. Kokkos-tools is easy to build and takes advantage of Kokkos instrumentation already compiled into an application, but it's a bit inconvenient to use because you have to set an environment variable to use it.

This PR introduces kokkos-tools as an optional feature for EKAT, and sets the environment variable appropriately in its bundled test session and catch2 main.

Testing

This is a build-system-only change--no new code features are added. I'm testing this in its feature branch at the hackathon. When I've verified that it works to my satisfaction, I'll mark this PR as ready for review.

Addenda

Apparently, kokkos-tools needs C++20, so this PR depends on #400.

@jeff-cohere
Copy link
Copy Markdown
Contributor Author

I guess now we have another reason to move to C++20:

CMake Error at /home/jnjohnson/hackathon/E3SM/externals/ekat/extern/kokkos-tools/CMakeLists.txt:12 (message):
  KokkosTools requires C++20

Copy link
Copy Markdown
Contributor

@bartgol bartgol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My biggest concern is linking the test session tgt to the catchmain tgt. I think we should avoid that. The other comment may be more debatable..

Comment thread src/testing-support/CMakeLists.txt Outdated
Comment thread src/testing-support/CMakeLists.txt Outdated
@jeff-cohere jeff-cohere requested a review from bartgol April 29, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants