File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 2
2
3
3
#include < gtest/gtest.h>
4
4
5
+ #include < libenvpp/detail/get.hpp>
5
6
#include < string_view>
6
7
7
8
#include " omp.h"
@@ -16,14 +17,9 @@ TEST(util_tests, extracts_correct_namespace) {
16
17
}
17
18
18
19
TEST (util_tests, threads_control_check_openmp_disabled_valgrind) {
19
- int ppc_num_threads = ppc::util::GetNumThreads ( );
20
+ const auto num_threads_env_var = env::get< int >( " PPC_NUM_THREADS " );
20
21
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);
22
+ EXPECT_EQ (ppc::util::GetNumThreads (), omp_get_max_threads ());
27
23
}
28
24
29
25
namespace test_ns {
You can’t perform that action at this time.
0 commit comments