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

Definition at line 118 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.

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

Definition at line 183 of file LdbCoordinator.C.

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

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

Member Function Documentation

void LdbCoordinator::AtSyncBarrierReached ( void  )

Definition at line 101 of file LdbCoordinator.C.

References myHandle, and theLbdb.

Referenced by LdbCoordinator().

102 {
103  theLbdb->RegisteringObjects(myHandle);
104 }
LDOMHandle myHandle
LdbInfra * theLbdb
void LdbCoordinator::awakenSequencers ( void  )

Definition at line 746 of file LdbCoordinator.C.

References Sequencer::awaken(), Controller::awaken(), controllerThread, PatchMap::numPatches(), patchMap, and sequencerThreads.

Referenced by resume2().

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

Definition at line 647 of file LdbCoordinator.C.

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

648 {
652  {
653  NAMD_bug("Load balancer received wrong number of events.\n");
654  }
655  theLbdb->AtLocalBarrier(ldBarrierHandle);
656 }
void NAMD_bug(const char *err_msg)
Definition: common.C:129
LdbInfra * theLbdb
LDBarrierClient ldBarrierHandle
void LdbCoordinator::collectLoads ( CollectLoadsMsg msg)

Definition at line 839 of file LdbCoordinator.C.

References COLL_AVG, COLL_MAX, COLL_SUM, endi(), CollectLoadsMsg::finalTime, CollectLoadsMsg::firstPe, CollectLoadsMsg::initTime, iout, CollectLoadsMsg::lastPe, and CollectLoadsMsg::strategyName.

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

Definition at line 198 of file LdbCoordinator.C.

References CreateNamdCentLB(), CreateNamdHybridLB(), LDBAL_CENTRALIZED, LDBAL_HYBRID, SimParameters::ldBalancer, Node::Object(), Node::simParameters, and simParams.

Referenced by Node::startup().

199 {
201 
202  // Create hierarchical or centralized load balancers
203  // Currently centralized is the default
204  if (simParams->ldBalancer == LDBAL_CENTRALIZED) {
205  CkPrintf("LDB: Central LB being created...\n");
207  } else if (simParams->ldBalancer == LDBAL_HYBRID) {
208  CkPrintf("LDB: Hybrid LB being created...\n");
210  }
211 }
static Node * Object()
Definition: Node.h:86
#define LDBAL_HYBRID
Definition: SimParameters.h:63
SimParameters * simParameters
Definition: Node.h:178
void CreateNamdHybridLB()
Definition: NamdHybridLB.C:49
void CreateNamdCentLB()
Definition: NamdCentLB.C:26
#define LDBAL_CENTRALIZED
Definition: SimParameters.h:62
#define simParams
Definition: Output.C:127
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
void LdbCoordinator::ExecuteMigrations ( void  )

Definition at line 670 of file LdbCoordinator.C.

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

Referenced by nodeDone().

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

Definition at line 697 of file LdbCoordinator.C.

References LdbMigrateMsg::from, LdbMigrateMsg::handle, migrateMsgs, myHandle, LdbMigrateMsg::next, and theLbdb.

Referenced by Migrate(), and RecvMigrate().

698 {
699  if ( m->from != CkMyPe() ) {
700  m->handle = theLbdb->RegisterObj(myHandle,m->handle.id,0,1);
701  theLbdb->Migrated(m->handle);
702  }
703 
704  m->next = migrateMsgs;
705  migrateMsgs = m;
706 }
LdbMigrateMsg * migrateMsgs
LDOMHandle myHandle
LdbInfra * theLbdb
LdbMigrateMsg * next
LDObjHandle handle
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; }
void LdbCoordinator::initialize ( PatchMap pmap,
ComputeMap cmap,
int  reinit = 0 
)

Definition at line 213 of file LdbCoordinator.C.

References BONDED_TYPE, SimParameters::bondedCUDA, 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, SimParameters::firstLdbStep, firstLdbStep, LdbMigrateMsg::handle, PatchMap::homePatch(), SimParameters::lastLdbStep, ldbCycleNum, LdbIdField(), SimParameters::ldbPeriod, Compute::ldObjHandle, HomePatch::ldObjHandle, migrateMsgs, SimParameters::multigratorOn, SimParameters::multigratorPressureFreq, 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, SimParameters::stepsPerCycle, stepsPerLdbCycle, takingLdbData, theLbdb, totalStepsDone, and ComputeMap::type().

Referenced by resume(), and Node::startup().

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

Definition at line 67 of file LdbCoordinator.C.

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

Referenced by staticMigrateFn(), and ComputeMgr::updateLocalComputes().

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

Definition at line 658 of file LdbCoordinator.C.

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

659 {
660  delete msg;
661 
662  iout << "LDB: ============== END OF LOAD BALANCING =============== " << CmiWallTimer() << "\n" << endi;
663  if ( takingLdbData ) {
665  } else {
667  }
668 }
void updateComputesReady()
std::ostream & endi(std::ostream &s)
Definition: InfoStream.C:54
#define iout
Definition: InfoStream.h:51
void ExecuteMigrations(void)
static LdbCoordinator* LdbCoordinator::Object ( )
inlinestatic
void LdbCoordinator::patchLoad ( PatchID  id,
int  nAtoms,
int  timestep 
)

Definition at line 612 of file LdbCoordinator.C.

References DebugM, nPatches, nPatchesReported, and patchNAtoms.

Referenced by HomePatch::submitLoadStats().

613 {
614  CmiAssert( id >=0 && id < nPatches);
615  if (patchNAtoms[id] != -1) {
616  patchNAtoms[id] = nAtoms;
618  } else {
619  DebugM(10, "::patchLoad() Unexpected patch reporting in\n");
620  }
621 }
#define DebugM(x, y)
Definition: Debug.h:59
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
void LdbCoordinator::printLocalLdbReport ( void  )

Definition at line 791 of file LdbCoordinator.C.

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

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

Definition at line 821 of file LdbCoordinator.C.

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

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

Definition at line 623 of file LdbCoordinator.C.

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

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

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

Definition at line 632 of file LdbCoordinator.C.

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

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

Definition at line 682 of file LdbCoordinator.C.

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

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

Definition at line 767 of file LdbCoordinator.C.

References PatchMap::basenode(), PatchMap::downstreamNeighbors(), PatchMap::MaxOneAway, PatchMap::node(), and patchMap.

Referenced by printRequiredProxies().

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

Definition at line 715 of file LdbCoordinator.C.

References DebugM, initialize(), ldbCycleNum, PatchMap::Object(), Sync::Object(), ComputeMap::Object(), and Sync::openSync().

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

Definition at line 735 of file LdbCoordinator.C.

References awakenSequencers(), and DebugM.

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

Definition at line 111 of file LdbCoordinator.C.

References myHandle, and theLbdb.

Referenced by LdbCoordinator().

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

Definition at line 726 of file LdbCoordinator.C.

References DebugM, endi(), and iout.

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

Definition at line 835 of file LdbCoordinator.C.

Referenced by Rebalancer::~Rebalancer().

835  {
836  CProxy_LdbCoordinator(thisgroup)[0].collectLoads(msg);
837 }
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  }
void LdbCoordinator::startWork ( const LDObjHandle &  handle)
inline
void LdbCoordinator::staticMigrateFn ( LDObjHandle  handle,
int  dest 
)
static

Definition at line 62 of file LdbCoordinator.C.

References Migrate(), and Object().

Referenced by LdbCoordinator().

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

Definition at line 86 of file LdbCoordinator.C.

Referenced by LdbCoordinator().

87 {
88  CkPrintf("I'm supposed to query load\n");
89 }
void LdbCoordinator::staticReceiveAtSync ( void data)
static

Definition at line 91 of file LdbCoordinator.C.

Referenced by LdbCoordinator().

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

Definition at line 106 of file LdbCoordinator.C.

Referenced by LdbCoordinator().

107 {
108  ((LdbCoordinator*)data)->ResumeFromSync();
109 }
void LdbCoordinator::staticStatsFn ( LDOMHandle  h,
int  state 
)
static

Definition at line 81 of file LdbCoordinator.C.

Referenced by LdbCoordinator().

82 {
83  CkPrintf("I'm supposed to set stats\n");
84 }
void LdbCoordinator::updateComputesReady ( )

Definition at line 708 of file LdbCoordinator.C.

References DebugM.

Referenced by ExecuteMigrations(), and nodeDone().

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

Member Data Documentation

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
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
int* LdbCoordinator::patchNAtoms
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
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
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: