Skip to content

Commit

Permalink
use _OPENMP to select omp_set_max_active_levels or omp_set_nested
Browse files Browse the repository at this point in the history
  • Loading branch information
hhorii committed Mar 22, 2023
1 parent d0e04b4 commit 12a4674
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/controllers/aer_controller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -963,10 +963,10 @@ Result Controller::execute(std::vector<Circuit> &circuits,
parallel_nested_ = true;

// nested should be set to zero if num_threads clause will be used
#if defined(_WIN64) || defined(_WIN32)
omp_set_nested(0);
#else
#ifdef _OPENMP >= 200805
omp_set_max_active_levels(0);
#else
omp_set_nested(0);
#endif

result.metadata.add(parallel_nested_, "omp_nested");
Expand Down

0 comments on commit 12a4674

Please sign in to comment.