comm->bVacDLBNoLimit = (ir->pbcType == PbcType::No);
for (d = 0; d < dd->ndim; d++)
{
- if (comm->ddSettings.request1DAnd1Pulse)
- {
- comm->cd[d].np_dlb = 1;
- }
- else
- {
- comm->cd[d].np_dlb = std::min(npulse, dd->numCells[dd->dim[d]] - 1);
- comm->maxpulse = std::max(comm->maxpulse, comm->cd[d].np_dlb);
- }
+ comm->cd[d].np_dlb = std::min(npulse, dd->numCells[dd->dim[d]] - 1);
+ comm->maxpulse = std::max(comm->maxpulse, comm->cd[d].np_dlb);
if (comm->cd[d].np_dlb < dd->numCells[dd->dim[d]] - 1)
{
comm->bVacDLBNoLimit = FALSE;
ddSettings.useSendRecv2 = (dd_getenv(mdlog, "GMX_DD_USE_SENDRECV2", 0) != 0);
ddSettings.dlb_scale_lim = dd_getenv(mdlog, "GMX_DLB_MAX_BOX_SCALING", 10);
- ddSettings.request1DAnd1Pulse = bool(dd_getenv(mdlog, "GMX_DD_1D_1PULSE", 0));
+ ddSettings.request1D = bool(dd_getenv(mdlog, "GMX_DD_1D", 0));
ddSettings.useDDOrderZYX = bool(dd_getenv(mdlog, "GMX_DD_ORDER_ZYX", 0));
ddSettings.useCartesianReorder = bool(dd_getenv(mdlog, "GMX_NO_CART_REORDER", 1));
ddSettings.eFlop = dd_getenv(mdlog, "GMX_DLB_BASED_ON_FLOPS", 0);
gmx_domdec_t::gmx_domdec_t(const t_inputrec& ir) : unitCellInfo(ir) {}
-/*! \brief Return whether the simulation described can run a 1D single-pulse DD.
+/*! \brief Return whether the simulation described can run a 1D DD.
*
- * The GPU halo exchange code requires a 1D single-pulse DD. Such a DD
+ * The GPU halo exchange code requires 1D DD. Such a DD
* generally requires a larger box than other possible decompositions
* with the same rank count, so the calling code might need to decide
* what is the most appropriate way to run the simulation based on
* exchange code path. The number of PME ranks, if any, should be set
* in \c options.numPmeRanks.
*/
-static bool canMake1DAnd1PulseDomainDecomposition(const DDSettings& ddSettingsOriginal,
- const t_commrec* cr,
- const int numRanksRequested,
- const DomdecOptions& options,
- const gmx_mtop_t& mtop,
- const t_inputrec& ir,
- const matrix box,
- gmx::ArrayRef<const gmx::RVec> xGlobal)
+static bool canMake1DDomainDecomposition(const DDSettings& ddSettingsOriginal,
+ const t_commrec* cr,
+ const int numRanksRequested,
+ const DomdecOptions& options,
+ const gmx_mtop_t& mtop,
+ const t_inputrec& ir,
+ const matrix box,
+ gmx::ArrayRef<const gmx::RVec> xGlobal)
{
// Ensure we don't write any output from this checking routine
gmx::MDLogger dummyLogger;
DDSystemInfo systemInfo = getSystemInfo(dummyLogger, cr, options, mtop, ir, box, xGlobal);
- DDSettings ddSettings = ddSettingsOriginal;
- ddSettings.request1DAnd1Pulse = true;
- const real gridSetupCellsizeLimit = getDDGridSetupCellSizeLimit(
- dummyLogger, ddSettings.request1DAnd1Pulse, !isDlbDisabled(ddSettings.initialDlbState),
- options.dlbScaling, ir, systemInfo.cellsizeLimit);
+ DDSettings ddSettings = ddSettingsOriginal;
+ ddSettings.request1D = true;
+ const real gridSetupCellsizeLimit =
+ getDDGridSetupCellSizeLimit(dummyLogger, !isDlbDisabled(ddSettings.initialDlbState),
+ options.dlbScaling, ir, systemInfo.cellsizeLimit);
gmx_ddbox_t ddbox = { 0 };
DDGridSetup ddGridSetup =
getDDGridSetup(dummyLogger, cr, numRanksRequested, options, ddSettings, systemInfo,
gridSetupCellsizeLimit, mtop, ir, box, xGlobal, &ddbox);
- const bool canMakeDDWith1DAnd1Pulse = (ddGridSetup.numDomains[XX] != 0);
+ const bool canMake1DDD = (ddGridSetup.numDomains[XX] != 0);
- return canMakeDDWith1DAnd1Pulse;
+ return canMake1DDD;
}
bool is1D(const gmx_domdec_t& dd)
t_commrec* cr,
const DomdecOptions& options,
const MdrunOptions& mdrunOptions,
- bool prefer1DAnd1Pulse,
+ bool prefer1D,
const gmx_mtop_t& mtop,
const t_inputrec& ir,
const matrix box,
t_commrec* cr,
const DomdecOptions& options,
const MdrunOptions& mdrunOptions,
- const bool prefer1DAnd1Pulse,
+ const bool prefer1D,
const gmx_mtop_t& mtop,
const t_inputrec& ir,
const matrix box,
ddSettings_ = getDDSettings(mdlog_, options_, mdrunOptions, ir_);
- if (prefer1DAnd1Pulse
- && canMake1DAnd1PulseDomainDecomposition(ddSettings_, cr_, cr_->nnodes, options_, mtop_,
- ir_, box, xGlobal))
+ if (prefer1D
+ && canMake1DDomainDecomposition(ddSettings_, cr_, cr_->nnodes, options_, mtop_, ir_, box, xGlobal))
{
- ddSettings_.request1DAnd1Pulse = true;
+ ddSettings_.request1D = true;
}
if (ddSettings_.eFlop > 1)
// DD grid setup uses a more different cell size limit for
// automated setup than the one in systemInfo_. The latter is used
// in set_dd_limits() to configure DLB, for example.
- const real gridSetupCellsizeLimit = getDDGridSetupCellSizeLimit(
- mdlog_, ddSettings_.request1DAnd1Pulse, !isDlbDisabled(ddSettings_.initialDlbState),
- options_.dlbScaling, ir_, systemInfo_.cellsizeLimit);
+ const real gridSetupCellsizeLimit =
+ getDDGridSetupCellSizeLimit(mdlog_, !isDlbDisabled(ddSettings_.initialDlbState),
+ options_.dlbScaling, ir_, systemInfo_.cellsizeLimit);
ddGridSetup_ = getDDGridSetup(mdlog_, cr_, numRanksRequested, options_, ddSettings_, systemInfo_,
gridSetupCellsizeLimit, mtop_, ir_, box, xGlobal, &ddbox_);
checkDDGridSetup(ddGridSetup_, cr_, options_, ddSettings_, systemInfo_, gridSetupCellsizeLimit, ddbox_);
t_commrec* cr,
const DomdecOptions& options,
const MdrunOptions& mdrunOptions,
- const bool prefer1DAnd1Pulse,
+ const bool prefer1D,
const gmx_mtop_t& mtop,
const t_inputrec& ir,
const matrix box,
ArrayRef<const RVec> xGlobal) :
- impl_(new Impl(mdlog, cr, options, mdrunOptions, prefer1DAnd1Pulse, mtop, ir, box, xGlobal))
+ impl_(new Impl(mdlog, cr, options, mdrunOptions, prefer1D, mtop, ir, box, xGlobal))
{
}
np = 1 + static_cast<int>(cutoffRequested * inv_cell_size * ddbox.skew_fac[dim]);
- if (dd->comm->ddSettings.request1DAnd1Pulse && np > 1)
- {
- return FALSE;
- }
-
if (!isDlbDisabled(dd->comm) && (dim < ddbox.npbcdim) && (dd->comm->cd[d].np_dlb > 0))
{
if (np > dd->comm->cd[d].np_dlb)
const int numRanksRequested,
const int numPmeOnlyRanks,
const real cellSizeLimit,
- const bool request1DAnd1Pulse,
+ const bool request1D,
const gmx_mtop_t& mtop,
const matrix box,
const gmx_ddbox_t& ddbox,
gmx::IVec itry = { 1, 1, 1 };
gmx::IVec numDomains = { 0, 0, 0 };
- assign_factors(cellSizeLimit, request1DAnd1Pulse, systemInfo.cutoff, box, ddbox, mtop.natoms, ir,
- pbcdxr, numRanksDoingPmeWork, div.size(), div.data(), mdiv.data(), &itry, &numDomains);
+ assign_factors(cellSizeLimit, request1D, systemInfo.cutoff, box, ddbox, mtop.natoms, ir, pbcdxr,
+ numRanksDoingPmeWork, div.size(), div.data(), mdiv.data(), &itry, &numDomains);
return numDomains;
}
real getDDGridSetupCellSizeLimit(const gmx::MDLogger& mdlog,
- const bool request1DAnd1Pulse,
const bool bDynLoadBal,
const real dlb_scale,
const t_inputrec& ir,
- const real systemInfoCellSizeLimit)
+ real systemInfoCellSizeLimit)
{
real cellSizeLimit = systemInfoCellSizeLimit;
- if (request1DAnd1Pulse)
- {
- cellSizeLimit = std::max(cellSizeLimit, ir.rlist);
- }
/* Add a margin for DLB and/or pressure scaling */
if (bDynLoadBal)
{
int numPmeOnlyRanks = getNumPmeOnlyRanksToUse(mdlog, options, mtop, ir, box, numRanksRequested);
- if (ddSettings.request1DAnd1Pulse && (numRanksRequested - numPmeOnlyRanks == 1))
+ if (ddSettings.request1D && (numRanksRequested - numPmeOnlyRanks == 1))
{
// With only one PP rank, there will not be a need for
// GPU-based halo exchange that wants to request that any DD
- // has only 1 dimension and 1 pulse.
+ // has only 1 dimension.
return DDGridSetup{};
}
if (MASTER(cr))
{
numDomains = optimizeDDCells(mdlog, numRanksRequested, numPmeOnlyRanks, cellSizeLimit,
- ddSettings.request1DAnd1Pulse, mtop, box, *ddbox, ir, systemInfo);
+ ddSettings.request1D, mtop, box, *ddbox, ir, systemInfo);
}
}