|
Gromacs
2026.0-dev-20251109-f20ba35
|
Impl class for PmeLoadBalancing.
The states the algorithm can reside in:
isActive_ == true:
Will, permanently, move to isActive_ = false when no imbalance is observed over many steps or when the balancing has finished.
Public Member Functions | |
| Impl (gmx_domdec_t *dd, const MDLogger &mdlog, const t_inputrec &ir, const matrix box, const interaction_const_t &ic, const nonbonded_verlet_t &nbv, gmx_pme_t *pmedata, const SimulationWorkload &simulationWork) | |
| bool | isActive () const |
| bool | isPrintingLoad () const |
| int | setupEnd () const |
| Returns one index past the last setup that will be covered during balancing. | |
| bool | increaseCutoff () |
| Attempts to increase the cutoff, returns true when a setup has been added to the list. | |
| void | switchToStage1 () |
| Switch load balancing to stage 1. More... | |
| void | balance (FILE *fp_err, const matrix box, ArrayRef< const RVec > x, double cycles, interaction_const_t *ic, nonbonded_verlet_t *nbv, gmx_pme_t **pmedata, int64_t step) |
| Process the timings and try to adjust the PME grid and Coulomb cut-off. More... | |
| void | addTwoStages (bool dlbWasUnlocked) |
| Prepare for another round of PME load balancing. More... | |
| void | addCycles (FILE *fp_err, t_forcerec *fr, const matrix box, ArrayRef< const RVec > x, const gmx_wallcycle *wcycle, int64_t step, int64_t step_rel) |
| void | printSettings () const |
| void gmx::PmeLoadBalancing::Impl::addTwoStages | ( | bool | dlbWasUnlocked | ) |
Prepare for another round of PME load balancing.
| [in] | dlbWasUnlocked | Pass true when DLB was locked and is now unlocked |
If the conditions (e.g. DLB off/on, CPU/GPU throttling etc.) changed, the PP/PME balance might change and re-balancing can improve performance. This function adds 2 stages and adjusts the considered setup range.
| void gmx::PmeLoadBalancing::Impl::balance | ( | FILE * | fp_err, |
| const matrix | box, | ||
| ArrayRef< const RVec > | x, | ||
| double | cycles, | ||
| interaction_const_t * | ic, | ||
| nonbonded_verlet_t * | nbv, | ||
| gmx_pme_t ** | pmedata, | ||
| int64_t | step | ||
| ) |
Process the timings and try to adjust the PME grid and Coulomb cut-off.
The adjustment is done to generate a different non-bonded PP and PME load. With separate PME ranks (PP and PME on different processes) or with a GPU (PP on GPU, PME on CPU), PP and PME run on different resources and changing the load will affect the load balance and performance. The total time for a set of integration steps is monitored and a range of grid/cut-off setups is scanned. After calling pme_load_balance many times and acquiring enough statistics, the best performing setup is chosen. Here we try to take into account fluctuations and changes due to external factors as well as DD load balancing.
| void gmx::PmeLoadBalancing::Impl::switchToStage1 | ( | ) |
Switch load balancing to stage 1.
In this stage, only sufficiently fast setups are run again.
1.8.5