Skip to content
Snippets Groups Projects
Commit ad7bff9b authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add simple embedding for initialize and finalize functions

parent f9b85404
Branches
Tags
1 merge request!8Feature/kokkos encapsulate
......@@ -87,38 +87,11 @@ int main(int argc, char *argv[])
std::cout << ")\n";
std::cout << "-------------------------------------------------------\n";
Kokkos::initialize(argc, argv);
initialize(argc, argv);
Kokkos::DefaultExecutionSpace::print_configuration(std::cout);
std::map<std::string, double> method_cost_map;
// { // Basic function based acoustic solver
// Kokkos::Timer timer;
// timer.reset();
// RawKokkos::AcousticSolver(number);
// method_cost_map["RawKokkos"] = timer.seconds();
// }
// { // class for acoustic solver (mesh less)
// Kokkos::Timer timer;
// timer.reset();
// MeshLessAcousticSolver acoustic_solver(number);
// method_cost_map["MeshLessAcousticSolver"] = timer.seconds();
// }
// { // class for acoustic solver
// Kokkos::Timer timer;
// timer.reset();
// AcousticSolverClass acoustic_solver(number);
// method_cost_map["AcousticSolverClass"] = timer.seconds();
// }
// { // class for acoustic solver test
// Kokkos::Timer timer;
// timer.reset();
// AcousticSolverTest acoustic_solver(number);
// method_cost_map["AcousticSolverTest"] = timer.seconds();
// }
try {
if (filename != "") {
std::cout << "Reading (gmsh) " << rang::style::underline << filename << rang::style::reset << " ...\n";
......@@ -444,7 +417,7 @@ int main(int argc, char *argv[])
std::exit(1);
}
Kokkos::finalize();
finalize();
std::string::size_type size=0;
for (const auto& method_cost : method_cost_map) {
......
......@@ -8,6 +8,7 @@ add_library(
BacktraceManager.cpp
ConsoleManager.cpp
FPEManager.cpp
PastisUtils.cpp
RevisionInfo.cpp
SignalManager.cpp)
......
#include <PastisUtils.hpp>
#include <Kokkos_Core.hpp>
void initialize(int& argc, char* argv[])
{
Kokkos::initialize(argc,argv);
}
void finalize()
{
Kokkos::finalize();
}
......@@ -26,4 +26,8 @@ void parallel_reduce(const size_t& size,
Kokkos::parallel_reduce(label, size, array, value);
}
void initialize(int& argc, char* argv[]);
void finalize();
#endif // PASTIS_UTILS_HPP
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment