QMCPACK
test_UtilityFunctionsOPENMP.cpp
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2023 QMCPACK developers.
6 //
7 // File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
8 //
9 // File created by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 #include "catch.hpp"
13 
15 
16 namespace qmcplusplus
17 {
18 using namespace Concurrency;
19 
20 TEST_CASE("UtilityFunctions OpenMP", "[concurrency]")
21 {
22  const int old_threads = maxCapacity<Executor::OPENMP>();
23 #ifdef _OPENMP
24  {
26  CHECK(maxCapacity<Executor::OPENMP>() == 97);
27  {
30  CHECK(maxCapacity<Executor::OPENMP>() == 17);
31  }
32  CHECK(maxCapacity<Executor::OPENMP>() == 97);
33 
34  {
36  CHECK(maxCapacity<Executor::OPENMP>() == 37);
37  }
38  CHECK(maxCapacity<Executor::OPENMP>() == 97);
39  }
40 #endif
41  CHECK(maxCapacity<Executor::OPENMP>() == old_threads);
42 }
43 
44 } // namespace qmcplusplus
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
TEST_CASE("complex_helper", "[type_traits]")
void omp_set_num_threads(int num_threads)
Definition: OpenMP.h:31
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))
utility functions for executors