Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call Kokkos::initialize/finalize in UnitTestMain #269

Open
maartenarnst opened this issue Aug 26, 2024 · 0 comments
Open

Call Kokkos::initialize/finalize in UnitTestMain #269

maartenarnst opened this issue Aug 26, 2024 · 0 comments

Comments

@maartenarnst
Copy link
Contributor

Currently, in the tests, Kokkos is initialised and finalised in each test body.

In

@dalg24 suggested that we move Kokkos::initialize/finalize to UnitTestMain.cpp.

I've tried to do this. I've moved the Kokkos::initialize/finalize to UnitTestMain.cpp and then removed it everywhere from the tests (not only the new one in #267, but all tests).

The issue is then that some of the tools print to std::cout as part of their finalize callback. And so when we move Kokkos::finalize to main, hence after the conclusion of the test body, the test can no longer check this output. This leads to failure in test_space_time_stack_demangling.

I'm not sure how to solve it best. For "space time stack", we can move the printing functionality from the destructor of State to a print function. But then it wouldn't be clear how to call this function. An option may be to make State a singleton.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant