namespace gmx
{
-bool PmeLoadBalanceHelper::doPmeLoadBalancing(
- const MdrunOptions &mdrunOptions,
- const t_inputrec *inputrec,
- const t_forcerec *fr)
+bool PmeLoadBalanceHelper::doPmeLoadBalancing(const MdrunOptions& mdrunOptions,
+ const t_inputrec* inputrec,
+ const t_forcerec* fr)
{
- return (mdrunOptions.tunePme && EEL_PME(fr->ic->eeltype) &&
- !mdrunOptions.reproducible && inputrec->cutoff_scheme != ecutsGROUP);
+ return (mdrunOptions.tunePme && EEL_PME(fr->ic->eeltype) && !mdrunOptions.reproducible
+ && inputrec->cutoff_scheme != ecutsGROUP);
}
-PmeLoadBalanceHelper::PmeLoadBalanceHelper(
- bool isVerbose,
- StatePropagatorData *statePropagatorData,
- FILE *fplog,
- t_commrec *cr,
- const MDLogger &mdlog,
- const t_inputrec *inputrec,
- gmx_wallcycle *wcycle,
- t_forcerec *fr) :
+PmeLoadBalanceHelper::PmeLoadBalanceHelper(bool isVerbose,
+ StatePropagatorData* statePropagatorData,
+ FILE* fplog,
+ t_commrec* cr,
+ const MDLogger& mdlog,
+ const t_inputrec* inputrec,
+ gmx_wallcycle* wcycle,
+ t_forcerec* fr) :
pme_loadbal_(nullptr),
nextNSStep_(-1),
isVerbose_(isVerbose),
inputrec_(inputrec),
wcycle_(wcycle),
fr_(fr)
-{}
+{
+}
void PmeLoadBalanceHelper::setup()
{
auto box = statePropagatorData_->constBox();
GMX_RELEASE_ASSERT(box[0][0] != 0 && box[1][1] != 0 && box[2][2] != 0,
"PmeLoadBalanceHelper cannot be initialized with zero box.");
- pme_loadbal_init(&pme_loadbal_, cr_, mdlog_, *inputrec_, box,
- *fr_->ic, *fr_->nbv, fr_->pmedata, fr_->nbv->useGpu(),
- &bPMETunePrinting_);
+ pme_loadbal_init(&pme_loadbal_, cr_, mdlog_, *inputrec_, box, *fr_->ic, *fr_->nbv, fr_->pmedata,
+ fr_->nbv->useGpu(), &bPMETunePrinting_);
}
void PmeLoadBalanceHelper::run(gmx::Step step, gmx::Time gmx_unused time)
}
// PME grid + cut-off optimization with GPUs or PME nodes
- pme_loadbal_do(pme_loadbal_, cr_,
- (isVerbose_ && MASTER(cr_)) ? stderr : nullptr,
- fplog_, mdlog_,
- *inputrec_, fr_,
- statePropagatorData_->constBox(),
- statePropagatorData_->constPositionsView().paddedArrayRef(),
- wcycle_,
- step, step - inputrec_->init_step,
- &bPMETunePrinting_);
+ pme_loadbal_do(pme_loadbal_, cr_, (isVerbose_ && MASTER(cr_)) ? stderr : nullptr, fplog_,
+ mdlog_, *inputrec_, fr_, statePropagatorData_->constBox(),
+ statePropagatorData_->constPositionsView().paddedArrayRef(), wcycle_, step,
+ step - inputrec_->init_step, &bPMETunePrinting_);
}
void PmeLoadBalanceHelper::teardown()
SignallerCallbackPtr PmeLoadBalanceHelper::registerNSCallback()
{
return std::make_unique<SignallerCallback>(
- [this](Step step, Time gmx_unused time)
- {nextNSStep_ = step; });
+ [this](Step step, Time gmx_unused time) { nextNSStep_ = step; });
}
-} // namespace gmx
+} // namespace gmx