示例#1
0
void CentralLB::pup(PUP::er &p) { 
  BaseLB::pup(p); 
  if (p.isUnpacking())  {
    initLB(CkLBOptions(seqno)); 
  }
  p|reduction_started;
  int has_statsMsg=0;
  if (p.isPacking()) has_statsMsg = (statsMsg!=NULL);
  p|has_statsMsg;
  if (has_statsMsg) {
    if (p.isUnpacking())
      statsMsg = new CLBStatsMsg;
    statsMsg->pup(p);
  }
#if (defined(_FAULT_MLOG_) || defined(_FAULT_CAUSAL_))
  p | lbDecisionCount;
  p | resumeCount;
#endif
	
}
示例#2
0
/**
 * @brief Default constructor.
 */
NamdHybridLB::NamdHybridLB(): HybridBaseLB(CkLBOptions(-1))
{
  // setting the name
  lbname = (char *)"NamdHybridLB";

  delete tree;        // delete the tree built from the base class
  if (CkNumPes() <= 128)  {
    tree = new TwoLevelTree;   // similar to centralized load balancing
  }
  else {
#if CHARM_VERSION > 60304
    const SimParameters* simParams = Node::Object()->simParameters;
    tree = new ThreeLevelTree(simParams->hybridGroupSize);
    initTree();
#else
    tree = new ThreeLevelTree();
#endif
    // can only do shrink strategy on levels > 1
    statsStrategy = SHRINK_NULL;
  }

  // initializing thisProxy
  thisProxy = CProxy_NamdHybridLB(thisgroup);
  
  // initializing the central LB
  centralLB = AllocateNamdCentLB();

  // initializing the dummy LB
  dummyLB = AllocateNamdDummyLB();

  // assigning initial values to variables
  from_procs = NULL;
  computeArray = NULL;
  patchArray = NULL;
  processorArray = NULL;
  updateCount = 0;
  updateFlag = false;
  collectFlag = false;

}
示例#3
0
NamdDummyLB::NamdDummyLB(): CentralLB(CkLBOptions(-1)) {
  lbname = (char*)"NamdDummyLB";
  if (CkMyPe() == 0)
    CkPrintf("[%d] DummyLB created\n",CkMyPe());
}