コード例 #1
0
ファイル: WSLB.C プロジェクト: gitter-badger/quinoa
void WSLB::AtSync()
{
#if CMK_LBDB_ON
  //  CkPrintf("[%d] WSLB At Sync step %d!!!!\n",CkMyPe(),mystep);

  if (CkMyPe() == 0) {
    start_lb_time = CkWallTimer();
    CkPrintf("Load balancing step %d starting at %f\n",
	     step(),start_lb_time);
  }

  if (neighbor_pes == 0) FindNeighbors();

  if (!QueryBalanceNow(step()) || mig_msgs_expected == 0) {
    MigrationDone();
    return;
  }

  WSLBStatsMsg* msg = AssembleStats();

  thisProxy.ReceiveStats(msg,mig_msgs_expected,neighbor_pes);

  // Tell our own node that we are ready
  ReceiveStats((WSLBStatsMsg*)0);
#endif
}
コード例 #2
0
ファイル: HybridBaseLB.C プロジェクト: quinoacomputing/quinoa
void HybridBaseLB::AtSync()
{
#if CMK_LBDB_ON
  //  CkPrintf("[%d] HybridBaseLB At Sync step %d!!!!\n",CkMyPe(),mystep);

  FindNeighbors();

  // if num of processor is only 1, nothing should happen
  if (!QueryBalanceNow(step()) || CkNumPes() == 1) {
    MigrationDone(0);
    return;
  }

  thisProxy[CkMyPe()].ProcessAtSync();
#endif
}
コード例 #3
0
ファイル: CentralLB.C プロジェクト: luyukunphy/namd
void CentralLB::AtSync()
{
#if CMK_LBDB_ON
  DEBUGF(("[%d] CentralLB AtSync step %d!!!!!\n",CkMyPe(),step()));
#if CMK_MEM_CHECKPOINT	
  CkSetInLdb();
#endif
#if (defined(_FAULT_MLOG_) || defined(_FAULT_CAUSAL_))
	CpvAccess(_currentObj)=this;
#endif

  // if num of processor is only 1, nothing should happen
  if (!QueryBalanceNow(step()) || CkNumPes() == 1) {
    MigrationDone(0);
    return;
  }
  if(CmiNodeAlive(CkMyPe())){
    thisProxy [CkMyPe()].ProcessAtSync();
  }
#endif
}