#include "gromacs/listed_forces/disre.h"
#include "gromacs/listed_forces/gpubonded.h"
#include "gromacs/listed_forces/listed_forces.h"
-#include "gromacs/listed_forces/manage_threading.h"
#include "gromacs/listed_forces/orires.h"
#include "gromacs/math/arrayrefwithpadding.h"
#include "gromacs/math/functions.h"
/*! \brief Set up flags that have the lifetime of the domain indicating what type of work is there to compute.
*/
-static DomainLifetimeWorkload setupDomainLifetimeWorkload(const t_inputrec& inputrec,
- const t_forcerec& fr,
- const pull_t* pull_work,
- const gmx_edsam* ed,
- const InteractionDefinitions& idef,
- const t_fcdata& fcd,
- const t_mdatoms& mdatoms,
+static DomainLifetimeWorkload setupDomainLifetimeWorkload(const t_inputrec& inputrec,
+ const t_forcerec& fr,
+ const pull_t* pull_work,
+ const gmx_edsam* ed,
+ const t_mdatoms& mdatoms,
const SimulationWorkload& simulationWork,
const StepWorkload& stepWork)
{
// Note that haveSpecialForces is constant over the whole run
domainWork.haveSpecialForces =
haveSpecialForces(inputrec, *fr.forceProviders, pull_work, stepWork.computeForces, ed);
- domainWork.haveCpuBondedWork = haveCpuBondeds(fr);
+ domainWork.haveCpuBondedWork = fr.listedForces->haveCpuBondeds();
domainWork.haveGpuBondedWork = ((fr.gpuBonded != nullptr) && fr.gpuBonded->haveInteractions());
- domainWork.haveRestraintsWork = haveRestraints(idef, fcd);
- domainWork.haveCpuListedForceWork = haveCpuListedForces(fr, idef, fcd);
+ domainWork.haveRestraintsWork = fr.listedForces->haveRestraints();
+ domainWork.haveCpuListedForceWork = fr.listedForces->haveCpuListedForces();
// Note that haveFreeEnergyWork is constant over the whole run
domainWork.haveFreeEnergyWork = (fr.efep != efepNO && mdatoms.nPerturbed != 0);
// We assume we have local force work if there are CPU
tensor vir_force,
const t_mdatoms* mdatoms,
gmx_enerdata_t* enerd,
- t_fcdata* fcd,
gmx::ArrayRef<real> lambda,
t_forcerec* fr,
gmx::MdrunScheduleWorkload* runScheduleWork,
// Need to run after the GPU-offload bonded interaction lists
// are set up to be able to determine whether there is bonded work.
runScheduleWork->domainWork = setupDomainLifetimeWorkload(
- *inputrec, *fr, pull_work, ed, top->idef, *fcd, *mdatoms, simulationWork, stepWork);
+ *inputrec, *fr, pull_work, ed, *mdatoms, simulationWork, stepWork);
wallcycle_start_nocount(wcycle, ewcNS);
wallcycle_sub_start(wcycle, ewcsNBS_SEARCH_LOCAL);
stateGpu->waitCoordinatesReadyOnHost(AtomLocality::NonLocal);
}
/* Compute the bonded and non-bonded energies and optionally forces */
- do_force_lowlevel(fr, inputrec, top->idef, cr, ms, nrnb, wcycle, mdatoms, x, xWholeMolecules,
- hist, &forceOut, enerd, fcd, box, lambda.data(),
- as_rvec_array(dipoleData.muStateAB), stepWork, ddBalanceRegionHandler);
+ do_force_lowlevel(fr, inputrec, cr, ms, nrnb, wcycle, mdatoms, x, xWholeMolecules, hist,
+ &forceOut, enerd, box, lambda.data(), as_rvec_array(dipoleData.muStateAB),
+ stepWork, ddBalanceRegionHandler);
wallcycle_stop(wcycle, ewcFORCE);