Added update x copy-back to update timer
authorBerk Hess <hess@kth.se>
Mon, 9 Mar 2015 16:27:34 +0000 (17:27 +0100)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Wed, 11 Mar 2015 01:51:14 +0000 (02:51 +0100)
Change-Id: I0f5c17722512e21bbb3cbddd022b1a8769b08595

src/gromacs/mdlib/update.cpp

index d5d18d2ab4e6e53f951774bc34f92167812104a1..140c2e3d37668ee33382d461193eada8fbdad1a9 100644 (file)
@@ -1721,6 +1721,13 @@ void update_constraints(FILE             *fplog,
 
     if (!(bFirstHalf)) /* in the first half of vv, no shift. */
     {
+        /* NOTE This part of the update actually does not belong with
+         * the constraints, since we also call it without constraints.
+         * But currently we always integrate to a temporary buffer and
+         * then copy the results back here.
+         */
+        wallcycle_start_nocount(wcycle, ewcUPDATE);
+
         if (graph && (graph->nnodes > 0))
         {
             unshift_x(graph, state->box, state->x, upd->xp);
@@ -1745,6 +1752,7 @@ void update_constraints(FILE             *fplog,
                 copy_rvec(upd->xp[i], state->x[i]);
             }
         }
+        wallcycle_stop(wcycle, ewcUPDATE);
 
         dump_it_all(fplog, "After unshift",
                     state->natoms, state->x, upd->xp, state->v, force);