We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
PPC_NUM_THREADS
1 parent e8c853a commit 6c1e33cCopy full SHA for 6c1e33c
1 file changed
modules/core/util/tests/util.cpp
@@ -2,6 +2,7 @@
2
3
#include <gtest/gtest.h>
4
5
+#include <libenvpp/detail/get.hpp>
6
#include <string_view>
7
8
#include "omp.h"
@@ -16,14 +17,9 @@ TEST(util_tests, extracts_correct_namespace) {
16
17
}
18
19
TEST(util_tests, threads_control_check_openmp_disabled_valgrind) {
- int ppc_num_threads = ppc::util::GetNumThreads();
20
+ const auto num_threads_env_var = env::get<int>("PPC_NUM_THREADS");
21
- int omp_num_threads = -1;
22
-#pragma omp parallel default(none) shared(omp_num_threads) num_threads(ppc::util::GetNumThreads())
23
- omp_num_threads = omp_get_num_threads();
24
-
25
- // Check Result
26
- ASSERT_EQ(ppc_num_threads, omp_num_threads);
+ EXPECT_EQ(ppc::util::GetNumThreads(), omp_get_max_threads());
27
28
29
namespace test_ns {
0 commit comments