From a4460dbd6add5ba0180e21b1aa9deaf6c2a6b251 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Szil=C3=A1rd=20P=C3=A1ll?= Date: Tue, 16 Apr 2019 00:23:18 +0200 Subject: [PATCH] Remove "coarse load balancing vars" from forcerec Legacy timing code dropped during cleanup. Change-Id: I4a3d0f69d926973c6269df15eea8b448539c54d4 --- src/gromacs/mdlib/force.cpp | 47 +----------------------------------------- src/gromacs/mdlib/forcerec.cpp | 5 ----- src/gromacs/mdtypes/forcerec.h | 5 ----- 3 files changed, 1 insertion(+), 56 deletions(-) diff --git a/src/gromacs/mdlib/force.cpp b/src/gromacs/mdlib/force.cpp index a9e3486df7..fbd645067f 100644 --- a/src/gromacs/mdlib/force.cpp +++ b/src/gromacs/mdlib/force.cpp @@ -38,8 +38,6 @@ #include "force.h" -#include "config.h" - #include #include #include @@ -71,7 +69,6 @@ #include "gromacs/pbcutil/mshift.h" #include "gromacs/pbcutil/pbc.h" #include "gromacs/timing/wallcycle.h" -#include "gromacs/utility/cstringutil.h" #include "gromacs/utility/exceptions.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/smalloc.h" @@ -123,10 +120,6 @@ void do_force_lowlevel(t_forcerec *fr, int flags, const DDBalanceRegionHandler &ddBalanceRegionHandler) { -#if GMX_MPI - double t0 = 0.0, t1, t2, t3; /* time measurement for coarse load balancing */ -#endif - /* do QMMM first if requested */ if (fr->bQMMM) { @@ -135,16 +128,6 @@ void do_force_lowlevel(t_forcerec *fr, /* Call the short range functions all in one go. */ -#if GMX_MPI - /*#define TAKETIME ((cr->npmenodes) && (fr->timesteps < 12))*/ -#define TAKETIME FALSE - if (TAKETIME) - { - MPI_Barrier(cr->mpi_comm_mygroup); - t0 = MPI_Wtime(); - } -#endif - if (ir->nwall) { /* foreign lambda component for walls */ @@ -154,14 +137,6 @@ void do_force_lowlevel(t_forcerec *fr, enerd->dvdl_lin[efptVDW] += dvdl_walls; } -#if GMX_MPI - if (TAKETIME) - { - t1 = MPI_Wtime(); - fr->t_fnbf += t1-t0; - } -#endif - /* Shift the coordinates. Must be done before listed forces and PPPM, * but is also necessary for SHAKE and update, therefore it can NOT * go when no listed forces have to be evaluated. @@ -192,8 +167,7 @@ void do_force_lowlevel(t_forcerec *fr, { t_pbc pbc; - /* Check whether we need to take into account PBC in the following force tasks: - * listed interactions. */ + /* Check whether we need to take into account PBC in listed interactions. */ const auto needPbcForListedForces = fr->bMolPBC && bool(flags & GMX_FORCE_LISTED) && haveCpuListedForces(*fr, *idef, *fcd); if (needPbcForListedForces) { @@ -418,25 +392,6 @@ void do_force_lowlevel(t_forcerec *fr, print_nrnb(debug, nrnb); } -#if GMX_MPI - if (TAKETIME) - { - t2 = MPI_Wtime(); - MPI_Barrier(cr->mpi_comm_mygroup); - t3 = MPI_Wtime(); - fr->t_wait += t3-t2; - if (fr->timesteps == 11) - { - char buf[22]; - fprintf(stderr, "* PP load balancing info: rank %d, step %s, rel wait time=%3.0f%% , load string value: %7.2f\n", - cr->nodeid, gmx_step_str(fr->timesteps, buf), - 100*fr->t_wait/(fr->t_wait+fr->t_fnbf), - (fr->t_fnbf+fr->t_wait)/fr->t_fnbf); - } - fr->timesteps++; - } -#endif - if (debug) { pr_rvecs(debug, 0, "fshift after bondeds", fr->fshift, SHIFTS); diff --git a/src/gromacs/mdlib/forcerec.cpp b/src/gromacs/mdlib/forcerec.cpp index 4403dbd939..4187102a14 100644 --- a/src/gromacs/mdlib/forcerec.cpp +++ b/src/gromacs/mdlib/forcerec.cpp @@ -2327,11 +2327,6 @@ void init_forcerec(FILE *fp, fr->print_force = print_force; - /* coarse load balancing vars */ - fr->t_fnbf = 0.; - fr->t_wait = 0.; - fr->timesteps = 0; - /* Initialize neighbor search */ snew(fr->ns, 1); init_ns(fp, cr, fr->ns, fr, mtop); diff --git a/src/gromacs/mdtypes/forcerec.h b/src/gromacs/mdtypes/forcerec.h index 2d3e5498b1..2c105186fa 100644 --- a/src/gromacs/mdtypes/forcerec.h +++ b/src/gromacs/mdtypes/forcerec.h @@ -299,11 +299,6 @@ struct t_forcerec { // NOLINT (clang-analyzer-optin.performance.Padding) /* Limit for printing large forces, negative is don't print */ real print_force = 0; - /* coarse load balancing time measurement */ - double t_fnbf = 0; - double t_wait = 0; - int timesteps = 0; - /* User determined parameters, copied from the inputrec */ int userint1 = 0; int userint2 = 0; -- 2.11.4.GIT