Update after move of ThreadsPerProcess from Properties to Parameters

This commit is contained in:
Vegard Kippe 2024-07-11 15:55:34 +02:00
parent 14818028f0
commit dd08952967
2 changed files with 3 additions and 3 deletions

View File

@ -388,7 +388,7 @@ namespace Opm {
// Issue a warning if both OMP_NUM_THREADS and --threads-per-process are set, // Issue a warning if both OMP_NUM_THREADS and --threads-per-process are set,
// but let the environment variable take precedence. // but let the environment variable take precedence.
const int default_threads = 2; const int default_threads = 2;
const int requested_threads = Parameters::get<TypeTag, Properties::ThreadsPerProcess>(); const int requested_threads = Parameters::get<TypeTag, Parameters::ThreadsPerProcess>();
const char* env_var = getenv("OMP_NUM_THREADS"); const char* env_var = getenv("OMP_NUM_THREADS");
int omp_num_threads = -1; int omp_num_threads = -1;
try { try {

View File

@ -20,7 +20,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>. along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef OPM_MAIN_HEADER_INCLUDED #ifndef OPM_MAIN_HEADER_INCLUDEDp
#define OPM_MAIN_HEADER_INCLUDED #define OPM_MAIN_HEADER_INCLUDED
#include <flow/flow_blackoil.hpp> #include <flow/flow_blackoil.hpp>
@ -715,7 +715,7 @@ private:
// Hence we duplicate the code of setupParallelism to get the number of threads. // Hence we duplicate the code of setupParallelism to get the number of threads.
static bool first_time = true; static bool first_time = true;
const int default_threads = 2; const int default_threads = 2;
const int requested_threads = Parameters::get<TypeTag, Properties::ThreadsPerProcess>(); const int requested_threads = Parameters::get<TypeTag, Parameters::ThreadsPerProcess>();
const char* env_var = getenv("OMP_NUM_THREADS"); const char* env_var = getenv("OMP_NUM_THREADS");
int omp_num_threads = -1; int omp_num_threads = -1;
try { try {