|
Gromacs
2026.0
|
#include "gmxpre.h"#include "pme_load_balancing.h"#include <cassert>#include <cmath>#include <algorithm>#include "gromacs/domdec/dlb.h"#include "gromacs/domdec/domdec.h"#include "gromacs/domdec/domdec_network.h"#include "gromacs/domdec/domdec_struct.h"#include "gromacs/domdec/partition.h"#include "gromacs/ewald/ewald_utils.h"#include "gromacs/ewald/pme.h"#include "gromacs/fft/calcgrid.h"#include "gromacs/gmxlib/network.h"#include "gromacs/math/functions.h"#include "gromacs/mdlib/dispersioncorrection.h"#include "gromacs/mdlib/forcerec.h"#include "gromacs/mdtypes/forcerec.h"#include "gromacs/mdtypes/inputrec.h"#include "gromacs/mdtypes/interaction_const.h"#include "gromacs/mdtypes/md_enums.h"#include "gromacs/mdtypes/simulation_workload.h"#include "gromacs/mdtypes/state.h"#include "gromacs/nbnxm/gpu_data_mgmt.h"#include "gromacs/nbnxm/nbnxm.h"#include "gromacs/pbcutil/pbc.h"#include "gromacs/timing/wallcycle.h"#include "gromacs/timing/walltime_accounting.h"#include "gromacs/utility/cstringutil.h"#include "gromacs/utility/enumerationhelpers.h"#include "gromacs/utility/fatalerror.h"#include "gromacs/utility/gmxassert.h"#include "gromacs/utility/logger.h"#include "gromacs/utility/mpicomm.h"#include "gromacs/utility/strconvert.h"#include "gromacs/utility/vec.h"#include "pme_internal.h"#include "pme_pp.h"
Include dependency graph for pme_load_balancing.cpp:This file implements the PmeLoadBalancing class.
Classes | |
| struct | gmx::pme_setup_t |
| Parameters and settings for one PP-PME setup. More... | |
| struct | gmx::Cutoffs |
| Struct for holding information on initial cut-off distances and the box. More... | |
| class | gmx::PmeLoadBalancing::Impl |
| Impl class for PmeLoadBalancing. More... | |
Enumerations | |
| enum | gmx::PmeLoadBalancingLimit : int { No, Box, DD, PmeGrid, MaxScaling, Count } |
| Enumeration whose values describe the effect limiting the load balancing. | |
Functions | |
| static const char * | gmx::enumValueToString (PmeLoadBalancingLimit enumValue) |
Descriptive strings for PmeLoadBalancingLimit enumValue. | |
| bool | gmx::pmeTuningIsSupported (CoulombInteractionType coulombInteractionType, bool reproducibilityRequested, const SimulationWorkload &simulationWork) |
| Returns whether PME tuning is supported. | |
| static Cutoffs | gmx::getCutoffs (const t_inputrec &ir, const matrix box, const interaction_const_t &ic, const nonbonded_verlet_t &nbv) |
| Computes and returns initially set cutoffs and box. | |
| static int | gmx::numPmeGridPoints (const pme_setup_t &setup) |
| Return product of the number of PME grid points in each dimension. | |
| static void | gmx::printGrid (FILE *fp_err, const MDLogger &mdlog, const char *pre, const char *desc, const pme_setup_t &set, double cycles) |
| Print the PME grid. | |
| static void | gmx::printLoadBalLimited (FILE *fp_err, const MDLogger &mdlog, int64_t step, const PmeLoadBalancingLimit limited, const pme_setup_t &setup) |
| Print descriptive string about what limits PME load balancing. | |
| static void | gmx::applySetup (pme_setup_t *setup, gmx_pme_t *pmedataOfSetup0, const t_inputrec &ir, interaction_const_t *ic, nonbonded_verlet_t *nbv, gmx_domdec_t *dd) |
Updates all the mdrun machinery for setup, setup->pmedata might be updated. | |
| static bool | gmx::processCycles (FILE *fp_err, const MDLogger &mdlog, const double cycles, const int64_t step, const bool isInLastStage, pme_setup_t *set) |
Checks the cycles and adds them to *set. More... | |
| static void | gmx::printLoadBalSetup (const MDLogger &mdlog, const char *name, const pme_setup_t &setup) |
| Print one load-balancing setting. | |
| static void | gmx::printLoadBalSettings (const PmeLoadBalancingLimit limited, const bool currentSetupIsLastSetup, const pme_setup_t ¤tSetup, const pme_setup_t &originalSetup, const bool useGpuForNonbondeds, const MDLogger &mdlog) |
| Print all load-balancing settings. | |
Variables | |
| const int | gmx::PMETunePeriod = 50 |
| After 50 nstlist periods of not observing imbalance: never tune PME. | |
| const real | gmx::loadBalanceTriggerFactor = 1.05 |
| Trigger PME load balancing at more than 5% PME overload. | |
| const real | gmx::c_maxSpacingScaling = 1.7 |
| Scale the grid by a most at factor 1.7. More... | |
| const real | gmx::gridpointsScaleFactor = 0.8 |
| In the initial scan, step by grids that are at least a factor 0.8 coarser. | |
| const real | gmx::relativeEfficiencyFactor = 1.05 |
| In the initial scan, try to skip grids with uneven x/y/z spacing, checking if the "efficiency" is more than 5% worse than the previous grid. | |
| const real | gmx::maxRelativeSlowdownAccepted = 1.12 |
| Rerun until a run is 12% slower setups than the fastest run so far. | |
| const real | gmx::maxFluctuationAccepted = 1.02 |
| If setups get more than 2% faster, do another round to avoid choosing a slower setup due to acceleration or fluctuations. | |
| const int | gmx::c_numFirstTuningIntervalSkip = 5 |
| Number of nstlist long tuning intervals to skip before starting. | |
| const int | gmx::c_numFirstTuningIntervalSkipWithSepPme = 3 |
| Number of nstlist long tuning intervals to skip before starting. | |
| const int | gmx::c_numPostSwitchTuningIntervalSkip = 1 |
| Number of nstlist long tuning intervals to skip after switching to a new setting. | |
| const double | gmx::c_startupTimeDelay = 5.0 |
| Number of seconds to delay the tuning at startup to allow processors clocks to ramp up. | |
1.8.5