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

Set maximum number of threads to 8 for unit tests

parent 223686a3
Branches
Tags
1 merge request!199Integrate checkpointing
...@@ -28,7 +28,7 @@ main(int argc, char* argv[]) ...@@ -28,7 +28,7 @@ main(int argc, char* argv[])
parallel::Messenger::create(argc, argv); parallel::Messenger::create(argc, argv);
const int nb_max_threads = std::max(std::thread::hardware_concurrency(), 1u); const int nb_max_threads = std::max(std::thread::hardware_concurrency(), 1u);
int nb_threads = std::max(nb_max_threads / parallel::Messenger::getInstance().size(), 1ul); int nb_threads = std::min(std::max(nb_max_threads / parallel::Messenger::getInstance().size(), 1ul), 8ul);
Catch::Session session; Catch::Session session;
......
...@@ -23,7 +23,7 @@ int ...@@ -23,7 +23,7 @@ int
main(int argc, char* argv[]) main(int argc, char* argv[])
{ {
parallel::Messenger::create(argc, argv); parallel::Messenger::create(argc, argv);
int nb_threads = std::max(std::thread::hardware_concurrency() / 2, 1u); int nb_threads = std::min(std::max(std::thread::hardware_concurrency() / 2, 1u), 8u);
Catch::Session session; Catch::Session session;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment