Fix inconsistent OpenMP automation
authorBerk Hess <hess@kth.se>
Tue, 30 Jun 2015 19:22:01 +0000 (21:22 +0200)
committerBerk Hess <hess@kth.se>
Tue, 30 Jun 2015 20:23:36 +0000 (22:23 +0200)
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

index 8378845cc1d9ffa213dbe37176fe0f7dda6bccf1..63e64b226aaab5dbfd688da180ba03faecd81895 100644 (file)
@@ -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);