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

Merge branch 'fix/kokkos-options' into 'develop'

Fix deprecated Kokkos command line option

See merge request !154
parents d36cf272 8d074188
No related branches found
No related tags found
1 merge request!154Fix deprecated Kokkos command line option
......@@ -83,6 +83,7 @@ initialize(int& argc, char* argv[])
parallel::Messenger::create(argc, argv);
bool enable_fpe = true;
bool enable_signals = true;
int nb_threads = -1;
std::string filename;
{
......@@ -97,9 +98,8 @@ initialize(int& argc, char* argv[])
return os.str();
});
int threads = -1;
app.add_option("--threads", threads, "Number of Kokkos threads")
->check(CLI::Range(1, std::numeric_limits<decltype(threads)>::max()));
app.add_option("--threads", nb_threads, "Number of Kokkos threads")
->check(CLI::Range(1, std::numeric_limits<decltype(nb_threads)>::max()));
bool enable_color = true;
app.add_flag("--color,!--no-color", enable_color, "Colorize console output [default: true]");
......@@ -139,7 +139,15 @@ initialize(int& argc, char* argv[])
SignalManager::init(enable_signals);
setDefaultOMPEnvironment();
Kokkos::initialize(argc, argv);
{
Kokkos::InitArguments args;
args.num_threads = nb_threads;
args.num_numa = -1;
args.device_id = -1;
args.disable_warnings = true;
Kokkos::initialize(args);
}
if (ConsoleManager::showPreamble()) {
std::cout << "----------------- " << rang::fg::green << "pugs exec info" << rang::fg::reset
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment