NAMD
|
#include <Rebalancer.h>
Classes | |
struct | pcpair |
Public Member Functions | |
Rebalancer (computeInfo *computeArray, patchInfo *patchArray, processorInfo *processorArray, int nComps, int nPatches, int nPes) | |
~Rebalancer () | |
Protected Types | |
typedef pcpair | pcgrid [3][3][2] |
Protected Member Functions | |
int | isAvailableOn (patchInfo *patch, processorInfo *p) |
void | numAvailable (computeInfo *c, processorInfo *p, int *nPatches, int *nProxies, int *isBadForCommunication) |
void | refine_togrid (pcgrid &grid, double thresholdLoad, processorInfo *p, computeInfo *c) |
void | strategy () |
void | makeHeaps () |
void | makeTwoHeaps () |
void | assign (computeInfo *c, processorInfo *pRec) |
void | assign (computeInfo *c, int p) |
void | deAssign (computeInfo *c, processorInfo *pRec) |
int | refine () |
void | multirefine (double overload_start=1.02) |
void | printSummary () |
void | printResults () |
void | printLoads (int phase=0) |
double | computeAverage () |
void | adjustBackgroundLoadAndComputeAverage () |
double | computeMax () |
void | createSpanningTree () |
void | decrSTLoad () |
void | incrSTLoad () |
void | InitProxyUsage () |
void | brickDim (int a, int b, int dim, int &min, int &max) |
int | withinBrick (int x, int y, int z, int xm, int xM, int dimX, int ym, int yM, int dimY, int zm, int zM, int dimZ) |
Protected Attributes | |
int | bytesPerAtom |
ProxyUsage | proxyUsage |
const char * | strategyName |
computeInfo * | computes |
patchInfo * | patches |
processorInfo * | processors |
minHeap * | pes |
maxHeap * | computePairHeap |
maxHeap * | computeSelfHeap |
maxHeap * | computeBgPairHeap |
maxHeap * | computeBgSelfHeap |
int | P |
int | numPatches |
int | numComputes |
int | numProxies |
int | numPesAvailable |
double | averageLoad |
double | origMaxLoad |
int | firstAssignInRefine |
CollectLoadsMsg * | collMsg |
double | overLoad |
Definition at line 109 of file Rebalancer.h.
|
protected |
Definition at line 125 of file Rebalancer.h.
Rebalancer::Rebalancer | ( | computeInfo * | computeArray, |
patchInfo * | patchArray, | ||
processorInfo * | processorArray, | ||
int | nComps, | ||
int | nPatches, | ||
int | nPes | ||
) |
Definition at line 27 of file Rebalancer.C.
References processorInfo::backgroundLoad, bytesPerAtom, collMsg, computeBgPairHeap, computeBgSelfHeap, processorInfo::computeLoad, computeMax(), computePairHeap, computes, computeSelfHeap, firstAssignInRefine, InfoRecord::Id, INGROUP, InitProxyUsage(), InfoRecord::load, numComputes, numPatches, numPesAvailable, computeInfo::oldProcessor, origMaxLoad, overLoad, P, patches, processorInfo::patchSet, pes, printLoads(), patchInfo::processor, processors, processorInfo::proxies, patchInfo::proxiesOn, strategyName, and IRSet::unchecked_insert().
Rebalancer::~Rebalancer | ( | ) |
Definition at line 139 of file Rebalancer.C.
References collMsg, computeBgPairHeap, computeBgSelfHeap, computeMax(), computePairHeap, computes, computeSelfHeap, endi(), CollectLoadsMsg::finalAvgPeLoad, CollectLoadsMsg::finalMaxPatchProxies, CollectLoadsMsg::finalMaxPeLoad, CollectLoadsMsg::finalMaxPeProxies, CollectLoadsMsg::finalTotalProxies, InfoRecord::Id, INGROUP, CollectLoadsMsg::initAvgPeLoad, CollectLoadsMsg::initMaxPatchProxies, CollectLoadsMsg::initMaxPeLoad, CollectLoadsMsg::initMaxPeProxies, CollectLoadsMsg::initTotalProxies, iout, NAMD_bug(), numComputes, LdbCoordinator::Object(), computeInfo::oldProcessor, origMaxLoad, P, pes, computeInfo::processor, processors, CollectLoadsMsg::reverted, and LdbCoordinator::sendCollectLoads().
|
protected |
Definition at line 1023 of file Rebalancer.C.
References processorInfo::backgroundLoad, computeAverage(), numPesAvailable, P, and processors.
|
protected |
Definition at line 402 of file Rebalancer.C.
References processorInfo::backgroundLoad, COMPUTE_LOAD, processorInfo::computeLoad, processorInfo::computeSet, endi(), IRSet::find(), firstAssignInRefine, InfoRecord::Id, ProxyUsage::increment(), iout, InfoRecord::load, numProxies, computeInfo::patch1, computeInfo::patch2, patches, computeInfo::processor, processors, processorInfo::proxies, patchInfo::proxiesOn, PROXY_LOAD, proxyUsage, and IRSet::unchecked_insert().
Referenced by RefineTorusLB::newRefine().
|
protected |
|
inlineprotected |
brickDim This function returns the coordinates of the inner brick between any two points on the torus. The coordinates need to be seen modulo the dimension in that direction
Definition at line 179 of file Rebalancer.h.
Referenced by RefineTorusLB::newRefine().
|
protected |
Definition at line 1001 of file Rebalancer.C.
References averageLoad, processorInfo::backgroundLoad, computes, load, numComputes, numPesAvailable, P, and processors.
Referenced by adjustBackgroundLoadAndComputeAverage(), RefineTorusLB::binaryRefine(), multirefine(), printLoads(), RefineOnly::RefineOnly(), and RefineTorusLB::RefineTorusLB().
|
protected |
Definition at line 1057 of file Rebalancer.C.
References InfoRecord::load, load, P, and processors.
Referenced by RefineTorusLB::binaryRefine(), multirefine(), printLoads(), Rebalancer(), and ~Rebalancer().
|
protected |
Definition at line 1154 of file Rebalancer.C.
References ProxyMgr::buildSpanningTree0(), ProxyMgr::getPtree(), InfoRecord::Id, Iterator::id, PatchMap::node(), numPatches, PatchMap::Object(), ProxyMgr::Object(), patches, ProxyTree::proxylist, ResizeArray< T >::resize(), and ProxyTree::sizes.
Referenced by RefineOnly::RefineOnly(), and RefineTorusLB::RefineTorusLB().
|
protected |
Definition at line 466 of file Rebalancer.C.
References processorInfo::backgroundLoad, processorInfo::computeLoad, processorInfo::computeSet, ProxyUsage::decrement(), endi(), firstAssignInRefine, ProxyUsage::getVal(), InfoRecord::Id, iINFO(), iout, InfoRecord::load, numProxies, computeInfo::patch1, computeInfo::patch2, patches, computeInfo::processor, patchInfo::processor, processors, processorInfo::proxies, patchInfo::proxiesOn, PROXY_LOAD, proxyUsage, and IRSet::remove().
Referenced by RefineTorusLB::newRefine().
|
protected |
Definition at line 1195 of file Rebalancer.C.
References processorInfo::backgroundLoad, ProxyMgr::getPtree(), InfoRecord::load, load, numPatches, ProxyMgr::Object(), processors, ProxyTree::proxylist, proxySpanDim, ResizeArray< T >::size(), and ST_NODE_LOAD.
Referenced by RefineOnly::RefineOnly(), and RefineTorusLB::RefineTorusLB().
|
protected |
Definition at line 1210 of file Rebalancer.C.
References processorInfo::backgroundLoad, ProxyMgr::getPtree(), InfoRecord::load, numPatches, ProxyMgr::Object(), processors, ProxyTree::proxylist, proxySpanDim, ResizeArray< T >::size(), and ST_NODE_LOAD.
Referenced by RefineOnly::RefineOnly(), and RefineTorusLB::RefineTorusLB().
|
protected |
Definition at line 195 of file Rebalancer.C.
References InfoRecord::Id, Iterator::id, ProxyUsage::increment(), IRSet::numElements(), numPatches, numProxies, P, computeInfo::patch1, computeInfo::patch2, patches, processors, patchInfo::proxiesOn, and proxyUsage.
Referenced by Rebalancer(), RefineOnly::RefineOnly(), and RefineTorusLB::RefineTorusLB().
|
protected |
|
protected |
Definition at line 252 of file Rebalancer.C.
References averageLoad, computeBgPairHeap, computeBgSelfHeap, computePairHeap, computes, computeSelfHeap, minHeap::insert(), maxHeap::insert(), numComputes, P, computeInfo::patch1, computeInfo::patch2, patches, pes, and processors.
|
protected |
Definition at line 356 of file Rebalancer.C.
References computeBgPairHeap, computeBgSelfHeap, computePairHeap, computes, computeSelfHeap, minHeap::insert(), maxHeap::insert(), numComputes, P, computeInfo::patch1, computeInfo::patch2, pes, and processors.
|
protected |
Definition at line 784 of file Rebalancer.C.
References averageLoad, processorInfo::backgroundLoad, computeAverage(), processorInfo::computeLoad, computeMax(), processorInfo::computeSet, endi(), iINFO(), iout, iWARN(), InfoRecord::load, IRSet::numElements(), overLoad, P, processors, and refine().
Referenced by RefineOnly::RefineOnly().
|
protected |
Definition at line 1074 of file Rebalancer.C.
References averageLoad, processorInfo::backgroundLoad, IRSet::find(), InfoRecord::Id, INGROUP, IRSet::numElements(), numPatches, numPesAvailable, numProxies, P, computeInfo::patch1, computeInfo::patch2, patches, patchInfo::processor, processors, processorInfo::proxies, and patchInfo::proxiesOn.
Referenced by refine_togrid().
|
protected |
Definition at line 874 of file Rebalancer.C.
References averageLoad, processorInfo::backgroundLoad, bytesPerAtom, collMsg, computeAverage(), computeMax(), endi(), CollectLoadsMsg::finalAvgPeLoad, CollectLoadsMsg::finalMaxPatchProxies, CollectLoadsMsg::finalMaxPeLoad, CollectLoadsMsg::finalMaxPeProxies, CollectLoadsMsg::finalMemory, CollectLoadsMsg::finalTime, CollectLoadsMsg::finalTotalProxies, CollectLoadsMsg::firstPe, InfoRecord::Id, CollectLoadsMsg::initAvgPeLoad, CollectLoadsMsg::initMaxPatchProxies, CollectLoadsMsg::initMaxPeLoad, CollectLoadsMsg::initMaxPeProxies, CollectLoadsMsg::initMemory, CollectLoadsMsg::initTime, CollectLoadsMsg::initTotalProxies, iout, CollectLoadsMsg::lastPe, memusage_MB(), NAMD_bug(), patchInfo::numAtoms, IRSet::numElements(), P, processorInfo::patchSet, processors, processorInfo::proxies, patchInfo::proxiesOn, CollectLoadsMsg::reverted, strategyName, and CollectLoadsMsg::strategyName.
Referenced by Rebalancer(), RefineOnly::RefineOnly(), and RefineTorusLB::RefineTorusLB().
|
protected |
Definition at line 868 of file Rebalancer.C.
|
protected |
Definition at line 975 of file Rebalancer.C.
References processorInfo::backgroundLoad, processorInfo::computeLoad, processorInfo::computeSet, endi(), iINFO(), iout, InfoRecord::load, load, IRSet::numElements(), P, processors, and processorInfo::proxies.
Referenced by RefineTorusLB::newRefine(), and refine().
|
protected |
Definition at line 577 of file Rebalancer.C.
References averageLoad, processorInfo::computeSet, maxHeap::deleteMax(), endi(), IRSet::hasElements(), InfoRecord::Id, Iterator::id, iINFO(), IRSet::insert(), maxHeap::insert(), iout, IRSet::iterator(), InfoRecord::load, load, IRSet::next(), next(), overLoad, P, computeInfo::patch1, computeInfo::patch2, patches, printSummary(), patchInfo::processor, processors, REASSIGN, refine_togrid(), and IRSet::remove().
Referenced by multirefine().
|
protected |
Definition at line 544 of file Rebalancer.C.
References processorInfo::available, averageLoad, Rebalancer::pcpair::c, InfoRecord::load, numAvailable(), and Rebalancer::pcpair::p.
Referenced by refine().
|
protected |
Definition at line 247 of file Rebalancer.C.
|
inlineprotected |
withinBrick This function returns whether a particular coordinate is within the region defined by xm, xM, ym, yM, zm, zM
Definition at line 199 of file Rebalancer.h.
|
protected |
Definition at line 141 of file Rebalancer.h.
Referenced by RefineTorusLB::binaryRefine(), computeAverage(), makeHeaps(), multirefine(), RefineTorusLB::newRefine(), numAvailable(), printLoads(), refine(), and refine_togrid().
|
protected |
Definition at line 124 of file Rebalancer.h.
Referenced by printLoads(), and Rebalancer().
|
protected |
Definition at line 164 of file Rebalancer.h.
Referenced by printLoads(), Rebalancer(), and ~Rebalancer().
|
protected |
Definition at line 134 of file Rebalancer.h.
Referenced by makeHeaps(), makeTwoHeaps(), Rebalancer(), and ~Rebalancer().
|
protected |
Definition at line 135 of file Rebalancer.h.
Referenced by makeHeaps(), makeTwoHeaps(), Rebalancer(), and ~Rebalancer().
|
protected |
Definition at line 132 of file Rebalancer.h.
Referenced by makeHeaps(), makeTwoHeaps(), Rebalancer(), and ~Rebalancer().
|
protected |
Definition at line 128 of file Rebalancer.h.
Referenced by computeAverage(), makeHeaps(), makeTwoHeaps(), Rebalancer(), and ~Rebalancer().
|
protected |
Definition at line 133 of file Rebalancer.h.
Referenced by makeHeaps(), makeTwoHeaps(), Rebalancer(), and ~Rebalancer().
|
protected |
Definition at line 143 of file Rebalancer.h.
Referenced by assign(), deAssign(), and Rebalancer().
|
protected |
Definition at line 138 of file Rebalancer.h.
Referenced by computeAverage(), makeHeaps(), makeTwoHeaps(), Rebalancer(), and ~Rebalancer().
|
protected |
Definition at line 137 of file Rebalancer.h.
Referenced by createSpanningTree(), decrSTLoad(), incrSTLoad(), InitProxyUsage(), numAvailable(), and Rebalancer().
|
protected |
Definition at line 140 of file Rebalancer.h.
Referenced by adjustBackgroundLoadAndComputeAverage(), computeAverage(), numAvailable(), and Rebalancer().
|
protected |
Definition at line 139 of file Rebalancer.h.
Referenced by assign(), deAssign(), InitProxyUsage(), and numAvailable().
|
protected |
Definition at line 142 of file Rebalancer.h.
Referenced by Rebalancer(), and ~Rebalancer().
|
protected |
Definition at line 168 of file Rebalancer.h.
Referenced by RefineTorusLB::binaryRefine(), multirefine(), RefineTorusLB::newRefine(), Rebalancer(), and refine().
|
protected |
Definition at line 136 of file Rebalancer.h.
Referenced by adjustBackgroundLoadAndComputeAverage(), computeAverage(), computeMax(), InitProxyUsage(), makeHeaps(), makeTwoHeaps(), multirefine(), RefineTorusLB::newRefine(), numAvailable(), printLoads(), printSummary(), Rebalancer(), refine(), RefineOnly::RefineOnly(), and ~Rebalancer().
|
protected |
Definition at line 129 of file Rebalancer.h.
Referenced by assign(), createSpanningTree(), deAssign(), InitProxyUsage(), makeHeaps(), RefineTorusLB::newRefine(), numAvailable(), Rebalancer(), and refine().
|
protected |
Definition at line 131 of file Rebalancer.h.
Referenced by makeHeaps(), makeTwoHeaps(), Rebalancer(), and ~Rebalancer().
|
protected |
Definition at line 130 of file Rebalancer.h.
Referenced by adjustBackgroundLoadAndComputeAverage(), assign(), computeAverage(), computeMax(), deAssign(), decrSTLoad(), incrSTLoad(), InitProxyUsage(), makeHeaps(), makeTwoHeaps(), multirefine(), RefineTorusLB::newRefine(), numAvailable(), printLoads(), printSummary(), Rebalancer(), refine(), RefineOnly::RefineOnly(), and ~Rebalancer().
|
protected |
Definition at line 126 of file Rebalancer.h.
Referenced by assign(), deAssign(), InitProxyUsage(), and RefineOnly::RefineOnly().
|
protected |
Definition at line 127 of file Rebalancer.h.
Referenced by Alg7::Alg7(), AlgNbor::AlgNbor(), AlgRecBisection::AlgRecBisection(), printLoads(), Rebalancer(), RefineOnly::RefineOnly(), RefineTorusLB::RefineTorusLB(), and TorusLB::TorusLB().