fixed GPU pair-search with GMX_CPU_ACCELERATION=None
authorBerk Hess <hess@kth.se>
Fri, 7 Dec 2012 16:49:11 +0000 (17:49 +0100)
committerBerk Hess <hess@kth.se>
Fri, 7 Dec 2012 16:49:11 +0000 (17:49 +0100)
Fixes #1042 and fixes #1062

Change-Id: I95ed242823aa1c108fc6c26bedc88062a0cd81d7

src/mdlib/nbnxn_search.c

index d46aa8a991ce75e33729a88b024da4f88375dc1e..f356973898af2f48b8d0cdacac50b0d71ddb2a31 100644 (file)
@@ -3549,12 +3549,12 @@ static void set_icell_bb_supersub(const float *bb,int ci,
     ia = ci*GPU_NSUBCELL*NNBSBB_B;
     for(i=0; i<GPU_NSUBCELL*NNBSBB_B; i+=NNBSBB_B)
     {
-        bb_ci[BBL_X] = bb[ia+BBL_X] + shx;
-        bb_ci[BBL_Y] = bb[ia+BBL_Y] + shy;
-        bb_ci[BBL_Z] = bb[ia+BBL_Z] + shz;
-        bb_ci[BBU_X] = bb[ia+BBU_X] + shx;
-        bb_ci[BBU_Y] = bb[ia+BBU_Y] + shy;
-        bb_ci[BBU_Z] = bb[ia+BBU_Z] + shz;
+        bb_ci[i+BBL_X] = bb[ia+i+BBL_X] + shx;
+        bb_ci[i+BBL_Y] = bb[ia+i+BBL_Y] + shy;
+        bb_ci[i+BBL_Z] = bb[ia+i+BBL_Z] + shz;
+        bb_ci[i+BBU_X] = bb[ia+i+BBU_X] + shx;
+        bb_ci[i+BBU_Y] = bb[ia+i+BBU_Y] + shy;
+        bb_ci[i+BBU_Z] = bb[ia+i+BBU_Z] + shz;
     }
 #endif
 }
@@ -4923,6 +4923,9 @@ void nbnxn_make_pairlist(const nbnxn_search_t nbs,
             }
         }
 
-        print_reduction_cost(&nbat->buffer_flags,nnbl);
+        if (nbat->bUseBufferFlags)
+        {
+            print_reduction_cost(&nbat->buffer_flags,nnbl);
+        }
     }
 }