*at_end = dd->comm->nat[ddnatCON];
}
-void dd_move_x(gmx_domdec_t *dd, matrix box, rvec x[])
+void dd_move_x(gmx_domdec_t *dd, matrix box, rvec x[], gmx_wallcycle *wcycle)
{
+ wallcycle_start(wcycle, ewcMOVEX);
+
int nzone, nat_tot, n, d, p, i, j, at0, at1, zone;
int *index, *cgindex;
gmx_domdec_comm_t *comm;
}
nzone += nzone;
}
+
+ wallcycle_stop(wcycle, ewcMOVEX);
}
-void dd_move_f(gmx_domdec_t *dd, rvec f[], rvec *fshift)
+void dd_move_f(gmx_domdec_t *dd, rvec f[], rvec *fshift, gmx_wallcycle *wcycle)
{
+ wallcycle_start(wcycle, ewcMOVEF);
+
int nzone, nat_tot, n, d, p, i, j, at0, at1, zone;
int *index, *cgindex;
gmx_domdec_comm_t *comm;
}
nzone /= 2;
}
+ wallcycle_stop(wcycle, ewcMOVEF);
}
void dd_atom_spread_real(gmx_domdec_t *dd, real v[])
gmx_vsite_t *vsite,
gmx_constr_t constr,
t_nrnb *nrnb,
- gmx_wallcycle_t wcycle,
+ gmx_wallcycle *wcycle,
gmx_bool bVerbose)
{
gmx_domdec_t *dd;
if (comm->nstDDDump > 0 && step % comm->nstDDDump == 0)
{
- dd_move_x(dd, state_local->box, as_rvec_array(state_local->x.data()));
+ dd_move_x(dd, state_local->box, as_rvec_array(state_local->x.data()), nullWallcycle);
write_dd_pdb("dd_dump", step, "dump", top_global, cr,
-1, as_rvec_array(state_local->x.data()), state_local->box);
}
#include "gromacs/math/paddedvector.h"
#include "gromacs/math/vectypes.h"
-#include "gromacs/timing/wallcycle.h"
#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/real.h"
struct t_inputrec;
struct t_mdatoms;
struct t_nrnb;
+struct gmx_wallcycle;
class t_state;
namespace gmx
float dd_pme_f_ratio(struct gmx_domdec_t *dd);
/*! \brief Communicate the coordinates to the neighboring cells and do pbc. */
-void dd_move_x(struct gmx_domdec_t *dd, matrix box, rvec x[]);
+void dd_move_x(struct gmx_domdec_t *dd, matrix box, rvec x[], gmx_wallcycle *wcycle);
/*! \brief Sum the forces over the neighboring cells.
*
* When fshift!=NULL the shift forces are updated to obtain
* the correct virial from the single sum including f.
*/
-void dd_move_f(struct gmx_domdec_t *dd, rvec f[], rvec *fshift);
+void dd_move_f(struct gmx_domdec_t *dd, rvec f[], rvec *fshift, gmx_wallcycle *wcycle);
/*! \brief Communicate a real for each atom to the neighboring cells. */
void dd_atom_spread_real(struct gmx_domdec_t *dd, real v[]);
gmx_vsite_t *vsite,
struct gmx_constr *constr,
t_nrnb *nrnb,
- gmx_wallcycle_t wcycle,
+ gmx_wallcycle *wcycle,
gmx_bool bVerbose);
/*! \brief Reset all the statistics and counters for total run counting */
void pme_gpu_prepare_computation(gmx_pme_t *pme,
bool needToUpdateBox,
const matrix box,
- gmx_wallcycle_t wcycle,
+ gmx_wallcycle *wcycle,
int flags)
{
GMX_ASSERT(pme_gpu_active(pme), "This should be a GPU run of PME but it is not enabled.");
void pme_gpu_launch_spread(gmx_pme_t *pme,
const rvec *x,
- gmx_wallcycle_t wcycle)
+ gmx_wallcycle *wcycle)
{
GMX_ASSERT(pme_gpu_active(pme), "This should be a GPU run of PME but it is not enabled.");
}
void pme_gpu_launch_complex_transforms(gmx_pme_t *pme,
- gmx_wallcycle_t wcycle)
+ gmx_wallcycle *wcycle)
{
PmeGpu *pmeGpu = pme->gpu;
const bool computeEnergyAndVirial = pmeGpu->settings.currentFlags & GMX_PME_CALC_ENER_VIR;
}
void pme_gpu_launch_gather(const gmx_pme_t *pme,
- gmx_wallcycle_t gmx_unused wcycle,
+ gmx_wallcycle gmx_unused *wcycle,
PmeForceOutputHandling forceTreatment)
{
GMX_ASSERT(pme_gpu_active(pme), "This should be a GPU run of PME but it is not enabled.");
}
bool pme_gpu_try_finish_task(const gmx_pme_t *pme,
- gmx_wallcycle_t wcycle,
+ gmx_wallcycle *wcycle,
gmx::ArrayRef<const gmx::RVec> *forces,
matrix virial,
real *energy,
}
void pme_gpu_wait_finish_task(const gmx_pme_t *pme,
- gmx_wallcycle_t wcycle,
+ gmx_wallcycle *wcycle,
gmx::ArrayRef<const gmx::RVec> *forces,
matrix virial,
real *energy)
int gmx_pmeonly(struct gmx_pme_t *pme,
t_commrec *cr, t_nrnb *mynrnb,
- gmx_wallcycle_t wcycle,
+ gmx_wallcycle *wcycle,
gmx_walltime_accounting_t walltime_accounting,
t_inputrec *ir, PmeRunMode runMode)
{
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#include "gromacs/mdtypes/forceoutput.h"
#include "gromacs/mdtypes/interaction_const.h"
#include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/timing/wallcycle.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/gmxmpi.h"
#include "gromacs/utility/smalloc.h"
void gmx_pme_send_coordinates(t_commrec *cr, matrix box, rvec *x,
real lambda_q, real lambda_lj,
gmx_bool bEnerVir,
- gmx_int64_t step)
+ gmx_int64_t step, gmx_wallcycle *wcycle)
{
+ wallcycle_start(wcycle, ewcPP_PMESENDX);
+
unsigned int flags = PP_PME_COORD;
if (bEnerVir)
{
}
gmx_pme_send_coeffs_coords(cr, flags, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
box, x, lambda_q, lambda_lj, 0, 0, step);
+
+ wallcycle_stop(wcycle, ewcPP_PMESENDX);
}
void gmx_pme_send_finish(t_commrec *cr)
real sigmaA[], real sigmaB[],
matrix box, t_commrec *cr,
int maxshift_x, int maxshift_y,
- t_nrnb *nrnb, gmx_wallcycle_t wcycle,
+ t_nrnb *nrnb, gmx_wallcycle *wcycle,
matrix vir_q, matrix vir_lj,
real *energy_q, real *energy_lj,
real lambda_q, real lambda_lj,
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#include <string>
#include "gromacs/math/vectypes.h"
-#include "gromacs/timing/wallcycle.h"
#include "gromacs/timing/walltime_accounting.h"
#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/basedefinitions.h"
struct gmx_wallclock_gpu_pme_t;
struct gmx_device_info_t;
struct gmx_pme_t;
+struct gmx_wallcycle;
enum class GpuTaskCompletion;
real sigmaA[], real sigmaB[],
matrix box, t_commrec *cr,
int maxshift_x, int maxshift_y,
- t_nrnb *nrnb, gmx_wallcycle_t wcycle,
+ t_nrnb *nrnb, gmx_wallcycle *wcycle,
matrix vir_q, matrix vir_lj,
real *energy_q, real *energy_lj,
real lambda_q, real lambda_lj,
/*! \brief Called on the nodes that do PME exclusively (as slaves) */
int gmx_pmeonly(struct gmx_pme_t *pme,
struct t_commrec *cr, t_nrnb *mynrnb,
- gmx_wallcycle_t wcycle,
+ gmx_wallcycle *wcycle,
gmx_walltime_accounting_t walltime_accounting,
t_inputrec *ir, PmeRunMode runMode);
void gmx_pme_send_coordinates(struct t_commrec *cr, matrix box, rvec *x,
real lambda_q, real lambda_lj,
gmx_bool bEnerVir,
- gmx_int64_t step);
+ gmx_int64_t step, gmx_wallcycle *wcycle);
/*! \brief Tell our PME-only node to finish */
void gmx_pme_send_finish(struct t_commrec *cr);
void pme_gpu_prepare_computation(gmx_pme_t *pme,
bool needToUpdateBox,
const matrix box,
- gmx_wallcycle_t wcycle,
+ gmx_wallcycle *wcycle,
int flags);
/*! \brief
*/
void pme_gpu_launch_spread(gmx_pme_t *pme,
const rvec *x,
- gmx_wallcycle_t wcycle);
+ gmx_wallcycle *wcycle);
/*! \brief
* Launches middle stages of PME (FFT R2C, solving, FFT C2R) either on GPU or on CPU, depending on the run mode.
* \param[in] wcycle The wallclock counter.
*/
void pme_gpu_launch_complex_transforms(gmx_pme_t *pme,
- gmx_wallcycle_t wcycle);
+ gmx_wallcycle *wcycle);
/*! \brief
* Launches last stage of PME on GPU - force gathering and D2H force transfer.
* and accumulates. The reduction is non-atomic.
*/
void pme_gpu_launch_gather(const gmx_pme_t *pme,
- gmx_wallcycle_t wcycle,
+ gmx_wallcycle *wcycle,
PmeForceOutputHandling forceTreatment);
/*! \brief
* \param[out] energy The output energy.
*/
void pme_gpu_wait_finish_task(const gmx_pme_t *pme,
- gmx_wallcycle_t wcycle,
+ gmx_wallcycle *wcycle,
gmx::ArrayRef<const gmx::RVec> *forces,
matrix virial,
real *energy);
* \returns True if the PME GPU tasks have completed
*/
bool pme_gpu_try_finish_task(const gmx_pme_t *pme,
- gmx_wallcycle_t wcycle,
+ gmx_wallcycle *wcycle,
gmx::ArrayRef<const gmx::RVec> *forces,
matrix virial,
real *energy,
#include "gromacs/mdtypes/mdatom.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/simd/simd.h"
+#include "gromacs/timing/wallcycle.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/gmxomp.h"
int locality,
gmx_bool FillLocal,
rvec *x,
- nbnxn_atomdata_t *nbat)
+ nbnxn_atomdata_t *nbat,
+ gmx_wallcycle *wcycle)
{
+ wallcycle_start(wcycle, ewcNB_XF_BUF_OPS);
+ wallcycle_sub_start(wcycle, ewcsNB_X_BUF_OPS);
+
int g0 = 0, g1 = 0;
int nth, th;
}
GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
}
+
+ wallcycle_sub_stop(wcycle, ewcsNB_X_BUF_OPS);
+ wallcycle_stop(wcycle, ewcNB_XF_BUF_OPS);
}
static void
void nbnxn_atomdata_add_nbat_f_to_f(const nbnxn_search_t nbs,
int locality,
const nbnxn_atomdata_t *nbat,
- rvec *f)
+ rvec *f,
+ gmx_wallcycle *wcycle)
{
+ wallcycle_start(wcycle, ewcNB_XF_BUF_OPS);
+ wallcycle_sub_start(wcycle, ewcsNB_F_BUF_OPS);
+
int a0 = 0, na = 0;
nbs_cycle_start(&nbs->cc[enbsCCreducef]);
}
nbs_cycle_stop(&nbs->cc[enbsCCreducef]);
+
+ wallcycle_sub_stop(wcycle, ewcsNB_F_BUF_OPS);
+ wallcycle_stop(wcycle, ewcNB_XF_BUF_OPS);
}
/* Adds the shift forces from nbnxn_atomdata_t to fshift */
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
}
struct t_mdatoms;
+struct gmx_wallcycle;
/* Default nbnxn allocation routine, allocates 32 byte aligned,
* which works for plain C and aligned SSE and AVX loads/stores.
int locality,
gmx_bool FillLocal,
rvec *x,
- nbnxn_atomdata_t *nbat);
+ nbnxn_atomdata_t *nbat,
+ gmx_wallcycle *wcycle);
/* Add the forces stored in nbat to f, zeros the forces in nbat */
void nbnxn_atomdata_add_nbat_f_to_f(const nbnxn_search_t nbs,
int locality,
const nbnxn_atomdata_t *nbat,
- rvec *f);
+ rvec *f,
+ gmx_wallcycle *wcycle);
/* Add the fshift force stored in nbat to fshift */
void nbnxn_atomdata_add_nbat_fshift_to_fshift(const nbnxn_atomdata_t *nbat,
* This is parallellized. MPI communication is performed
* if the constructing atoms aren't local.
*/
- wallcycle_start(wcycle, ewcVSITESPREAD);
matrix virial = { { 0 } };
spread_vsite_f(vsite, x, fDirectVir, nullptr,
(flags & GMX_FORCE_VIRIAL), virial,
nrnb,
- &top->idef, fr->ePBC, fr->bMolPBC, graph, box, cr);
+ &top->idef, fr->ePBC, fr->bMolPBC, graph, box, cr, wcycle);
forceWithVirial->addVirialContribution(virial);
- wallcycle_stop(wcycle, ewcVSITESPREAD);
}
if (flags & GMX_FORCE_VIRIAL)
wallcycle_start(wcycle, ewcWAIT_GPU_NB_L);
wallcycle_stop(wcycle, ewcWAIT_GPU_NB_L);
- wallcycle_start(wcycle, ewcNB_XF_BUF_OPS);
- wallcycle_sub_start(wcycle, ewcsNB_F_BUF_OPS);
nbnxn_atomdata_add_nbat_f_to_f(nbv->nbs, eatLocal,
- nbv->nbat, as_rvec_array(force->data()));
- wallcycle_sub_stop(wcycle, ewcsNB_F_BUF_OPS);
- wallcycle_stop(wcycle, ewcNB_XF_BUF_OPS);
+ nbv->nbat, as_rvec_array(force->data()), wcycle);
}
}
}
* and domain decomposition does not use the graph,
* we do not need to worry about shifting.
*/
- wallcycle_start(wcycle, ewcPP_PMESENDX);
gmx_pme_send_coordinates(cr, box, as_rvec_array(x.data()),
lambda[efptCOUL], lambda[efptVDW],
(flags & (GMX_FORCE_VIRIAL | GMX_FORCE_ENERGY)),
- step);
- wallcycle_stop(wcycle, ewcPP_PMESENDX);
+ step, wcycle);
}
#endif /* GMX_MPI */
}
else
{
- wallcycle_start(wcycle, ewcNB_XF_BUF_OPS);
- wallcycle_sub_start(wcycle, ewcsNB_X_BUF_OPS);
nbnxn_atomdata_copy_x_to_nbat_x(nbv->nbs, eatLocal, FALSE, as_rvec_array(x.data()),
- nbv->nbat);
- wallcycle_sub_stop(wcycle, ewcsNB_X_BUF_OPS);
- wallcycle_stop(wcycle, ewcNB_XF_BUF_OPS);
+ nbv->nbat, wcycle);
}
if (bUseGPU)
}
else
{
- wallcycle_start(wcycle, ewcMOVEX);
- dd_move_x(cr->dd, box, as_rvec_array(x.data()));
- wallcycle_stop(wcycle, ewcMOVEX);
+ dd_move_x(cr->dd, box, as_rvec_array(x.data()), wcycle);
- wallcycle_start(wcycle, ewcNB_XF_BUF_OPS);
- wallcycle_sub_start(wcycle, ewcsNB_X_BUF_OPS);
nbnxn_atomdata_copy_x_to_nbat_x(nbv->nbs, eatNonlocal, FALSE, as_rvec_array(x.data()),
- nbv->nbat);
- wallcycle_sub_stop(wcycle, ewcsNB_X_BUF_OPS);
- wallcycle_stop(wcycle, ewcNB_XF_BUF_OPS);
+ nbv->nbat, wcycle);
}
if (bUseGPU)
* communication with calculation with domain decomposition.
*/
wallcycle_stop(wcycle, ewcFORCE);
- wallcycle_start(wcycle, ewcNB_XF_BUF_OPS);
- wallcycle_sub_start(wcycle, ewcsNB_F_BUF_OPS);
- nbnxn_atomdata_add_nbat_f_to_f(nbv->nbs, eatAll, nbv->nbat, f);
- wallcycle_sub_stop(wcycle, ewcsNB_F_BUF_OPS);
- wallcycle_stop(wcycle, ewcNB_XF_BUF_OPS);
+
+ nbnxn_atomdata_add_nbat_f_to_f(nbv->nbs, eatAll, nbv->nbat, f, wcycle);
+
wallcycle_start_nocount(wcycle, ewcFORCE);
/* if there are multiple fshift output buffers reduce them */
step, nrnb, wcycle);
wallcycle_stop(wcycle, ewcFORCE);
}
- wallcycle_start(wcycle, ewcNB_XF_BUF_OPS);
- wallcycle_sub_start(wcycle, ewcsNB_F_BUF_OPS);
+
/* skip the reduction if there was no non-local work to do */
if (nbv->grp[eintNonlocal].nbl_lists.nbl[0]->nsci > 0)
{
nbnxn_atomdata_add_nbat_f_to_f(nbv->nbs, eatNonlocal,
- nbv->nbat, f);
+ nbv->nbat, f, wcycle);
}
- wallcycle_sub_stop(wcycle, ewcsNB_F_BUF_OPS);
- wallcycle_stop(wcycle, ewcNB_XF_BUF_OPS);
}
}
}
if (bDoForces)
{
- wallcycle_start(wcycle, ewcMOVEF);
- dd_move_f(cr->dd, f, fr->fshift);
- wallcycle_stop(wcycle, ewcMOVEF);
+ dd_move_f(cr->dd, f, fr->fshift, wcycle);
}
}
* on the non-alternating path. */
if (bUseOrEmulGPU && !alternateGpuWait)
{
- wallcycle_start(wcycle, ewcNB_XF_BUF_OPS);
- wallcycle_sub_start(wcycle, ewcsNB_F_BUF_OPS);
nbnxn_atomdata_add_nbat_f_to_f(nbv->nbs, eatLocal,
- nbv->nbat, f);
- wallcycle_sub_stop(wcycle, ewcsNB_F_BUF_OPS);
- wallcycle_stop(wcycle, ewcNB_XF_BUF_OPS);
+ nbv->nbat, f, wcycle);
}
if (DOMAINDECOMP(cr))
*/
if (vsite && !(fr->haveDirectVirialContributions && !(flags & GMX_FORCE_VIRIAL)))
{
- wallcycle_start(wcycle, ewcVSITESPREAD);
spread_vsite_f(vsite, as_rvec_array(x.data()), f, fr->fshift, FALSE, nullptr, nrnb,
- &top->idef, fr->ePBC, fr->bMolPBC, graph, box, cr);
- wallcycle_stop(wcycle, ewcVSITESPREAD);
+ &top->idef, fr->ePBC, fr->bMolPBC, graph, box, cr, wcycle);
}
if (flags & GMX_FORCE_VIRIAL)
* and domain decomposition does not use the graph,
* we do not need to worry about shifting.
*/
- wallcycle_start(wcycle, ewcPP_PMESENDX);
gmx_pme_send_coordinates(cr, box, as_rvec_array(x.data()),
lambda[efptCOUL], lambda[efptVDW],
(flags & (GMX_FORCE_VIRIAL | GMX_FORCE_ENERGY)),
- step);
- wallcycle_stop(wcycle, ewcPP_PMESENDX);
+ step, wcycle);
}
#endif /* GMX_MPI */
/* Communicate coordinates and sum dipole if necessary */
if (DOMAINDECOMP(cr))
{
- wallcycle_start(wcycle, ewcMOVEX);
- dd_move_x(cr->dd, box, as_rvec_array(x.data()));
- wallcycle_stop(wcycle, ewcMOVEX);
+ dd_move_x(cr->dd, box, as_rvec_array(x.data()), wcycle);
+
/* No GPU support, no move_x overlap, so reopen the balance region here */
if (ddOpenBalanceRegion == DdOpenBalanceRegionBeforeForceComputation::yes)
{
/* Communicate the forces */
if (DOMAINDECOMP(cr))
{
- wallcycle_start(wcycle, ewcMOVEF);
- dd_move_f(cr->dd, f, fr->fshift);
+ dd_move_f(cr->dd, f, fr->fshift, wcycle);
/* 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
if (EEL_FULL(fr->ic->eeltype) && cr->dd->n_intercg_excl &&
(flags & GMX_FORCE_VIRIAL))
{
- dd_move_f(cr->dd, as_rvec_array(forceWithVirial.force_.data()), nullptr);
+ dd_move_f(cr->dd, as_rvec_array(forceWithVirial.force_.data()), nullptr, wcycle);
}
- wallcycle_stop(wcycle, ewcMOVEF);
}
/* If we have NoVirSum forces, but we do not calculate the virial,
*/
if (vsite && !(fr->haveDirectVirialContributions && !(flags & GMX_FORCE_VIRIAL)))
{
- wallcycle_start(wcycle, ewcVSITESPREAD);
spread_vsite_f(vsite, as_rvec_array(x.data()), f, fr->fshift, FALSE, nullptr, nrnb,
- &top->idef, fr->ePBC, fr->bMolPBC, graph, box, cr);
- wallcycle_stop(wcycle, ewcVSITESPREAD);
+ &top->idef, fr->ePBC, fr->bMolPBC, graph, box, cr, wcycle);
}
if (flags & GMX_FORCE_VIRIAL)
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/mshift.h"
#include "gromacs/pbcutil/pbc.h"
+#include "gromacs/timing/wallcycle.h"
#include "gromacs/topology/ifunc.h"
#include "gromacs/topology/mtop_util.h"
#include "gromacs/topology/topology.h"
#include "gromacs/utility/gmxomp.h"
#include "gromacs/utility/smalloc.h"
-
/* The strategy used here for assigning virtual sites to (thread-)tasks
* is as follows:
*
gmx_bool VirCorr, matrix vir,
t_nrnb *nrnb, const t_idef *idef,
int ePBC, gmx_bool bMolPBC, const t_graph *g, const matrix box,
- t_commrec *cr)
+ t_commrec *cr, gmx_wallcycle *wcycle)
{
+ wallcycle_start(wcycle, ewcVSITESPREAD);
const bool useDomdec = vsite->useDomdec;
GMX_ASSERT(!useDomdec || (cr != nullptr && DOMAINDECOMP(cr)), "When vsites are set up with domain decomposition, we need a valid commrec");
inc_nrnb(nrnb, eNR_VSITE4FD, vsite_count(idef->il, F_VSITE4FD));
inc_nrnb(nrnb, eNR_VSITE4FDN, vsite_count(idef->il, F_VSITE4FDN));
inc_nrnb(nrnb, eNR_VSITEN, vsite_count(idef->il, F_VSITEN));
+
+ wallcycle_stop(wcycle, ewcVSITESPREAD);
}
/*! \brief Returns the an array with charge-group indices for each atom
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
struct t_ilist;
struct t_mdatoms;
struct t_nrnb;
+struct gmx_wallcycle;
typedef struct gmx_vsite_t {
gmx_bool bHaveChargeGroups; /* Do we have charge groups? */
gmx_bool VirCorr, matrix vir,
t_nrnb *nrnb, const t_idef *idef,
int ePBC, gmx_bool bMolPBC, const t_graph *g, const matrix box,
- t_commrec *cr);
+ t_commrec *cr, gmx_wallcycle *wcycle);
/* Spread the force operating on the vsite atoms on the surrounding atoms.
* If fshift!=NULL also update the shift forces.
* If VirCorr=TRUE add the virial correction for non-linear vsite constructs
gmx_cycles_t start;
} wallcc_t;
-typedef struct gmx_wallcycle
+struct gmx_wallcycle
{
wallcc_t *wcc;
/* did we detect one or more invalid cycle counts */
typedef struct gmx_wallcycle *gmx_wallcycle_t;
struct t_commrec;
+const gmx_wallcycle_t nullWallcycle = nullptr;
enum {
ewcRUN, ewcSTEP, ewcPPDURINGPME, ewcDOMDEC, ewcDDCOMMLOAD,