fixed GPU particle gridding performance issue
authorBerk Hess <hess@kth.se>
Thu, 14 Feb 2013 21:27:17 +0000 (22:27 +0100)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Mon, 18 Feb 2013 21:17:15 +0000 (22:17 +0100)
The scaling factor for the grid binning for the GPU pair search
was set incorrectly, which made the binning 50% slower.

Change-Id: I146592c37094a3d81a7ae50b3903fcc615e748d5

src/mdlib/nbnxn_search.c

index 00e1e48b9a796713df4f93fbc226bdc6b8f67cc4..6e0ea13d9197c40ec6f24c2cf93195c6b8a5f0c5 100644 (file)
@@ -1356,7 +1356,8 @@ static void sort_columns_supersub(const nbnxn_search_t nbs,
             /* Sort the atoms along y */
             sort_atoms(YY, (sub_z & 1),
                        nbs->a+ash_z, na_z, x,
-                       grid->c0[YY]+cy*grid->sy, grid->inv_sy,
+                       grid->c0[YY]+cy*grid->sy,
+                       subdiv_y*SORT_GRID_OVERSIZE*grid->inv_sy,
                        subdiv_y*SGSF, sort_work);
 #endif
 
@@ -1369,7 +1370,8 @@ static void sort_columns_supersub(const nbnxn_search_t nbs,
                 /* Sort the atoms along x */
                 sort_atoms(XX, ((cz*GPU_NSUBCELL_Y + sub_y) & 1),
                            nbs->a+ash_y, na_y, x,
-                           grid->c0[XX]+cx*grid->sx, grid->inv_sx,
+                           grid->c0[XX]+cx*grid->sx,
+                           subdiv_x*SORT_GRID_OVERSIZE*grid->inv_sx,
                            subdiv_x*SGSF, sort_work);
 #endif