Gromacs  2025-dev-20240614-602a366
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions
#include "gromacs/math/vec.h"
#include "gromacs/utility/gmxmpi.h"
+ Include dependency graph for domdec_setup.h:
+ This graph shows which files directly or indirectly include this file:


Declares functions for choosing the DD grid setup.

Berk Hess


class  gmx::ArrayRef< typename >
 STL-like interface to a C array of T (or part of a std container of T). More...
struct  DDGridSetup
 Describes the DD grid setup. More...


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.
gmx::SeparatePmeRanksPermitted checkForSeparatePmeRanks (const gmx::MDModulesNotifiers &notifiers, const gmx::DomdecOptions &options, int numRanksRequested, bool useGpuForNonbonded, bool useGpuForPme, bool canUseGpuPmeDecomposition)
 Checks for ability to use separate PME ranks. More...
void checkForValidRankCountRequests (int numRanksRequested, bool usingPme, int numPmeRanksRequested, const gmx::SeparatePmeRanksPermitted &separatePmeRanksPermitted, bool checkForLargePrimeFactors)
 Checks that requests for PP and PME ranks honor basic expectations. More...
real getDDGridSetupCellSizeLimit (const gmx::MDLogger &mdlog, bool bDynLoadBal, real dlb_scale, const t_inputrec &ir, real systemInfoCellSizeLimit, int numRanksRequested)
 Return the minimum cell size (in nm) required for DD.
DDGridSetup getDDGridSetup (const gmx::MDLogger &mdlog, DDRole ddRole, MPI_Comm communicator, int numRanksRequested, const gmx::DomdecOptions &options, const DDSettings &ddSettings, const DDSystemInfo &systemInfo, real cellSizeLimit, const gmx_mtop_t &mtop, const t_inputrec &ir, const gmx::SeparatePmeRanksPermitted &separatePmeRanksPermitted, const matrix box, gmx::ArrayRef< const gmx::RVec > xGlobal, gmx_ddbox_t *ddbox)
 Determines the DD grid setup. More...

Function Documentation

gmx::SeparatePmeRanksPermitted checkForSeparatePmeRanks ( const gmx::MDModulesNotifiers notifiers,
const gmx::DomdecOptions options,
int  numRanksRequested,
bool  useGpuForNonbonded,
bool  useGpuForPme,
bool  canUseGpuPmeDecomposition 

Checks for ability to use separate PME ranks.

Disables automatic usage if: some MDModule could not use separate PME ranks, GPU setup is not compatible with separate PME ranks, user provided explicit DD grid or total number of ranks is not large enough to use PME ranks

void checkForValidRankCountRequests ( int  numRanksRequested,
bool  usingPme,
int  numPmeRanksRequested,
const gmx::SeparatePmeRanksPermitted separatePmeRanksPermitted,
bool  checkForLargePrimeFactors 

Checks that requests for PP and PME ranks honor basic expectations.

Issues a fatal error if there are more PME ranks than PP, if the count of PP ranks has a prime factor that is too large to be likely to have good performance or PME-only ranks could not be used, but requested with -npme > 0

DDGridSetup getDDGridSetup ( const gmx::MDLogger mdlog,
DDRole  ddRole,
MPI_Comm  communicator,
int  numRanksRequested,
const gmx::DomdecOptions options,
const DDSettings &  ddSettings,
const DDSystemInfo &  systemInfo,
real  cellSizeLimit,
const gmx_mtop_t &  mtop,
const t_inputrec &  ir,
const gmx::SeparatePmeRanksPermitted separatePmeRanksPermitted,
const matrix  box,
gmx::ArrayRef< const gmx::RVec xGlobal,
gmx_ddbox_t *  ddbox 

Determines the DD grid setup.

Either implements settings required by the user, or otherwise chooses estimated optimal number of separate PME ranks and DD grid cell setup, DD cell size limits, and the initial ddbox.