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

Add Kokkos backend #13549

Closed
wants to merge 42 commits into from
Closed

Conversation

masterleinad
Copy link
Member

Builds on top of #13149 and tries to initialize Kokkos when needed and finalize it by registering Kokkos::finalize to std::atexit. In my tests that worked fine with Kokkos+Cuda and initial tests with Kokkos+Serial also looked
good.
It needs more thorough tests, though.

cmake/setup_cached_variables.cmake Show resolved Hide resolved
include/deal.II/base/config.h.in Outdated Show resolved Hide resolved
@bangerth
Copy link
Member

I would prefer if the ensure_kokkos_initialized() function would simply call Assert(). I continue to think that we should initialize Kokkos in MPI_InitFinalize() or, alternatively, in a Kokkos_InitFinalize() class that one can use in non-MPI programs. If you then have your ensure_kokkos_initialized() function simply terminate, this is an indication that a program just needs to add the initialization by hand.

@masterleinad
Copy link
Member Author

@bangerth At the moment, I am focussing on getting this pull request working with Kokkos+CUDA and DEAL_II_WITH_CUDA=ON. Then, I'm curious to see if calling std::atexit actually works with that configuration. If it does, I would consider it a long(er) term solution that could be done in a follow-up pull request, though. For now, it's at least helpful to automatically initialize Kokkos to be able to run the unit tests without modifying tests.

Of course, I'm open to other suggestions.

@masterleinad
Copy link
Member Author

Superseded by #14510.

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

Successfully merging this pull request may close these issues.

None yet

4 participants