Commit e2152d08 authored by Timo Koch's avatar Timo Koch
Browse files

[multithreading] Add Kokkos support to Dumux::initialize

parent 1b483dfc
......@@ -26,6 +26,25 @@
#include <dune/common/parallel/mpihelper.hh>
#if HAVE_KOKKOS
#include <Kokkos_Core.hpp>
namespace Dumux {
class KokkosScopeGuard
{
public:
static Kokkos::ScopeGuard& instance(int& argc, char* argv[])
{
static Kokkos::ScopeGuard guard(argc, argv);
return guard;
}
};
} // end namespace Dumux
#endif // HAVE_KOKKOS
namespace Dumux {
void initialize(int& argc, char* argv[])
......@@ -35,6 +54,12 @@ void initialize(int& argc, char* argv[])
Dune::MPIHelper::instance(argc, argv);
}
#if HAVE_KOKKOS
// initialize Kokkos (command line / environmental variable interface)
KokkosScopeGuard::instance(argc, argv);
#endif
}
} // end namespace Dumux
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment