From 12a46743b3c379847e300d2af4e4c932f64dc593 Mon Sep 17 00:00:00 2001 From: Hiroshi Horii Date: Wed, 22 Mar 2023 11:07:26 +0900 Subject: [PATCH] use _OPENMP to select omp_set_max_active_levels or omp_set_nested --- src/controllers/aer_controller.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controllers/aer_controller.hpp b/src/controllers/aer_controller.hpp index 3fdbddf7c1..63c662a739 100644 --- a/src/controllers/aer_controller.hpp +++ b/src/controllers/aer_controller.hpp @@ -963,10 +963,10 @@ Result Controller::execute(std::vector &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");