Fix GMX_NONBONDED_NUM_THREADS!=GMX_PAIRSEARCH_NUM_THREADS
authorRoland Schulz <roland@utk.edu>
Wed, 16 Jul 2014 00:13:01 +0000 (20:13 -0400)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Mon, 21 Jul 2014 23:34:09 +0000 (01:34 +0200)
Change-Id: I7d5416fa299e244244d7bf48e785090da2e0b6d0

src/gromacs/mdlib/forcerec.c
src/gromacs/mdlib/nbnxn_search.c

index fa66ca664b6ffe981ae8fbaca3ad163f29ab40dc..401f04c0429b1c99f4488921f4a135c4d12091b4 100644 (file)
@@ -2240,7 +2240,7 @@ static void init_nb_verlet(FILE                *fp,
                       DOMAINDECOMP(cr) ? &cr->dd->nc : NULL,
                       DOMAINDECOMP(cr) ? domdec_zones(cr->dd) : NULL,
                       bFEP_NonBonded,
-                      gmx_omp_nthreads_get(emntNonbonded));
+                      gmx_omp_nthreads_get(emntPairsearch));
 
     for (i = 0; i < nbv->ngrp; i++)
     {
index ae8b82caf72abdd63fae0e4288d58d1a173ed23c..1bc3f05847cd94782e1a67ceae0cc70ef57e3462 100644 (file)
@@ -1697,8 +1697,8 @@ static void calc_cell_indices(const nbnxn_search_t nbs,
     }
 
     /* Sort the super-cell columns along z into the sub-cells. */
-#pragma omp parallel for num_threads(nbs->nthread_max) schedule(static)
-    for (thread = 0; thread < nbs->nthread_max; thread++)
+#pragma omp parallel for num_threads(nthread) schedule(static)
+    for (thread = 0; thread < nthread; thread++)
     {
         if (grid->bSimple)
         {