NAMD
|
#include <LdbCoordinator.h>
Public Member Functions | |
LdbCoordinator () | |
~LdbCoordinator (void) | |
void | initialize (PatchMap *pmap, ComputeMap *cmap, int reinit=0) |
void | createLoadBalancer () |
void | patchLoad (PatchID id, int nAtoms, int timestep) |
void | startWork (const LDObjHandle &handle) |
void | pauseWork (const LDObjHandle &handle) |
void | skipWork (const LDObjHandle &handle) |
void | endWork (const LDObjHandle &handle) |
void | rebalance (Sequencer *seq, PatchID id) |
void | rebalance (Controller *seq) |
void | nodeDone (CkReductionMsg *) |
void | updateComputesReady () |
void | barrier (void) |
void | resume (void) |
void | resumeReady (CkQdMsg *msg) |
void | resume2 (void) |
int | getNumStepsToRun (void) |
void | AtSyncBarrierReached (void) |
void | Migrate (LDObjHandle handle, int dest) |
void | RecvMigrate (LdbMigrateMsg *) |
void | ExpectMigrate (LdbMigrateMsg *) |
void | ResumeFromSync (void) |
void | ExecuteMigrations (void) |
void | awakenSequencers (void) |
int | requiredProxies (PatchID id, int []) |
void | printRequiredProxies (PatchID id, FILE *fp) |
void | printLocalLdbReport (void) |
void | sendCollectLoads (CollectLoadsMsg *) |
void | collectLoads (CollectLoadsMsg *) |
Static Public Member Functions | |
static LdbCoordinator * | Object () |
static void | staticMigrateFn (LDObjHandle handle, int dest) |
static void | staticStatsFn (LDOMHandle h, int state) |
static void | staticQueryEstLoadFn (LDOMHandle h) |
static void | staticReceiveAtSync (void *data) |
static void | staticResumeFromSync (void *data) |
Public Attributes | |
int | stepsPerLdbCycle |
int | nLocalComputes |
int | nLocalPatches |
int | nPatchesReported |
int | nPatchesExpected |
int | nComputesReported |
int | nComputesExpected |
int | controllerReported |
int | controllerExpected |
int | nStatsMessagesReceived |
int | nStatsMessagesExpected |
ComputeMap * | computeMap |
PatchMap * | patchMap |
int * | patchNAtoms |
int | nPatches |
Controller * | controllerThread |
Sequencer ** | sequencerThreads |
int | ldbCycleNum |
int | numStepsToRun |
int | firstLdbStep |
int | totalStepsDone |
int | takingLdbData |
FILE * | ldbStatsFP |
computeInfo * | computeArray |
patchInfo * | patchArray |
processorInfo * | processorArray |
LdbInfra * | theLbdb |
LDBarrierClient | ldBarrierHandle |
LDOMid | myOMid |
LDOMHandle | myHandle |
LdbMigrateMsg * | migrateMsgs |
int | numComputes |
int | nRegisteredObjs |
int | reg_all_objs |
LDObjHandle * | patchHandles |
Definition at line 88 of file LdbCoordinator.h.
LdbCoordinator::LdbCoordinator | ( | ) |
Definition at line 117 of file LdbCoordinator.C.
References AtSyncBarrierReached(), computeArray, ldBarrierHandle, ldbCycleNum, ldbStatsFP, migrateMsgs, myHandle, myOMid, NAMD_bug(), nLocalComputes, nLocalPatches, numComputes, patchArray, patchNAtoms, processorArray, reg_all_objs, ResumeFromSync(), sequencerThreads, staticMigrateFn(), staticQueryEstLoadFn(), staticReceiveAtSync(), staticResumeFromSync(), staticStatsFn(), takingLdbData, theLbdb, and totalStepsDone.
LdbCoordinator::~LdbCoordinator | ( | void | ) |
Definition at line 182 of file LdbCoordinator.C.
References computeArray, ldbStatsFP, patchArray, patchNAtoms, processorArray, and sequencerThreads.
void LdbCoordinator::AtSyncBarrierReached | ( | void | ) |
Definition at line 100 of file LdbCoordinator.C.
References myHandle, and theLbdb.
Referenced by LdbCoordinator().
void LdbCoordinator::awakenSequencers | ( | void | ) |
Definition at line 745 of file LdbCoordinator.C.
References Sequencer::awaken(), Controller::awaken(), controllerThread, PatchMap::numPatches(), patchMap, and sequencerThreads.
Referenced by resume2().
void LdbCoordinator::barrier | ( | void | ) |
Definition at line 646 of file LdbCoordinator.C.
References controllerExpected, controllerReported, ldBarrierHandle, NAMD_bug(), nComputesExpected, nComputesReported, nPatchesExpected, nPatchesReported, and theLbdb.
void LdbCoordinator::collectLoads | ( | CollectLoadsMsg * | msg | ) |
Definition at line 838 of file LdbCoordinator.C.
References COLL_AVG, COLL_MAX, COLL_SUM, endi(), CollectLoadsMsg::finalTime, CollectLoadsMsg::firstPe, CollectLoadsMsg::initTime, iout, CollectLoadsMsg::lastPe, and CollectLoadsMsg::strategyName.
void LdbCoordinator::createLoadBalancer | ( | ) |
Definition at line 197 of file LdbCoordinator.C.
References CreateNamdCentLB(), CreateNamdHybridLB(), LDBAL_CENTRALIZED, LDBAL_HYBRID, Node::Object(), Node::simParameters, and simParams.
Referenced by Node::startup().
|
inline |
Definition at line 110 of file LdbCoordinator.h.
References nComputesReported, and theLbdb.
Referenced by ComputePatch::doWork(), ComputePatchPair::doWork(), ComputeLCPO::doWork(), and ComputeHomeTuples< TholeElem, Thole, TholeValue >::doWork().
void LdbCoordinator::ExecuteMigrations | ( | void | ) |
Definition at line 669 of file LdbCoordinator.C.
References ComputeMgr::updateComputes(), and updateComputesReady().
Referenced by nodeDone().
void LdbCoordinator::ExpectMigrate | ( | LdbMigrateMsg * | m | ) |
Definition at line 696 of file LdbCoordinator.C.
References LdbMigrateMsg::from, LdbMigrateMsg::handle, migrateMsgs, myHandle, LdbMigrateMsg::next, and theLbdb.
Referenced by Migrate(), and RecvMigrate().
|
inline |
Definition at line 123 of file LdbCoordinator.h.
References numStepsToRun.
Referenced by Sequencer::rebalanceLoad(), and Controller::rebalanceLoad().
void LdbCoordinator::initialize | ( | PatchMap * | pmap, |
ComputeMap * | cmap, | ||
int | reinit = 0 |
||
) |
Definition at line 212 of file LdbCoordinator.C.
References BONDED_TYPE, ComputeMap::compute(), computeAnglesType, computeAnisoType, computeArray, computeBondsType, computeCrosstermsType, computeDihedralsType, computeExclsType, computeGromacsPairType, computeImpropersType, computeLCPOType, computeMap, computeNonbondedPairType, computeNonbondedSelfType, computeSelfAnglesType, computeSelfAnisoType, computeSelfBondsType, computeSelfCrosstermsType, computeSelfDihedralsType, computeSelfExclsType, computeSelfGromacsPairType, computeSelfImpropersType, computeSelfTholeType, computeTholeType, controllerExpected, controllerReported, controllerThread, firstLdbStep, LdbMigrateMsg::handle, PatchMap::homePatch(), ldbCycleNum, LdbIdField(), Compute::ldObjHandle, HomePatch::ldObjHandle, migrateMsgs, myHandle, Node::myid(), NAMD_bug(), NAMD_die(), nComputesExpected, nComputesReported, LdbMigrateMsg::next, nLocalComputes, nLocalPatches, ComputeMap::node(), PatchMap::node(), NONBONDED_OR_SELF_TYPE, nPatches, nPatchesExpected, nPatchesReported, nStatsMessagesExpected, nStatsMessagesReceived, ComputeMap::numComputes(), numComputes, PatchMap::numHomePatches(), Node::numNodes(), PatchMap::numPatches(), ComputeMap::numPids(), numStepsToRun, Node::Object(), PATCH_TYPE, patchArray, patchHandles, patchMap, patchNAtoms, ComputeMap::pid(), processorArray, reg_all_objs, sequencerThreads, Node::simParameters, simParams, stepsPerLdbCycle, takingLdbData, theLbdb, totalStepsDone, and ComputeMap::type().
Referenced by resume(), and Node::startup().
void LdbCoordinator::Migrate | ( | LDObjHandle | handle, |
int | dest | ||
) |
Definition at line 66 of file LdbCoordinator.C.
References ExpectMigrate(), LdbMigrateMsg::from, LdbMigrateMsg::handle, and LdbMigrateMsg::to.
Referenced by staticMigrateFn(), and ComputeMgr::updateLocalComputes().
void LdbCoordinator::nodeDone | ( | CkReductionMsg * | msg | ) |
Definition at line 657 of file LdbCoordinator.C.
References endi(), ExecuteMigrations(), iout, takingLdbData, and updateComputesReady().
|
inlinestatic |
Definition at line 93 of file LdbCoordinator.h.
Referenced by ComputePatch::doWork(), ComputePatchPair::doWork(), ComputeLCPO::doWork(), ComputeHomeTuples< TholeElem, Thole, TholeValue >::doWork(), SimpleBroadcastObject< Tensor >::get(), ComputeNonbondedPair::noWork(), ComputeNonbondedSelf::noWork(), ComputeLCPO::noWork(), Sequencer::rebalanceLoad(), Controller::rebalanceLoad(), Sequencer::Sequencer(), Node::startup(), staticMigrateFn(), HomePatch::submitLoadStats(), Sequencer::suspend(), Sequencer::terminate(), ComputeMgr::updateLocalComputes(), and Rebalancer::~Rebalancer().
void LdbCoordinator::patchLoad | ( | PatchID | id, |
int | nAtoms, | ||
int | timestep | ||
) |
Definition at line 611 of file LdbCoordinator.C.
References DebugM, nPatches, nPatchesReported, and patchNAtoms.
Referenced by HomePatch::submitLoadStats().
|
inline |
Definition at line 104 of file LdbCoordinator.h.
References theLbdb.
Referenced by ComputePatch::doWork(), ComputePatchPair::doWork(), SimpleBroadcastObject< Tensor >::get(), Sequencer::suspend(), and Sequencer::terminate().
void LdbCoordinator::printLocalLdbReport | ( | void | ) |
Definition at line 790 of file LdbCoordinator.C.
References PatchMap::numPatches(), patchMap, and patchNAtoms.
void LdbCoordinator::printRequiredProxies | ( | PatchID | id, |
FILE * | fp | ||
) |
Definition at line 820 of file LdbCoordinator.C.
References PatchMap::MaxOneAway, PatchMap::MaxTwoAway, and requiredProxies().
Definition at line 622 of file LdbCoordinator.C.
References LDBAL_NONE, Node::Object(), sequencerThreads, and Sequencer::suspend().
Referenced by Sequencer::rebalanceLoad(), and Controller::rebalanceLoad().
void LdbCoordinator::rebalance | ( | Controller * | seq | ) |
Definition at line 631 of file LdbCoordinator.C.
References controllerReported, controllerThread, DebugM, endi(), iout, LDBAL_NONE, and Node::Object().
void LdbCoordinator::RecvMigrate | ( | LdbMigrateMsg * | m | ) |
Definition at line 681 of file LdbCoordinator.C.
References ExpectMigrate(), LdbMigrateMsg::handle, theLbdb, and LdbMigrateMsg::to.
int LdbCoordinator::requiredProxies | ( | PatchID | id, |
int | neighborNodes[] | ||
) |
Definition at line 766 of file LdbCoordinator.C.
References PatchMap::basenode(), PatchMap::downstreamNeighbors(), PatchMap::MaxOneAway, PatchMap::node(), and patchMap.
Referenced by printRequiredProxies().
void LdbCoordinator::resume | ( | void | ) |
Definition at line 714 of file LdbCoordinator.C.
References DebugM, initialize(), ldbCycleNum, PatchMap::Object(), Sync::Object(), ComputeMap::Object(), and Sync::openSync().
void LdbCoordinator::resume2 | ( | void | ) |
void LdbCoordinator::ResumeFromSync | ( | void | ) |
Definition at line 110 of file LdbCoordinator.C.
References myHandle, and theLbdb.
Referenced by LdbCoordinator().
void LdbCoordinator::resumeReady | ( | CkQdMsg * | msg | ) |
void LdbCoordinator::sendCollectLoads | ( | CollectLoadsMsg * | msg | ) |
Definition at line 834 of file LdbCoordinator.C.
Referenced by Rebalancer::~Rebalancer().
|
inline |
Definition at line 107 of file LdbCoordinator.h.
References nComputesReported.
Referenced by ComputeNonbondedPair::noWork(), ComputeNonbondedSelf::noWork(), and ComputeLCPO::noWork().
|
inline |
Definition at line 101 of file LdbCoordinator.h.
References theLbdb.
Referenced by ComputePatch::doWork(), ComputePatchPair::doWork(), ComputeLCPO::doWork(), ComputeHomeTuples< TholeElem, Thole, TholeValue >::doWork(), SimpleBroadcastObject< Tensor >::get(), and Sequencer::suspend().
|
static |
Definition at line 61 of file LdbCoordinator.C.
References Migrate(), and Object().
Referenced by LdbCoordinator().
|
static |
Definition at line 85 of file LdbCoordinator.C.
Referenced by LdbCoordinator().
|
static |
Definition at line 90 of file LdbCoordinator.C.
Referenced by LdbCoordinator().
|
static |
Definition at line 105 of file LdbCoordinator.C.
Referenced by LdbCoordinator().
|
static |
Definition at line 80 of file LdbCoordinator.C.
Referenced by LdbCoordinator().
void LdbCoordinator::updateComputesReady | ( | ) |
Definition at line 707 of file LdbCoordinator.C.
References DebugM.
Referenced by ExecuteMigrations(), and nodeDone().
computeInfo* LdbCoordinator::computeArray |
Definition at line 169 of file LdbCoordinator.h.
Referenced by initialize(), LdbCoordinator(), and ~LdbCoordinator().
ComputeMap* LdbCoordinator::computeMap |
Definition at line 153 of file LdbCoordinator.h.
Referenced by initialize().
int LdbCoordinator::controllerExpected |
Definition at line 150 of file LdbCoordinator.h.
Referenced by barrier(), and initialize().
int LdbCoordinator::controllerReported |
Definition at line 149 of file LdbCoordinator.h.
Referenced by barrier(), initialize(), and rebalance().
Controller* LdbCoordinator::controllerThread |
Definition at line 157 of file LdbCoordinator.h.
Referenced by awakenSequencers(), initialize(), and rebalance().
int LdbCoordinator::firstLdbStep |
Definition at line 163 of file LdbCoordinator.h.
Referenced by initialize().
LDBarrierClient LdbCoordinator::ldBarrierHandle |
Definition at line 174 of file LdbCoordinator.h.
Referenced by barrier(), and LdbCoordinator().
int LdbCoordinator::ldbCycleNum |
Definition at line 160 of file LdbCoordinator.h.
Referenced by initialize(), LdbCoordinator(), and resume().
FILE* LdbCoordinator::ldbStatsFP |
Definition at line 168 of file LdbCoordinator.h.
Referenced by LdbCoordinator(), and ~LdbCoordinator().
LdbMigrateMsg* LdbCoordinator::migrateMsgs |
Definition at line 177 of file LdbCoordinator.h.
Referenced by ExpectMigrate(), initialize(), and LdbCoordinator().
LDOMHandle LdbCoordinator::myHandle |
Definition at line 176 of file LdbCoordinator.h.
Referenced by AtSyncBarrierReached(), ExpectMigrate(), initialize(), LdbCoordinator(), and ResumeFromSync().
LDOMid LdbCoordinator::myOMid |
Definition at line 175 of file LdbCoordinator.h.
Referenced by LdbCoordinator().
int LdbCoordinator::nComputesExpected |
Definition at line 148 of file LdbCoordinator.h.
Referenced by barrier(), and initialize().
int LdbCoordinator::nComputesReported |
Definition at line 147 of file LdbCoordinator.h.
Referenced by barrier(), endWork(), initialize(), and skipWork().
int LdbCoordinator::nLocalComputes |
Definition at line 143 of file LdbCoordinator.h.
Referenced by initialize(), and LdbCoordinator().
int LdbCoordinator::nLocalPatches |
Definition at line 144 of file LdbCoordinator.h.
Referenced by initialize(), and LdbCoordinator().
int LdbCoordinator::nPatches |
Definition at line 156 of file LdbCoordinator.h.
Referenced by initialize(), and patchLoad().
int LdbCoordinator::nPatchesExpected |
Definition at line 146 of file LdbCoordinator.h.
Referenced by barrier(), and initialize().
int LdbCoordinator::nPatchesReported |
Definition at line 145 of file LdbCoordinator.h.
Referenced by barrier(), initialize(), and patchLoad().
int LdbCoordinator::nRegisteredObjs |
Definition at line 179 of file LdbCoordinator.h.
int LdbCoordinator::nStatsMessagesExpected |
Definition at line 152 of file LdbCoordinator.h.
Referenced by initialize().
int LdbCoordinator::nStatsMessagesReceived |
Definition at line 151 of file LdbCoordinator.h.
Referenced by initialize().
int LdbCoordinator::numComputes |
Definition at line 178 of file LdbCoordinator.h.
Referenced by initialize(), and LdbCoordinator().
int LdbCoordinator::numStepsToRun |
Definition at line 161 of file LdbCoordinator.h.
Referenced by getNumStepsToRun(), and initialize().
patchInfo* LdbCoordinator::patchArray |
Definition at line 170 of file LdbCoordinator.h.
Referenced by initialize(), LdbCoordinator(), and ~LdbCoordinator().
LDObjHandle* LdbCoordinator::patchHandles |
Definition at line 181 of file LdbCoordinator.h.
Referenced by initialize().
PatchMap* LdbCoordinator::patchMap |
Definition at line 154 of file LdbCoordinator.h.
Referenced by awakenSequencers(), initialize(), printLocalLdbReport(), and requiredProxies().
int* LdbCoordinator::patchNAtoms |
Definition at line 155 of file LdbCoordinator.h.
Referenced by initialize(), LdbCoordinator(), patchLoad(), printLocalLdbReport(), and ~LdbCoordinator().
processorInfo* LdbCoordinator::processorArray |
Definition at line 171 of file LdbCoordinator.h.
Referenced by initialize(), LdbCoordinator(), and ~LdbCoordinator().
int LdbCoordinator::reg_all_objs |
Definition at line 180 of file LdbCoordinator.h.
Referenced by initialize(), and LdbCoordinator().
Sequencer** LdbCoordinator::sequencerThreads |
Definition at line 158 of file LdbCoordinator.h.
Referenced by awakenSequencers(), initialize(), LdbCoordinator(), rebalance(), and ~LdbCoordinator().
int LdbCoordinator::stepsPerLdbCycle |
Definition at line 142 of file LdbCoordinator.h.
Referenced by initialize().
int LdbCoordinator::takingLdbData |
Definition at line 166 of file LdbCoordinator.h.
Referenced by initialize(), LdbCoordinator(), and nodeDone().
LdbInfra* LdbCoordinator::theLbdb |
Definition at line 173 of file LdbCoordinator.h.
Referenced by AtSyncBarrierReached(), barrier(), endWork(), ExpectMigrate(), initialize(), LdbCoordinator(), pauseWork(), RecvMigrate(), ResumeFromSync(), and startWork().
int LdbCoordinator::totalStepsDone |
Definition at line 164 of file LdbCoordinator.h.
Referenced by initialize(), and LdbCoordinator().