From a18c1a15ab8ca2251de24fc0c6e0e11e95dd6c7c Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Wed, 3 Feb 2021 14:02:56 +0100 Subject: [PATCH] correcting the output of the number of threads --- opm/simulators/flow/FlowMainEbos.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/opm/simulators/flow/FlowMainEbos.hpp b/opm/simulators/flow/FlowMainEbos.hpp index cbabd4daf..47f021d69 100644 --- a/opm/simulators/flow/FlowMainEbos.hpp +++ b/opm/simulators/flow/FlowMainEbos.hpp @@ -307,6 +307,11 @@ namespace Opm threads = omp_get_max_threads(); else threads = std::min(2, omp_get_max_threads()); + + const int input_threads = EWOMS_GET_PARAM(TypeTag, int, ThreadsPerProcess); + + if (input_threads > 0) + threads = std::min(input_threads, omp_get_max_threads()); #endif #if HAVE_MPI