NAMD
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
LdbCoordinator Class Reference

#include <LdbCoordinator.h>

Inheritance diagram for LdbCoordinator:

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 LdbCoordinatorObject ()
 
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
 
ComputeMapcomputeMap
 
PatchMappatchMap
 
int * patchNAtoms
 
int nPatches
 
ControllercontrollerThread
 
Sequencer ** sequencerThreads
 
int ldbCycleNum
 
int numStepsToRun
 
int firstLdbStep
 
int totalStepsDone
 
int takingLdbData
 
FILE * ldbStatsFP
 
computeInfocomputeArray
 
patchInfopatchArray
 
processorInfoprocessorArray
 
LdbInfratheLbdb
 
LDBarrierClient ldBarrierHandle
 
LDOMid myOMid
 
LDOMHandle myHandle
 
LdbMigrateMsgmigrateMsgs
 
int numComputes
 
int nRegisteredObjs
 
int reg_all_objs
 
LDObjHandle * patchHandles
 

Detailed Description

Definition at line 88 of file LdbCoordinator.h.

Constructor & Destructor Documentation

◆ LdbCoordinator()

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.

118 {
119  if (CkpvAccess(LdbCoordinator_instance) == NULL) {
120  CkpvAccess(LdbCoordinator_instance) = this;
121  } else {
122  NAMD_bug("LdbCoordinator instanced twice on same node!");
123  }
124 
125  collPes = 0;
126  ldbCycleNum = 1;
127  takingLdbData = 1;
128  totalStepsDone = 0;
130  patchNAtoms = (int *) NULL;
131  sequencerThreads = (Sequencer **) NULL;
132  ldbStatsFP = NULL;
133  computeArray = NULL;
134  patchArray = NULL;
135  processorArray = NULL;
136 
137  // Register self as an object manager for new charm++ balancer framework
138  theLbdb = LdbInfra::Object();
139 
140  // Set the load balancing period (in seconds). Without this the
141  // load balancing framework will hang until 1 second has passed
142  // since the last load balancing, causing hiccups in very fast runs.
143  // Unfortunately, the clock is already set for the first load
144  // balancing, but only +LBPeriod 1.0e-5 can fix that in older charm.
145  // For newer versions this is handled in initproc above.
146 
147 #ifndef LB_MANAGER_VERSION
148  theLbdb->SetLBPeriod(1.0e-5);
149 #endif
150 
151  myOMid.id.idx = 1;
152  LDCallbacks cb = { (LDMigrateFn)staticMigrateFn,
153  (LDStatsFn)staticStatsFn,
154  (LDQueryEstLoadFn)staticQueryEstLoadFn
155  };
156  myHandle = theLbdb->RegisterOM(myOMid,nullptr,cb);
157 
158 #ifdef LB_MANAGER_VERSION
159  // Add myself as a local barrier receiver, so I know when I might
160  // be registering objects.
161  theLbdb->AddLocalBarrierReceiver(this, &LdbCoordinator::AtSyncBarrierReached);
162 
163  // Also, add a local barrier client, to trigger load balancing
165  AddLocalBarrierClient(this, &LdbCoordinator::ResumeFromSync);
166 #else
167  // Add myself as a local barrier receiver, so I know when I might
168  // be registering objects.
169  theLbdb->AddLocalBarrierReceiver((LDBarrierFn)staticReceiveAtSync,
170  (void*)this);;
171 
172  // Also, add a local barrier client, to trigger load balancing
174  AddLocalBarrierClient((LDResumeFn)staticResumeFromSync,
175  (void*)this);
176 #endif
177  migrateMsgs = 0; // linked list
178  numComputes = 0;
179  reg_all_objs = 1;
180 }
Sequencer ** sequencerThreads
void AtSyncBarrierReached(void)
void ResumeFromSync(void)
LdbMigrateMsg * migrateMsgs
LDOMHandle myHandle
void NAMD_bug(const char *err_msg)
Definition: common.C:195
static void staticQueryEstLoadFn(LDOMHandle h)
static void staticReceiveAtSync(void *data)
LdbInfra * theLbdb
computeInfo * computeArray
static void staticMigrateFn(LDObjHandle handle, int dest)
patchInfo * patchArray
LDBarrierClient ldBarrierHandle
static void staticResumeFromSync(void *data)
static void staticStatsFn(LDOMHandle h, int state)
processorInfo * processorArray

◆ ~LdbCoordinator()

LdbCoordinator::~LdbCoordinator ( void  )

Definition at line 182 of file LdbCoordinator.C.

References computeArray, ldbStatsFP, patchArray, patchNAtoms, processorArray, and sequencerThreads.

183 {
184  delete [] patchNAtoms;
185  delete [] sequencerThreads;
186  if (CkMyPe() == 0)
187  {
188  delete [] computeArray;
189  delete [] patchArray;
190  delete [] processorArray;
191  }
192  if (ldbStatsFP)
193  fclose(ldbStatsFP);
194 
195 }
Sequencer ** sequencerThreads
computeInfo * computeArray
patchInfo * patchArray
processorInfo * processorArray

Member Function Documentation

◆ AtSyncBarrierReached()

void LdbCoordinator::AtSyncBarrierReached ( void  )

Definition at line 100 of file LdbCoordinator.C.

References myHandle, and theLbdb.

Referenced by LdbCoordinator().

101 {
102  theLbdb->RegisteringObjects(myHandle);
103 }
LDOMHandle myHandle
LdbInfra * theLbdb

◆ awakenSequencers()

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().

746 {
747  if (controllerThread)
748  {
750  controllerThread = NULL;
751  }
752  for(int i=0; i < patchMap->numPatches(); i++)
753  {
754  if (sequencerThreads[i])
755  {
756  sequencerThreads[i]->awaken();
757  }
758  sequencerThreads[i]= NULL;
759  }
760 }
Controller * controllerThread
Sequencer ** sequencerThreads
PatchMap * patchMap
int numPatches(void) const
Definition: PatchMap.h:59
void awaken(void)
Definition: Sequencer.h:53
void awaken(void)
Definition: Controller.C:354

◆ barrier()

void LdbCoordinator::barrier ( void  )

Definition at line 646 of file LdbCoordinator.C.

References controllerExpected, controllerReported, ldBarrierHandle, NAMD_bug(), nComputesExpected, nComputesReported, nPatchesExpected, nPatchesReported, and theLbdb.

647 {
651  {
652  NAMD_bug("Load balancer received wrong number of events.\n");
653  }
654  theLbdb->AtLocalBarrier(ldBarrierHandle);
655 }
void NAMD_bug(const char *err_msg)
Definition: common.C:195
LdbInfra * theLbdb
LDBarrierClient ldBarrierHandle

◆ collectLoads()

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.

838  {
839  // CkPrintf("LdbCoordinator::collectLoads recv %d-%d\n", msg->firstPe, msg->lastPe);
840  if ( collPes == 0 ) {
841  reverted = 0;
842  initTotalProxies = 0;
843  finalTotalProxies = 0;
844  initMaxPeProxies = 0;
845  finalMaxPeProxies = 0;
846  initMaxPatchProxies = 0;
847  finalMaxPatchProxies = 0;
848  initTime = 0;
849  finalTime = 0;
850  initMemory = 0;
851  finalMemory = 0;
852  initAvgPeLoad = 0;
853  finalAvgPeLoad = 0;
854  initMaxPeLoad = 0;
855  finalMaxPeLoad = 0;
856  }
857  int numPes = msg->lastPe - msg->firstPe + 1;
858  collPes += numPes;
859 #define COLL_MAX(F) if ( msg->F > F ) F = msg->F;
860 #define COLL_AVG(F) F += msg->F * (double) numPes / (double) CkNumPes();
861 #define COLL_SUM(F) F += msg->F;
862  COLL_SUM(reverted)
863  COLL_SUM(initTotalProxies)
864  COLL_SUM(finalTotalProxies)
865  COLL_MAX(initMaxPeProxies)
866  COLL_MAX(finalMaxPeProxies)
867  COLL_MAX(initMaxPatchProxies)
868  COLL_MAX(finalMaxPatchProxies)
869  if ( (msg->finalTime - msg->initTime) > (finalTime - initTime) ) {
870  initTime = msg->initTime;
871  finalTime = msg->finalTime;
872  }
873  COLL_MAX(initMemory)
874  COLL_MAX(finalMemory)
875  COLL_AVG(initAvgPeLoad)
876  COLL_AVG(finalAvgPeLoad)
877  COLL_MAX(initMaxPeLoad)
878  COLL_MAX(finalMaxPeLoad)
879 
880  if ( collPes == CkNumPes() ) {
881  collPes = 0;
882  iout << "LDB: TIME " << initTime << " LOAD: AVG " << initAvgPeLoad
883  << " MAX " << initMaxPeLoad << " PROXIES: TOTAL " << initTotalProxies << " MAXPE " <<
884  initMaxPeProxies << " MAXPATCH " << initMaxPatchProxies << " " << "None"
885  << " MEM: " << initMemory << " MB\n";
886  if ( reverted ) iout << "LDB: Reverting to original mapping on " << reverted << " balancers\n";
887  iout << "LDB: TIME " << finalTime << " LOAD: AVG " << finalAvgPeLoad
888  << " MAX " << finalMaxPeLoad << " PROXIES: TOTAL " << finalTotalProxies << " MAXPE " <<
889  finalMaxPeProxies << " MAXPATCH " << finalMaxPatchProxies << " " << msg->strategyName
890  << " MEM: " << finalMemory << " MB\n";
891  iout << endi;
892  fflush(stdout);
893  }
894 
895  delete msg;
896 }
#define COLL_AVG(F)
std::ostream & endi(std::ostream &s)
Definition: InfoStream.C:54
#define iout
Definition: InfoStream.h:51
char strategyName[16]
#define COLL_SUM(F)
#define COLL_MAX(F)

◆ createLoadBalancer()

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().

198 {
200 
201  // Create hierarchical or centralized load balancers
202  // Currently centralized is the default
203  if (simParams->ldBalancer == LDBAL_CENTRALIZED) {
204  CkPrintf("LDB: Central LB being created...\n");
206  } else if (simParams->ldBalancer == LDBAL_HYBRID) {
207  CkPrintf("LDB: Hybrid LB being created...\n");
209  }
210 }
static Node * Object()
Definition: Node.h:86
#define LDBAL_HYBRID
Definition: SimParameters.h:65
SimParameters * simParameters
Definition: Node.h:181
void CreateNamdHybridLB()
Definition: NamdHybridLB.C:49
void CreateNamdCentLB()
Definition: NamdCentLB.C:26
#define LDBAL_CENTRALIZED
Definition: SimParameters.h:64
#define simParams
Definition: Output.C:129

◆ endWork()

void LdbCoordinator::endWork ( const LDObjHandle &  handle)
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().

110  { // both
111  theLbdb->ObjectStop(handle);
113  }
LdbInfra * theLbdb

◆ ExecuteMigrations()

void LdbCoordinator::ExecuteMigrations ( void  )

Definition at line 669 of file LdbCoordinator.C.

References ComputeMgr::updateComputes(), and updateComputesReady().

Referenced by nodeDone().

670 {
671  // computeMgr->updateComputes() call only on Node(0) i.e. right here
672  // This will barrier for all Nodes - (i.e. Computes must be
673  // here and with proxies before anyone can start up
674 
675  CProxy_ComputeMgr cm(CkpvAccess(BOCclass_group).computeMgr);
676  ComputeMgr *computeMgr = cm.ckLocalBranch();
677  computeMgr->updateComputes(CkIndex_LdbCoordinator::
678  updateComputesReady(),thisgroup);
679 }
void updateComputesReady()
void updateComputes(int, CkGroupID)
Definition: ComputeMgr.C:140

◆ ExpectMigrate()

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().

697 {
698  if ( m->from != CkMyPe() ) {
699  m->handle = theLbdb->RegisterObj(myHandle,m->handle.id,0,1);
700  theLbdb->Migrated(m->handle);
701  }
702 
703  m->next = migrateMsgs;
704  migrateMsgs = m;
705 }
LdbMigrateMsg * migrateMsgs
LDOMHandle myHandle
LdbInfra * theLbdb
LdbMigrateMsg * next
LDObjHandle handle

◆ getNumStepsToRun()

int LdbCoordinator::getNumStepsToRun ( void  )
inline

Definition at line 123 of file LdbCoordinator.h.

References numStepsToRun.

Referenced by Sequencer::rebalanceLoad(), and Controller::rebalanceLoad().

123 { return numStepsToRun; }

◆ initialize()

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().

213 {
215 
216  // DebugM(10,"stepsPerLdbCycle initialized\n");
217  stepsPerLdbCycle = simParams->ldbPeriod;
218  firstLdbStep = simParams->firstLdbStep;
219  int lastLdbStep = simParams->lastLdbStep;
220  int stepsPerCycle = simParams->stepsPerCycle;
221 
222  computeMap = cMap;
223  patchMap = pMap;
224 
225  // Set the number of received messages correctly for node 0
226 
229 
230  if (patchNAtoms)
231  delete [] patchNAtoms; // Depends on delete NULL to do nothing
233  patchNAtoms = new int[nPatches];
234 
235  typedef Sequencer *seqPtr;
236 
237  if ( ! reinit ) {
238  delete [] sequencerThreads; // Depends on delete NULL to do nothing
239  sequencerThreads = new seqPtr[nPatches];
240  }
241 
242  nLocalPatches=0;
243 
244  int i;
245  for(i=0;i<nPatches;i++)
246  {
247  if (patchMap->node(i) == Node::Object()->myid())
248  {
249  nLocalPatches++;
250  patchNAtoms[i]=0;
251  } else {
252  patchNAtoms[i]=-1;
253  }
254  if ( ! reinit ) sequencerThreads[i]=NULL;
255  }
256  if ( ! reinit ) controllerThread = NULL;
258  NAMD_die("Disaggreement in patchMap data.\n");
259 
260  const int oldNumComputes = numComputes;
261  nLocalComputes = 0;
263 
264  for(i=0;i<numComputes;i++) {
265  if ( (computeMap->node(i) == Node::Object()->myid())
266  && ( 0
267  #if (defined(NAMD_CUDA) || defined(NAMD_HIP) || defined(NAMD_MIC))
268  #if defined(NAMD_MIC)
269  || ((computeMap->type(i) == computeNonbondedSelfType) && (computeMap->directToDevice(i) == 0))
270  || ((computeMap->type(i) == computeNonbondedPairType) && (computeMap->directToDevice(i) == 0))
271  #endif
272  #else
275 #endif
276 #if (defined(NAMD_CUDA) || defined(NAMD_HIP)) && defined(BONDED_CUDA)
277  || (computeMap->type(i) == computeSelfBondsType && !(simParams->bondedCUDA & 1))
278  || (computeMap->type(i) == computeBondsType && !(simParams->bondedCUDA & 1))
279  || (computeMap->type(i) == computeSelfAnglesType && !(simParams->bondedCUDA & 2))
280  || (computeMap->type(i) == computeAnglesType && !(simParams->bondedCUDA & 2))
281  || (computeMap->type(i) == computeSelfDihedralsType && !(simParams->bondedCUDA & 4))
282  || (computeMap->type(i) == computeDihedralsType && !(simParams->bondedCUDA & 4))
283  || (computeMap->type(i) == computeSelfImpropersType && !(simParams->bondedCUDA & 8))
284  || (computeMap->type(i) == computeImpropersType && !(simParams->bondedCUDA & 8))
285  || (computeMap->type(i) == computeSelfExclsType && !(simParams->bondedCUDA & 16))
286  || (computeMap->type(i) == computeExclsType && !(simParams->bondedCUDA & 16))
287  || (computeMap->type(i) == computeSelfCrosstermsType && !(simParams->bondedCUDA & 32))
288  || (computeMap->type(i) == computeCrosstermsType && !(simParams->bondedCUDA & 32))
289 #else
291  || (computeMap->type(i) == computeBondsType)
293  || (computeMap->type(i) == computeAnglesType)
299  || (computeMap->type(i) == computeExclsType)
302 #endif
303  || (computeMap->type(i) == computeLCPOType)
306 
307  || (computeMap->type(i) == computeTholeType)
308  || (computeMap->type(i) == computeAnisoType)
309  // JLai
312  ) ) {
313  nLocalComputes++;
314  }
315  }
316 
317  // New LB frameworks registration
318 
319  // Allocate data structure to save incoming migrations. Processor
320  // zero will get all migrations
321 
322  // If this is the first time through, we need it register patches
323  if (ldbCycleNum == reg_all_objs) {
324  if ( 1 ) { // ( Node::Object()->simParameters->ldBalancer == LDBAL_CENTRALIZED ) {
325  reg_all_objs = 3;
326  }
327  // Tell the lbdb that I'm registering objects, until I'm done
328  // registering them.
329  theLbdb->RegisteringObjects(myHandle);
330 
331  if ( ldbCycleNum == 1 ) {
332  patchHandles = new LDObjHandle[nLocalPatches];
333  int patch_count=0;
334  int i;
335  for(i=0;i<nPatches;i++)
336  if (patchMap->node(i) == Node::Object()->myid()) {
337 
338  LdbId elemID;
339  LdbIdField(elemID, 0) = i;
340  LdbIdField(elemID, 1) = PATCH_TYPE;
341 
342  if (patch_count >= nLocalPatches) {
343  NAMD_bug("LdbCoordinator found too many local patches!");
344  }
345  HomePatch *p = patchMap->homePatch(i);
346  p->ldObjHandle =
347  patchHandles[patch_count]
348  = theLbdb->RegisterObj(myHandle,elemID,0,0);
349  patch_count++;
350 
351  }
352  }
353 
354  if ( numComputes > oldNumComputes ) {
355  // Register computes
356  for(i=oldNumComputes; i<numComputes; i++) {
357  if ( computeMap->node(i) == Node::Object()->myid())
358  {
359  if ( 0
360  #if (defined(NAMD_CUDA) || defined(NAMD_HIP) || defined(NAMD_MIC))
361  #if defined(NAMD_MIC)
362  || ((computeMap->type(i) == computeNonbondedSelfType) && (computeMap->directToDevice(i) == 0))
363  || ((computeMap->type(i) == computeNonbondedPairType) && (computeMap->directToDevice(i) == 0))
364  #endif
365  #else
368  #endif
369 #if (defined(NAMD_CUDA) || defined(NAMD_HIP)) && defined(BONDED_CUDA)
370  || (computeMap->type(i) == computeSelfBondsType && !(simParams->bondedCUDA & 1))
371  || (computeMap->type(i) == computeSelfAnglesType && !(simParams->bondedCUDA & 2))
372  || (computeMap->type(i) == computeSelfDihedralsType && !(simParams->bondedCUDA & 4))
373  || (computeMap->type(i) == computeSelfImpropersType && !(simParams->bondedCUDA & 8))
374  || (computeMap->type(i) == computeSelfExclsType && !(simParams->bondedCUDA & 16))
375  || (computeMap->type(i) == computeSelfCrosstermsType && !(simParams->bondedCUDA & 32))
376 #else
383 #endif
384  || (computeMap->type(i) == computeLCPOType)
387  // JLai
389  // End of JLai
390  ) {
391  // Register the object with the load balancer
392  // Store the depended patch IDs in the rest of the element ID
393  LdbId elemID;
394  LdbIdField(elemID, 0) = i;
395 
396  if (computeMap->numPids(i) > 0)
397  LdbIdField(elemID, 1) = computeMap->pid(i,0);
398  else LdbIdField(elemID, 1) = NONBONDED_OR_SELF_TYPE;
399 
400  Compute *c = computeMap->compute(i);
401  if ( ! c ) NAMD_bug("LdbCoordinator::initialize() null compute pointer");
402 
403  c->ldObjHandle = theLbdb->RegisterObj(myHandle,elemID,0,1);
404  }
405  else if (
406 #if (defined(NAMD_CUDA) || defined(NAMD_HIP)) && defined(BONDED_CUDA)
407  (computeMap->type(i) == computeBondsType && !(simParams->bondedCUDA & 1))
408  || (computeMap->type(i) == computeAnglesType && !(simParams->bondedCUDA & 2))
409  || (computeMap->type(i) == computeDihedralsType && !(simParams->bondedCUDA & 4))
410  || (computeMap->type(i) == computeImpropersType && !(simParams->bondedCUDA & 8))
411  || (computeMap->type(i) == computeExclsType && !(simParams->bondedCUDA & 16))
412  || (computeMap->type(i) == computeCrosstermsType && !(simParams->bondedCUDA & 32))
413 #else
415  || (computeMap->type(i) == computeAnglesType)
418  || (computeMap->type(i) == computeExclsType)
420 #endif
421  || (computeMap->type(i) == computeTholeType)
422  || (computeMap->type(i) == computeAnisoType)
423  // JLai
425  // End of JLai
426  ) {
427  // Register the object with the load balancer
428  // Store the depended patch IDs in the rest of the element ID
429  LdbId elemID;
430  LdbIdField(elemID, 0) = i;
431 
432  LdbIdField(elemID, 1) = BONDED_TYPE;
433 
434  Compute *c = computeMap->compute(i);
435  if ( ! c ) NAMD_bug("LdbCoordinator::initialize() null compute pointer");
436 
437  c->ldObjHandle = theLbdb->RegisterObj(myHandle,elemID,0,0);
438  }
439  }
440  }
441  }
442  theLbdb->DoneRegisteringObjects(myHandle);
443  }
444 
445  // process saved migration messages, if any
446  while ( migrateMsgs ) {
448  migrateMsgs = m->next;
449  Compute *c = computeMap->compute(LdbIdField(m->handle.id, 0));
450  if ( ! c ) NAMD_bug("LdbCoordinator::initialize() null compute pointer 2");
451  c->ldObjHandle = m->handle;
452  delete m;
453  }
454 
455  // Fixup to take care of the extra timestep at startup
456  // This is pretty ugly here, but it makes the count correct
457 
458  // iout << "LDB Cycle Num: " << ldbCycleNum << "\n";
459 
460  if ( 1 ) { // ( simParams->ldBalancer == LDBAL_CENTRALIZED ) {
461  if (ldbCycleNum == 1 || ldbCycleNum == 3) {
462  numStepsToRun = stepsPerCycle;
464  takingLdbData = 0;
465  theLbdb->CollectStatsOff();
466  } else if (ldbCycleNum == 2 || ldbCycleNum == 4) {
467  numStepsToRun = firstLdbStep - stepsPerCycle;
468  while ( numStepsToRun <= 0 ) numStepsToRun += stepsPerCycle;
470  takingLdbData = 1;
471  theLbdb->CollectStatsOn();
472  } else if ( (ldbCycleNum <= 6) || !takingLdbData )
473  {
475  if(lastLdbStep != -1 && totalStepsDone > lastLdbStep) {
476  numStepsToRun = -1;
477  takingLdbData = 0;
478  theLbdb->CollectStatsOff();
479  } else {
481  takingLdbData = 1;
482  theLbdb->CollectStatsOn();
483  }
484  }
485  else
486  {
488  if(lastLdbStep != -1 && totalStepsDone > lastLdbStep) {
489  numStepsToRun = -1;
490  takingLdbData = 0;
491  theLbdb->CollectStatsOff();
492  } else {
494  takingLdbData = 0;
495  theLbdb->CollectStatsOff();
496  }
497  }
498  } else {
499  if (ldbCycleNum==1)
500  {
503  takingLdbData = 0;
504  theLbdb->CollectStatsOff();
505  }
506  else if ( (ldbCycleNum <= 4) || !takingLdbData )
507  {
509  if(lastLdbStep != -1 && totalStepsDone > lastLdbStep) {
510  numStepsToRun = -1;
511  takingLdbData = 0;
512  theLbdb->CollectStatsOff();
513  } else {
515  takingLdbData = 1;
516  theLbdb->CollectStatsOn();
517  }
518  }
519  else
520  {
522  if(lastLdbStep != -1 && totalStepsDone > lastLdbStep) {
523  numStepsToRun = -1;
524  takingLdbData = 0;
525  theLbdb->CollectStatsOff();
526  } else {
528  takingLdbData = 0;
529  theLbdb->CollectStatsOff();
530  }
531  }
532  }
533 
534 /*-----------------------------------------------------------------------------*
535  * --------------------------------------------------------------------------- *
536  * Comments inserted by Abhinav to clarify relation between ldbCycleNum, *
537  * load balancing step numbers (printed by the step() function) and *
538  * tracing of the steps *
539  * --------------------------------------------------------------------------- *
540  * If trace is turned off in the beginning, then tracing is turned on *
541  * at ldbCycleNum = 4 and turned off at ldbCycleNum = 8. ldbCycleNum can *
542  * be adjusted by specifying firstLdbStep and ldbPeriod which are set by *
543  * default to 5*stepspercycle and 200*stepspercycle if not specified. *
544  * *
545  * If we choose firstLdbStep = 20 and ldbPeriod = 100, we have the *
546  * following timeline (for these particular numbers): *
547  * *
548  * Tracing : <------ off ------><------------- on -----------><-- off *
549  * Ldb Step() No : 1 2 3 4 5 6 7 *
550  * Iteration Steps : 00====20====40====60====80======160====180=====260====280 *
551  * ldbCycleNum : 1 2 3 4 5 6 7 8 9 *
552  * Instrumention : Inst Inst Inst Inst Inst *
553  * LDB Strategy : TLB RLB RLB RLB RLB *
554  * *
555  * TLB = TorusLB *
556  * RLB = RefineTorusLB *
557  * Inst = Instrumentation Phase (no real load balancing) *
558  * --------------------------------------------------------------------------- *
559  *-----------------------------------------------------------------------------*
560  */
561 #if 0 //replaced by traceBarrier at Controller and Sequencer
562  if (traceAvailable()) {
563  static int specialTracing = 0; // XXX static variables are unsafe for SMP
564  if (ldbCycleNum == 1 && traceIsOn() == 0) specialTracing = 1;
565  if (specialTracing) {
566  if (ldbCycleNum == 4) traceBegin();
567  if (ldbCycleNum == 8) traceEnd();
568  }
569  }
570 #endif
571 
572  nPatchesReported = 0;
574  nComputesReported = 0;
576  controllerReported = 0;
577  controllerExpected = ! CkMyPe();
578 
579  if (simParams->multigratorOn) {
580  // Add the number of pressure cycles into nComputesExpected:
581  // Pressure cycle is done when !(step % simParams->multigratorPressureFreq) = true
582  // step = Current step
583  int step = totalStepsDone - numStepsToRun;
584  int freq = simParams->multigratorPressureFreq;
585  // dstep = Number of steps we have to take until next pressure cycle
586  int dstep = 0;
587  if ((step % freq) != 0) dstep = freq - (step % freq);
588  step += dstep;
589  if (step < totalStepsDone) {
590  int numPressureCycles = 1 + ((totalStepsDone-step-1)/freq);
591  if (step==0) numPressureCycles--;
592  // if (CkMyPe()==2) fprintf(stderr, "step %d totalStepsDone %d numPressureCycles %d\n",
593  // step, totalStepsDone, numPressureCycles);
594  nComputesExpected += 2*nLocalComputes*numPressureCycles;
595  }
596  }
597 
598  if (CkMyPe() == 0)
599  {
600  if (computeArray == NULL)
602  if (patchArray == NULL)
604  if (processorArray == NULL)
605  processorArray = new processorInfo[CkNumPes()];
606  }
607 
608  theLbdb->ClearLoads();
609 }
static Node * Object()
Definition: Node.h:86
represents bonded compute
Controller * controllerThread
int numComputes(void)
Definition: ComputeMap.h:101
Sequencer ** sequencerThreads
SimParameters * simParameters
Definition: Node.h:181
LDObjHandle * patchHandles
LDObjHandle ldObjHandle
Definition: Compute.h:44
HomePatch * homePatch(PatchID pid)
Definition: PatchMap.h:249
LDObjHandle ldObjHandle
Definition: HomePatch.h:554
represents nonbonded or self compute
ComputeMap * computeMap
int numNodes()
Definition: Node.h:192
PatchMap * patchMap
int numPatches(void) const
Definition: PatchMap.h:59
LdbMigrateMsg * migrateMsgs
LDOMHandle myHandle
void NAMD_bug(const char *err_msg)
Definition: common.C:195
ComputeType type(ComputeID cid)
Definition: ComputeMap.C:118
const int & LdbIdField(const LdbId &id, const int index)
void NAMD_die(const char *err_msg)
Definition: common.C:147
represents a patch
int myid()
Definition: Node.h:191
LDObjid LdbId
#define simParams
Definition: Output.C:129
int numHomePatches(void)
Definition: PatchMap.C:432
Compute * compute(ComputeID cid)
Definition: ComputeMap.h:171
LdbInfra * theLbdb
computeInfo * computeArray
int node(ComputeID cid)
Definition: ComputeMap.h:106
int numPids(ComputeID cid)
Definition: ComputeMap.C:101
LdbMigrateMsg * next
int pid(ComputeID cid, int i)
Definition: ComputeMap.C:107
LDObjHandle handle
patchInfo * patchArray
int node(int pid) const
Definition: PatchMap.h:114
processorInfo * processorArray

◆ Migrate()

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().

67 {
68  LdbMigrateMsg* msg = new LdbMigrateMsg;
69  msg->handle = handle;
70  msg->from = CkMyPe();
71  msg->to = dest;
72  if ( msg->to != CkMyPe() ) {
73  CProxy_LdbCoordinator ldbProxy(thisgroup);
74  ldbProxy[CkMyPe()].RecvMigrate(msg);
75  } else {
76  ExpectMigrate(msg);
77  }
78 }
void ExpectMigrate(LdbMigrateMsg *)
LDObjHandle handle

◆ nodeDone()

void LdbCoordinator::nodeDone ( CkReductionMsg *  msg)

Definition at line 657 of file LdbCoordinator.C.

References endi(), ExecuteMigrations(), iout, takingLdbData, and updateComputesReady().

658 {
659  delete msg;
660 
661  iout << "LDB: ============== END OF LOAD BALANCING =============== " << CmiWallTimer() << "\n" << endi;
662  if ( takingLdbData ) {
664  } else {
666  }
667 }
void updateComputesReady()
std::ostream & endi(std::ostream &s)
Definition: InfoStream.C:54
#define iout
Definition: InfoStream.h:51
void ExecuteMigrations(void)

◆ Object()

static LdbCoordinator* LdbCoordinator::Object ( )
inlinestatic

◆ patchLoad()

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().

612 {
613  CmiAssert( id >=0 && id < nPatches);
614  if (patchNAtoms[id] != -1) {
615  patchNAtoms[id] = nAtoms;
617  } else {
618  DebugM(10, "::patchLoad() Unexpected patch reporting in\n");
619  }
620 }
#define DebugM(x, y)
Definition: Debug.h:75

◆ pauseWork()

void LdbCoordinator::pauseWork ( const LDObjHandle &  handle)
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().

104  { // stop timer only
105  theLbdb->ObjectStop(handle);
106  }
LdbInfra * theLbdb

◆ printLocalLdbReport()

void LdbCoordinator::printLocalLdbReport ( void  )

Definition at line 790 of file LdbCoordinator.C.

References PatchMap::numPatches(), patchMap, and patchNAtoms.

791 {
792  char outputBuf[255];
793  char *curLoc;
794 
795  CkPrintf("%d:Patch report:\n",CkMyPe());
796 
797  curLoc = outputBuf;
798  int i,j=0;
799  for(i=0; i<patchMap->numPatches(); i++)
800  {
801  if (patchNAtoms[i] != -1)
802  {
803  curLoc += sprintf(curLoc,"%5d: %5d ",i,patchNAtoms[i]);
804  j++;
805  }
806  if (((j % 4) == 0) && j)
807  {
808  curLoc = outputBuf;
809  CkPrintf("[%d]%s\n",CkMyPe(),outputBuf);
810  j=0;
811  }
812  }
813 
814  CkPrintf("%d:Compute report:\n",CkMyPe());
815 
816  curLoc = outputBuf;
817  j=0;
818 }
PatchMap * patchMap
int numPatches(void) const
Definition: PatchMap.h:59

◆ printRequiredProxies()

void LdbCoordinator::printRequiredProxies ( PatchID  id,
FILE *  fp 
)

Definition at line 820 of file LdbCoordinator.C.

References PatchMap::MaxOneAway, PatchMap::MaxTwoAway, and requiredProxies().

821 {
822  // Check all two-away neighbors.
823  // This is really just one-away neighbors, since
824  // two-away always returns zero: RKB
825  int neighborNodes[PatchMap::MaxOneAway + PatchMap::MaxTwoAway];
826  const int nProxyNodes = requiredProxies(id,neighborNodes);
827 
828  fprintf(fp,"%4d ",nProxyNodes);
829 
830  for(int i=0;i<nProxyNodes;i++)
831  fprintf(fp,"%4d ",neighborNodes[i]);
832 }
int requiredProxies(PatchID id, int [])

◆ rebalance() [1/2]

void LdbCoordinator::rebalance ( Sequencer seq,
PatchID  id 
)

Definition at line 622 of file LdbCoordinator.C.

References LDBAL_NONE, Node::Object(), sequencerThreads, and Sequencer::suspend().

Referenced by Sequencer::rebalanceLoad(), and Controller::rebalanceLoad().

623 {
624  if (Node::Object()->simParameters->ldBalancer == LDBAL_NONE)
625  return;
626 
627  sequencerThreads[pid] = seq;
628  seq->suspend();
629 }
static Node * Object()
Definition: Node.h:86
Sequencer ** sequencerThreads
#define LDBAL_NONE
Definition: SimParameters.h:63
void suspend(void)
Definition: Sequencer.C:267

◆ rebalance() [2/2]

void LdbCoordinator::rebalance ( Controller seq)

Definition at line 631 of file LdbCoordinator.C.

References controllerReported, controllerThread, DebugM, endi(), iout, LDBAL_NONE, and Node::Object().

632 {
633  if (Node::Object()->simParameters->ldBalancer == LDBAL_NONE)
634  return;
635 
636  iout << "LDB: ============= START OF LOAD BALANCING ============== " << CmiWallTimer() << "\n" << endi;
637  DebugM(3, "Controller reached load balance barrier.\n");
638  controllerReported = 1;
639  controllerThread = c;
640 
641  CProxy_LdbCoordinator(thisgroup).barrier();
642 
643  CthSuspend();
644 }
static Node * Object()
Definition: Node.h:86
Controller * controllerThread
#define DebugM(x, y)
Definition: Debug.h:75
std::ostream & endi(std::ostream &s)
Definition: InfoStream.C:54
#define iout
Definition: InfoStream.h:51
#define LDBAL_NONE
Definition: SimParameters.h:63

◆ RecvMigrate()

void LdbCoordinator::RecvMigrate ( LdbMigrateMsg m)

Definition at line 681 of file LdbCoordinator.C.

References ExpectMigrate(), LdbMigrateMsg::handle, theLbdb, and LdbMigrateMsg::to.

682 {
683  // This method receives the migration from the framework,
684  // unregisters it, and sends it to the destination PE
685 
686  if ( m->to != CkMyPe() ) {
687  theLbdb->UnregisterObj(m->handle);
688 
689  CProxy_LdbCoordinator ldbProxy(thisgroup);
690  ldbProxy[m->to].ExpectMigrate(m);
691  } else {
692  ExpectMigrate(m);
693  }
694 }
void ExpectMigrate(LdbMigrateMsg *)
LdbInfra * theLbdb
LDObjHandle handle

◆ requiredProxies()

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().

767 {
768  PatchID neighbors[1 + PatchMap::MaxOneAway];
769  neighbors[0] = id;
770  int numNeighbors = 1 + patchMap->downstreamNeighbors(id,neighbors+1);
771 
772  int nProxyNodes = 0;
773  int myNode = patchMap->node(id);
774  for ( int i = 0; i < numNeighbors; ++i ) {
775  const int proxyNode = patchMap->basenode(neighbors[i]);
776  if ( proxyNode != myNode ) {
777  int j;
778  for ( j = 0; j < nProxyNodes; ++j ) {
779  if ( neighborNodes[j] == proxyNode ) break;
780  }
781  if ( j == nProxyNodes ) {
782  neighborNodes[nProxyNodes] = proxyNode;
783  nProxyNodes++;
784  }
785  }
786  }
787  return nProxyNodes;
788 }
PatchMap * patchMap
int basenode(int pid) const
Definition: PatchMap.h:117
int downstreamNeighbors(int pid, PatchID *neighbor_ids)
Definition: PatchMap.C:714
int node(int pid) const
Definition: PatchMap.h:114
int32 PatchID
Definition: NamdTypes.h:277

◆ resume()

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().

715 {
716  DebugM(3,"resume()\n");
717  // printLocalLdbReport();
718 
719  ldbCycleNum++;
721 
722  Sync::Object()->openSync();
723 }
static PatchMap * Object()
Definition: PatchMap.h:27
#define DebugM(x, y)
Definition: Debug.h:75
void openSync()
Definition: Sync.C:63
void initialize(PatchMap *pmap, ComputeMap *cmap, int reinit=0)
static Sync * Object()
Definition: Sync.h:52
static ComputeMap * Object()
Definition: ComputeMap.h:89

◆ resume2()

void LdbCoordinator::resume2 ( void  )

Definition at line 734 of file LdbCoordinator.C.

References awakenSequencers(), and DebugM.

735 {
736  DebugM(3,"resume2()\n");
737 
738 #if CONVERSE_VERSION_ELAN
739  // enableBlockingReceives();
740 #endif
741 
743 }
#define DebugM(x, y)
Definition: Debug.h:75
void awakenSequencers(void)

◆ ResumeFromSync()

void LdbCoordinator::ResumeFromSync ( void  )

Definition at line 110 of file LdbCoordinator.C.

References myHandle, and theLbdb.

Referenced by LdbCoordinator().

111 {
112  theLbdb->DoneRegisteringObjects(myHandle);
113  CkCallback cb(CkIndex_LdbCoordinator::nodeDone(NULL), 0, thisgroup);
114  contribute(0, NULL, CkReduction::random, cb);
115 }
LDOMHandle myHandle
LdbInfra * theLbdb

◆ resumeReady()

void LdbCoordinator::resumeReady ( CkQdMsg *  msg)

Definition at line 725 of file LdbCoordinator.C.

References DebugM, endi(), and iout.

725  {
726 
727  iout << "LDB: =============== DONE WITH MIGRATION ================ " << CmiWallTimer() << "\n" << endi;
728  DebugM(3,"resumeReady()\n");
729  delete msg;
730 
731  CProxy_LdbCoordinator(thisgroup).resume2();
732 }
#define DebugM(x, y)
Definition: Debug.h:75
std::ostream & endi(std::ostream &s)
Definition: InfoStream.C:54
#define iout
Definition: InfoStream.h:51

◆ sendCollectLoads()

void LdbCoordinator::sendCollectLoads ( CollectLoadsMsg msg)

Definition at line 834 of file LdbCoordinator.C.

Referenced by Rebalancer::~Rebalancer().

834  {
835  CProxy_LdbCoordinator(thisgroup)[0].collectLoads(msg);
836 }

◆ skipWork()

void LdbCoordinator::skipWork ( const LDObjHandle &  handle)
inline

Definition at line 107 of file LdbCoordinator.h.

References nComputesReported.

Referenced by ComputeNonbondedPair::noWork(), ComputeNonbondedSelf::noWork(), and ComputeLCPO::noWork().

107  { // increment counter only
109  }

◆ startWork()

void LdbCoordinator::startWork ( const LDObjHandle &  handle)
inline

◆ staticMigrateFn()

void LdbCoordinator::staticMigrateFn ( LDObjHandle  handle,
int  dest 
)
static

Definition at line 61 of file LdbCoordinator.C.

References Migrate(), and Object().

Referenced by LdbCoordinator().

62 {
63  LdbCoordinator::Object()->Migrate(handle,dest);
64 }
void Migrate(LDObjHandle handle, int dest)
static LdbCoordinator * Object()

◆ staticQueryEstLoadFn()

void LdbCoordinator::staticQueryEstLoadFn ( LDOMHandle  h)
static

Definition at line 85 of file LdbCoordinator.C.

Referenced by LdbCoordinator().

86 {
87  CkPrintf("I'm supposed to query load\n");
88 }

◆ staticReceiveAtSync()

void LdbCoordinator::staticReceiveAtSync ( void *  data)
static

Definition at line 90 of file LdbCoordinator.C.

Referenced by LdbCoordinator().

91 {
92 
93 #if CONVERSE_VERSION_ELAN
94  //disableBlockingReceives();
95 #endif
96 
97  ((LdbCoordinator*)data)->AtSyncBarrierReached();
98 }

◆ staticResumeFromSync()

void LdbCoordinator::staticResumeFromSync ( void *  data)
static

Definition at line 105 of file LdbCoordinator.C.

Referenced by LdbCoordinator().

106 {
107  ((LdbCoordinator*)data)->ResumeFromSync();
108 }

◆ staticStatsFn()

void LdbCoordinator::staticStatsFn ( LDOMHandle  h,
int  state 
)
static

Definition at line 80 of file LdbCoordinator.C.

Referenced by LdbCoordinator().

81 {
82  CkPrintf("I'm supposed to set stats\n");
83 }

◆ updateComputesReady()

void LdbCoordinator::updateComputesReady ( )

Definition at line 707 of file LdbCoordinator.C.

References DebugM.

Referenced by ExecuteMigrations(), and nodeDone().

707  {
708  DebugM(3,"updateComputesReady()\n");
709 
710  CProxy_LdbCoordinator(thisgroup).resume();
711  CkStartQD(CkIndex_LdbCoordinator::resumeReady((CkQdMsg*)0),&thishandle);
712 }
#define DebugM(x, y)
Definition: Debug.h:75

Member Data Documentation

◆ computeArray

computeInfo* LdbCoordinator::computeArray

Definition at line 169 of file LdbCoordinator.h.

Referenced by initialize(), LdbCoordinator(), and ~LdbCoordinator().

◆ computeMap

ComputeMap* LdbCoordinator::computeMap

Definition at line 153 of file LdbCoordinator.h.

Referenced by initialize().

◆ controllerExpected

int LdbCoordinator::controllerExpected

Definition at line 150 of file LdbCoordinator.h.

Referenced by barrier(), and initialize().

◆ controllerReported

int LdbCoordinator::controllerReported

Definition at line 149 of file LdbCoordinator.h.

Referenced by barrier(), initialize(), and rebalance().

◆ controllerThread

Controller* LdbCoordinator::controllerThread

Definition at line 157 of file LdbCoordinator.h.

Referenced by awakenSequencers(), initialize(), and rebalance().

◆ firstLdbStep

int LdbCoordinator::firstLdbStep

Definition at line 163 of file LdbCoordinator.h.

Referenced by initialize().

◆ ldBarrierHandle

LDBarrierClient LdbCoordinator::ldBarrierHandle

Definition at line 174 of file LdbCoordinator.h.

Referenced by barrier(), and LdbCoordinator().

◆ ldbCycleNum

int LdbCoordinator::ldbCycleNum

Definition at line 160 of file LdbCoordinator.h.

Referenced by initialize(), LdbCoordinator(), and resume().

◆ ldbStatsFP

FILE* LdbCoordinator::ldbStatsFP

Definition at line 168 of file LdbCoordinator.h.

Referenced by LdbCoordinator(), and ~LdbCoordinator().

◆ migrateMsgs

LdbMigrateMsg* LdbCoordinator::migrateMsgs

Definition at line 177 of file LdbCoordinator.h.

Referenced by ExpectMigrate(), initialize(), and LdbCoordinator().

◆ myHandle

LDOMHandle LdbCoordinator::myHandle

◆ myOMid

LDOMid LdbCoordinator::myOMid

Definition at line 175 of file LdbCoordinator.h.

Referenced by LdbCoordinator().

◆ nComputesExpected

int LdbCoordinator::nComputesExpected

Definition at line 148 of file LdbCoordinator.h.

Referenced by barrier(), and initialize().

◆ nComputesReported

int LdbCoordinator::nComputesReported

Definition at line 147 of file LdbCoordinator.h.

Referenced by barrier(), endWork(), initialize(), and skipWork().

◆ nLocalComputes

int LdbCoordinator::nLocalComputes

Definition at line 143 of file LdbCoordinator.h.

Referenced by initialize(), and LdbCoordinator().

◆ nLocalPatches

int LdbCoordinator::nLocalPatches

Definition at line 144 of file LdbCoordinator.h.

Referenced by initialize(), and LdbCoordinator().

◆ nPatches

int LdbCoordinator::nPatches

Definition at line 156 of file LdbCoordinator.h.

Referenced by initialize(), and patchLoad().

◆ nPatchesExpected

int LdbCoordinator::nPatchesExpected

Definition at line 146 of file LdbCoordinator.h.

Referenced by barrier(), and initialize().

◆ nPatchesReported

int LdbCoordinator::nPatchesReported

Definition at line 145 of file LdbCoordinator.h.

Referenced by barrier(), initialize(), and patchLoad().

◆ nRegisteredObjs

int LdbCoordinator::nRegisteredObjs

Definition at line 179 of file LdbCoordinator.h.

◆ nStatsMessagesExpected

int LdbCoordinator::nStatsMessagesExpected

Definition at line 152 of file LdbCoordinator.h.

Referenced by initialize().

◆ nStatsMessagesReceived

int LdbCoordinator::nStatsMessagesReceived

Definition at line 151 of file LdbCoordinator.h.

Referenced by initialize().

◆ numComputes

int LdbCoordinator::numComputes

Definition at line 178 of file LdbCoordinator.h.

Referenced by initialize(), and LdbCoordinator().

◆ numStepsToRun

int LdbCoordinator::numStepsToRun

Definition at line 161 of file LdbCoordinator.h.

Referenced by getNumStepsToRun(), and initialize().

◆ patchArray

patchInfo* LdbCoordinator::patchArray

Definition at line 170 of file LdbCoordinator.h.

Referenced by initialize(), LdbCoordinator(), and ~LdbCoordinator().

◆ patchHandles

LDObjHandle* LdbCoordinator::patchHandles

Definition at line 181 of file LdbCoordinator.h.

Referenced by initialize().

◆ patchMap

PatchMap* LdbCoordinator::patchMap

◆ patchNAtoms

int* LdbCoordinator::patchNAtoms

◆ processorArray

processorInfo* LdbCoordinator::processorArray

Definition at line 171 of file LdbCoordinator.h.

Referenced by initialize(), LdbCoordinator(), and ~LdbCoordinator().

◆ reg_all_objs

int LdbCoordinator::reg_all_objs

Definition at line 180 of file LdbCoordinator.h.

Referenced by initialize(), and LdbCoordinator().

◆ sequencerThreads

Sequencer** LdbCoordinator::sequencerThreads

◆ stepsPerLdbCycle

int LdbCoordinator::stepsPerLdbCycle

Definition at line 142 of file LdbCoordinator.h.

Referenced by initialize().

◆ takingLdbData

int LdbCoordinator::takingLdbData

Definition at line 166 of file LdbCoordinator.h.

Referenced by initialize(), LdbCoordinator(), and nodeDone().

◆ theLbdb

LdbInfra* LdbCoordinator::theLbdb

◆ totalStepsDone

int LdbCoordinator::totalStepsDone

Definition at line 164 of file LdbCoordinator.h.

Referenced by initialize(), and LdbCoordinator().


The documentation for this class was generated from the following files: