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

Fix deprecated Kokkos command line option

The option was passed directly to Kokkos.
Now one uses the InitArguments structure.
parent d36cf272
Branches
Tags
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