Removed f_novirsum reduction in Verlet scheme
authorBerk Hess <hess@kth.se>
Wed, 15 Oct 2014 11:24:14 +0000 (13:24 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Mon, 20 Oct 2014 01:33:33 +0000 (03:33 +0200)
There is a reduction over MPI ranks (dd_move_f) for fr->f_novirsum
for the exclusion correction of PME, which should not contribute
to the virial. But with the Verlet scheme this is unnecessary,
since the exclusions fully are handled in the non-bonded kernels.

Change-Id: I65b3dc90cf01de7b33e955074dfa32bd1940f781

src/gromacs/mdlib/sim_util.c

index a6b166ccfd5acedb51742f9063d40207edda4e23..72a708f500580847d8de93446f9a707532a05f68 100644 (file)
@@ -1426,18 +1426,6 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
         /* Communicate the forces */
         wallcycle_start(wcycle, ewcMOVEF);
         dd_move_f(cr->dd, f, fr->fshift);
-        /* Do we need to communicate the separate force array
-         * for terms that do not contribute to the single sum virial?
-         * Position restraints and electric fields do not introduce
-         * inter-cg forces, only full electrostatics methods do.
-         * When we do not calculate the virial, fr->f_novirsum = f,
-         * so we have already communicated these forces.
-         */
-        if (EEL_FULL(fr->eeltype) && cr->dd->n_intercg_excl &&
-            (flags & GMX_FORCE_VIRIAL))
-        {
-            dd_move_f(cr->dd, fr->f_novirsum, NULL);
-        }
         if (bSepLRF)
         {
             /* We should not update the shift forces here,
@@ -1542,7 +1530,7 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
         }
 
         /* If we have NoVirSum forces, but we do not calculate the virial,
-         * we sum fr->f_novirum=f later.
+         * we sum fr->f_novirsum=f later.
          */
         if (vsite && !(fr->bF_NoVirSum && !(flags & GMX_FORCE_VIRIAL)))
         {
@@ -2020,7 +2008,7 @@ void do_force_cutsGROUP(FILE *fplog, t_commrec *cr,
         }
 
         /* If we have NoVirSum forces, but we do not calculate the virial,
-         * we sum fr->f_novirum=f later.
+         * we sum fr->f_novirsum=f later.
          */
         if (vsite && !(fr->bF_NoVirSum && !(flags & GMX_FORCE_VIRIAL)))
         {