/*! \brief Assign penalty factors to possible domain decompositions,
* based on the estimated communication costs. */
static void assign_factors(const real limit,
- const bool request1D,
const real cutoff,
const matrix box,
const gmx_ddbox_t& ddbox,
if (ndiv == 0)
{
- const int maxDimensionSize = std::max(ir_try[XX], std::max(ir_try[YY], ir_try[ZZ]));
- const int productOfDimensionSizes = ir_try[XX] * ir_try[YY] * ir_try[ZZ];
- const bool decompositionHasOneDimension = (maxDimensionSize == productOfDimensionSizes);
- if (request1D && !decompositionHasOneDimension)
- {
- /* We requested 1D DD, but got multiple dimensions */
- return;
- }
ce = comm_cost_est(limit, cutoff, box, ddbox, natoms, ir, pbcdxr, npme, ir_try);
if (ce >= 0
}
/* recurse */
- assign_factors(limit, request1D, cutoff, box, ddbox, natoms, ir, pbcdxr, npme, ndiv - 1,
- div + 1, mdiv + 1, irTryPtr, opt);
+ assign_factors(limit, cutoff, box, ddbox, natoms, ir, pbcdxr, npme, ndiv - 1, div + 1,
+ mdiv + 1, irTryPtr, opt);
for (i = 0; i < mdiv[0] - x - y; i++)
{
const int numRanksRequested,
const int numPmeOnlyRanks,
const real cellSizeLimit,
- 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, request1D, systemInfo.cutoff, box, ddbox, mtop.natoms, ir, pbcdxr,
+ assign_factors(cellSizeLimit, systemInfo.cutoff, box, ddbox, mtop.natoms, ir, pbcdxr,
numRanksDoingPmeWork, div.size(), div.data(), mdiv.data(), &itry, &numDomains);
return numDomains;
{
int numPmeOnlyRanks = getNumPmeOnlyRanksToUse(mdlog, options, mtop, ir, box, numRanksRequested);
- 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.
- return DDGridSetup{};
- }
-
gmx::IVec numDomains;
if (options.numCells[XX] > 0)
{
if (ddRole == DDRole::Master)
{
numDomains = optimizeDDCells(mdlog, numRanksRequested, numPmeOnlyRanks, cellSizeLimit,
- ddSettings.request1D, mtop, box, *ddbox, ir, systemInfo);
+ mtop, box, *ddbox, ir, systemInfo);
}
}