This file defines functions used by the domdec module in its initial setup phase.
- Author
- Berk Hess hess@.nosp@m.kth..nosp@m.se
|
static void | factorize (int n, std::vector< int > *fac, std::vector< int > *mfac) |
| Factorize n . More...
|
|
static int | largest_divisor (int n) |
| Find largest divisor of n smaller than n .
|
|
static int | lcd (int n1, int n2) |
| Compute largest common divisor of n1 and n2.
|
|
static gmx_bool | fits_pme_ratio (int nrank_tot, int nrank_pme, float ratio) |
| Returns TRUE when there are enough PME ranks for the ratio.
|
|
static gmx_bool | fits_pp_pme_perf (int ntot, int npme, float ratio) |
| Returns TRUE when npme out of ntot ranks doing PME is expected to give reasonable performance.
|
|
static int | guess_npme (const gmx::MDLogger &mdlog, const gmx_mtop_t &mtop, const t_inputrec &ir, const matrix box, int nrank_tot) |
| Make a guess for the number of PME ranks to use.
|
|
static int | div_up (int n, int f) |
| Return n divided by f rounded up to the next integer.
|
|
real | comm_box_frac (const gmx::IVec &dd_nc, real cutoff, const gmx_ddbox_t &ddbox) |
| Returns the volume fraction of the system that is communicated.
|
|
static gmx_bool | inhomogeneous_z (const t_inputrec &ir) |
| Return whether the DD inhomogeneous in the z direction.
|
|
static float | comm_pme_cost_vol (int npme, int a, int b, int c) |
| Estimate cost of PME FFT communication. More...
|
|
static float | comm_cost_est (real limit, real cutoff, const matrix box, const gmx_ddbox_t &ddbox, int natoms, const t_inputrec &ir, float pbcdxr, int npme_tot, const gmx::IVec &nc) |
| Estimate cost of communication for a possible domain decomposition.
|
|
static void | assign_factors (const real limit, const bool request1D, const real cutoff, const matrix box, const gmx_ddbox_t &ddbox, int natoms, const t_inputrec &ir, float pbcdxr, int npme, int ndiv, const int *div, const int *mdiv, gmx::IVec *irTryPtr, gmx::IVec *opt) |
| Assign penalty factors to possible domain decompositions, based on the estimated communication costs.
|
|
static gmx::IVec | optimizeDDCells (const gmx::MDLogger &mdlog, const int numRanksRequested, const int numPmeOnlyRanks, const real cellSizeLimit, const bool request1DAnd1Pulse, const gmx_mtop_t &mtop, const matrix box, const gmx_ddbox_t &ddbox, const t_inputrec &ir, const DDSystemInfo &systemInfo) |
| Determine the optimal distribution of DD cells for the simulation system and number of MPI ranks. More...
|
|
real | getDDGridSetupCellSizeLimit (const gmx::MDLogger &mdlog, const bool request1DAnd1Pulse, const bool bDynLoadBal, const real dlb_scale, const t_inputrec &ir, const real systemInfoCellSizeLimit) |
| Return the minimum cell size (in nm) required for DD.
|
|
void | checkForValidRankCountRequests (const int numRanksRequested, const bool usingPme, const int numPmeRanksRequested, const bool checkForLargePrimeFactors) |
| Checks that requests for PP and PME ranks honor basic expectations. More...
|
|
static int | getNumPmeOnlyRanksToUse (const gmx::MDLogger &mdlog, const DomdecOptions &options, const gmx_mtop_t &mtop, const t_inputrec &ir, const matrix box, const int numRanksRequested) |
| Return the number of PME-only ranks used by the simulation. More...
|
|
static int | set_dd_dim (const gmx::IVec &numDDCells, const DDSettings &ddSettings, ivec *dims) |
| Sets the order of the DD dimensions, returns the number of DD dimensions.
|
|
DDGridSetup | getDDGridSetup (const gmx::MDLogger &mdlog, const t_commrec *cr, const int numRanksRequested, const DomdecOptions &options, const DDSettings &ddSettings, const DDSystemInfo &systemInfo, const real cellSizeLimit, const gmx_mtop_t &mtop, const t_inputrec &ir, const matrix box, gmx::ArrayRef< const gmx::RVec > xGlobal, gmx_ddbox_t *ddbox) |
| Determines the DD grid setup. More...
|
|