From b8ec3e0cbd4ff2574bac2e89d7d489ac1604a996 Mon Sep 17 00:00:00 2001 From: Berk Hess Date: Tue, 30 Jun 2015 21:22:01 +0200 Subject: [PATCH] Fix inconsistent OpenMP automation The thread MPI single rank max thread count for non-Intel was 6, this was smaller than the max allowed MPI+OpenMP thread count of 8, which caused setups to be generated that did not pass the check. Increased 6 to 8 and added an assertion. Change-Id: I13787616d7c667cba3245da4f5b5c3a1a6a1206d --- src/programs/mdrun/resource-division.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/programs/mdrun/resource-division.cpp b/src/programs/mdrun/resource-division.cpp index 8378845cc1..63e64b226a 100644 --- a/src/programs/mdrun/resource-division.cpp +++ b/src/programs/mdrun/resource-division.cpp @@ -77,7 +77,7 @@ static const int min_atoms_per_gpu = 900; * Sandy/Ivy Bridge, Has/Broadwell. By checking for AVX instead of * model numbers we ensure also future Intel CPUs are covered. */ -const int nthreads_omp_always_faster_default = 6; +const int nthreads_omp_always_faster_default = 8; const int nthreads_omp_always_faster_Nehalem = 12; const int nthreads_omp_always_faster_Intel_AVX = 16; /* For CPU only runs the fastest options are usually MPI or OpenMP only. @@ -392,6 +392,7 @@ void check_resource_division_efficiency(const gmx_hw_info_t *hwinfo, * OpenMP have been initialized. Check that here. */ #ifdef GMX_THREAD_MPI + assert(nthreads_omp_always_faster_default >= nthreads_omp_mpi_ok_max); assert(hw_opt->nthreads_tmpi >= 1); #endif assert(gmx_omp_nthreads_get(emntDefault) >= 1); -- 2.22.0