LBDatabase Class Reference
[Charm++ Load Balancing Framework]

#include <LBDatabase.h>

Inheritance diagram for LBDatabase:

Inheritance graph
[legend]
Collaboration diagram for LBDatabase:

Collaboration graph
[legend]

Public Member Functions

 LBDatabase (void)
 LBDatabase (CkMigrateMessage *m)
 ~LBDatabase ()
LBDBgetLBDB ()
void pup (PUP::er &p)
LDOMHandle RegisterOM (LDOMid userID, void *userptr, LDCallbacks cb)
void RegisteringObjects (LDOMHandle _om)
void DoneRegisteringObjects (LDOMHandle _om)
LDObjHandle RegisterObj (LDOMHandle h, LDObjid id, void *userptr, int migratable)
void UnregisterObj (LDObjHandle h)
void ObjTime (LDObjHandle h, double walltime, double cputime)
int RunningObject (LDObjHandle *_o) const
const LDObjHandleRunningObject () const
const LDObjHandleGetObjHandle (int idx)
void ObjectStart (const LDObjHandle &_h)
void ObjectStop (const LDObjHandle &_h)
void Send (const LDOMHandle &_om, const LDObjid _id, unsigned int _b, int _p)
void MulticastSend (const LDOMHandle &_om, LDObjid *_ids, int _n, unsigned int _b, int _nMsgs=1)
void EstObjLoad (const LDObjHandle &h, double cpuload)
void NonMigratable (LDObjHandle h)
void Migratable (LDObjHandle h)
void UseAsyncMigrate (LDObjHandle h, CmiBool flag)
void DumpDatabase (void)
void NotifyMigrated (LDMigratedFn fn, void *data)
void AddStartLBFn (LDStartLBFn fn, void *data)
void RemoveStartLBFn (LDStartLBFn fn)
void StartLB ()
void TurnManualLBOn ()
void TurnManualLBOff ()
void PredictorOn (LBPredictorFunction *model)
void PredictorOn (LBPredictorFunction *model, int wind)
void PredictorOff ()
void ChangePredictor (LBPredictorFunction *model)
void CollectStatsOn (void)
void CollectStatsOff (void)
int CollectingStats (void)
void QueryEstLoad (void)
int GetObjDataSz (void)
void GetObjData (LDObjData *data)
int GetCommDataSz (void)
void GetCommData (LDCommData *data)
void BackgroundLoad (double *walltime, double *cputime)
void IdleTime (double *walltime)
void TotalTime (double *walltime, double *cputime)
void GetTime (double *total_walltime, double *total_cputime, double *idletime, double *bg_walltime, double *bg_cputime)
void ClearLoads (void)
int Migrate (LDObjHandle h, int dest)
void Migrated (LDObjHandle h, int waitBarrier=1)
LDBarrierClient AddLocalBarrierClient (LDResumeFn fn, void *data)
void RemoveLocalBarrierClient (LDBarrierClient h)
LDBarrierReceiver AddLocalBarrierReceiver (LDBarrierFn fn, void *data)
void RemoveLocalBarrierReceiver (LDBarrierReceiver h)
void AtLocalBarrier (LDBarrierClient h)
void LocalBarrierOn (void)
void LocalBarrierOff (void)
void ResumeClients ()
int ProcessorSpeed ()
void SetLBPeriod (double s)
double GetLBPeriod ()
char * availVector ()
void get_avail_vector (char *bitmap)
void set_avail_vector (char *bitmap, int new_ld=-1)
intnew_lbbalancer ()
double myExpectedLoad ()
double * expectedLoad ()
int useMem ()
int getLoadbalancerTicket ()
void addLoadbalancer (BaseLB *lb, int seq)
void nextLoadbalancer (int seq)
const char * loadbalancer (int seq)
int step ()
void incStep ()

Static Public Member Functions

static LBDatabaseObject ()
static void initnodeFn (void)

Data Fields

LastLBInfo lastLBInfo

Static Public Attributes

static int manualOn

Private Member Functions

void init ()

Private Attributes

int mystep
LDHandle myLDHandle
int new_ld_balancer
CkVec< BaseLB * > loadbalancers
int nloadbalancers

Static Private Attributes

static char * avail_vector

Data Structures

struct  LastLBInfo

Detailed Description

Definition at line 167 of file LBDatabase.h.


Constructor & Destructor Documentation

LBDatabase::LBDatabase ( void   )  [inline]

Definition at line 169 of file LBDatabase.h.

References init().

LBDatabase::LBDatabase ( CkMigrateMessage m  )  [inline]

Definition at line 170 of file LBDatabase.h.

References init().

LBDatabase::~LBDatabase (  )  [inline]

Definition at line 171 of file LBDatabase.h.

References avail_vector.


Member Function Documentation

static LBDatabase* LBDatabase::Object (  )  [inline, static]

Definition at line 176 of file LBDatabase.h.

References _lbdb, and CkLocalBranch().

Referenced by LBChangePredictor(), LBClearLoads(), LBDatabaseObj(), LBSetPeriod(), LBTurnInstrumentOff(), LBTurnInstrumentOn(), LBTurnPredictorOff(), LBTurnPredictorOn(), CentralLB::LoadBalance(), TurnManualLBOff(), and TurnManualLBOn().

LBDB* LBDatabase::getLBDB ( void   )  [inline]

Definition at line 178 of file LBDatabase.h.

References LDHandle::handle, and myLDHandle.

Referenced by CentralLB::CheckMigrationComplete(), HbmLB::HbmLB(), HybridBaseLB::HybridBaseLB(), CentralLB::initLB(), NborBaseLB::NborBaseLB(), CentralLB::SendStats(), CentralLB::turnOff(), CentralLB::turnOn(), WSLB::WSLB(), CentralLB::~CentralLB(), HbmLB::~HbmLB(), HybridBaseLB::~HybridBaseLB(), NborBaseLB::~NborBaseLB(), and WSLB::~WSLB().

LDOMHandle LBDatabase::RegisterOM ( LDOMid  userID,
void *  userptr,
LDCallbacks  cb 
) [inline]

Definition at line 188 of file LBDatabase.h.

References LDRegisterOM(), and myLDHandle.

void LBDatabase::RegisteringObjects ( LDOMHandle  _om  )  [inline]

Definition at line 192 of file LBDatabase.h.

References LDRegisteringObjects().

Referenced by CkLocMgr::recvAtSync().

void LBDatabase::DoneRegisteringObjects ( LDOMHandle  _om  )  [inline]

Definition at line 196 of file LBDatabase.h.

References LDDoneRegisteringObjects().

Referenced by CkLocMgr::dummyResumeFromSync().

LDObjHandle LBDatabase::RegisterObj ( LDOMHandle  h,
LDObjid  id,
void *  userptr,
int  migratable 
) [inline]

Definition at line 200 of file LBDatabase.h.

References LDRegisterObj().

Referenced by CkLocRec_local::CkLocRec_local().

void LBDatabase::UnregisterObj ( LDObjHandle  h  )  [inline]

Definition at line 205 of file LBDatabase.h.

References LDUnregisterObj().

Referenced by CkLocRec_local::~CkLocRec_local().

void LBDatabase::ObjTime ( LDObjHandle  h,
double  walltime,
double  cputime 
) [inline]

Definition at line 207 of file LBDatabase.h.

References LDObjTime().

int LBDatabase::RunningObject ( LDObjHandle _o  )  const [inline]

Definition at line 211 of file LBDatabase.h.

References LDHandle::handle, myLDHandle, LBDB::ObjIsRunning(), and LBDB::RunningObj().

Referenced by _deliverForBocMsg(), CProxyElement_CkCacheManager::cacheSync(), CkLocRec_local::deliver(), CProxyElement_CkCacheManager::recvData(), CProxyElement_CkCacheManager::requestDataNoFetch(), and SystemLoad::SystemLoad().

const LDObjHandle* LBDatabase::RunningObject (  )  const [inline]

Definition at line 222 of file LBDatabase.h.

References LDHandle::handle, myLDHandle, LBDB::ObjIsRunning(), and LBDB::RunningObj().

const LDObjHandle& LBDatabase::GetObjHandle ( int  idx  )  [inline]

Definition at line 231 of file LBDatabase.h.

References LDGetObjHandle(), and myLDHandle.

void LBDatabase::ObjectStart ( const LDObjHandle _h  )  [inline]

Definition at line 232 of file LBDatabase.h.

References LDObjectStart().

Referenced by _deliverForBocMsg(), CProxyElement_CkCacheManager::cacheSync(), CkLocRec_local::deliver(), CProxyElement_CkCacheManager::recvData(), CProxyElement_CkCacheManager::requestDataNoFetch(), CkLocRec_local::startTiming(), CkMigratable::timingAfterCall(), and SystemLoad::~SystemLoad().

void LBDatabase::ObjectStop ( const LDObjHandle _h  )  [inline]

Definition at line 233 of file LBDatabase.h.

References LDObjectStop().

Referenced by _deliverForBocMsg(), CProxyElement_CkCacheManager::cacheSync(), CkLocRec_local::deliver(), CProxyElement_CkCacheManager::recvData(), CProxyElement_CkCacheManager::requestDataNoFetch(), CkLocRec_local::stopTiming(), SystemLoad::SystemLoad(), and CkMigratable::timingBeforeCall().

void LBDatabase::Send ( const LDOMHandle _om,
const LDObjid  _id,
unsigned int  _b,
int  _p 
) [inline]

Definition at line 234 of file LBDatabase.h.

References LDSend().

Referenced by CkLocMgr::deliver().

void LBDatabase::MulticastSend ( const LDOMHandle _om,
LDObjid _ids,
int  _n,
unsigned int  _b,
int  _nMsgs = 1 
) [inline]

Definition at line 237 of file LBDatabase.h.

References LDMulticastSend().

Referenced by CkMulticastMgr::ArraySectionSend().

void LBDatabase::NonMigratable ( LDObjHandle  h  )  [inline]

Definition at line 242 of file LBDatabase.h.

References LDNonMigratable().

Referenced by CkLocRec_local::setMigratable().

void LBDatabase::Migratable ( LDObjHandle  h  )  [inline]

Definition at line 243 of file LBDatabase.h.

References LDMigratable().

Referenced by CkLocRec_local::setMigratable().

void LBDatabase::UseAsyncMigrate ( LDObjHandle  h,
CmiBool  flag 
) [inline]

Definition at line 244 of file LBDatabase.h.

References LDAsyncMigrate().

Referenced by CkLocRec_local::AsyncMigrate().

void LBDatabase::DumpDatabase ( void   )  [inline]

Definition at line 245 of file LBDatabase.h.

References LDDumpDatabase(), and myLDHandle.

void LBDatabase::NotifyMigrated ( LDMigratedFn  fn,
void *  data 
) [inline]

Definition at line 250 of file LBDatabase.h.

References LDNotifyMigrated(), and myLDHandle.

void LBDatabase::AddStartLBFn ( LDStartLBFn  fn,
void *  data 
) [inline]

Definition at line 255 of file LBDatabase.h.

References LDAddStartLBFn(), and myLDHandle.

void LBDatabase::RemoveStartLBFn ( LDStartLBFn  fn  )  [inline]

Definition at line 260 of file LBDatabase.h.

References LDRemoveStartLBFn(), and myLDHandle.

Referenced by NullLB::~NullLB().

void LBDatabase::StartLB (  )  [inline]

Definition at line 266 of file LBDatabase.h.

References LDStartLB(), and myLDHandle.

void LBDatabase::TurnManualLBOn (  )  [inline]

Definition at line 267 of file LBDatabase.h.

References LDTurnManualLBOn(), and myLDHandle.

Referenced by init(), and TurnManualLBOn().

void LBDatabase::TurnManualLBOff (  )  [inline]

Definition at line 268 of file LBDatabase.h.

References LDTurnManualLBOff(), and myLDHandle.

Referenced by TurnManualLBOff().

void LBDatabase::PredictorOn ( LBPredictorFunction model  )  [inline]

Definition at line 270 of file LBDatabase.h.

References LDTurnPredictorOn(), and myLDHandle.

Referenced by LBTurnPredictorOn().

void LBDatabase::PredictorOn ( LBPredictorFunction model,
int  wind 
) [inline]

Definition at line 271 of file LBDatabase.h.

References LDTurnPredictorOnWin(), and myLDHandle.

void LBDatabase::PredictorOff (  )  [inline]

Definition at line 272 of file LBDatabase.h.

References LDTurnPredictorOff(), and myLDHandle.

Referenced by LBTurnPredictorOff().

void LBDatabase::ChangePredictor ( LBPredictorFunction model  )  [inline]

Definition at line 273 of file LBDatabase.h.

References LDTurnPredictorOn(), and myLDHandle.

Referenced by LBChangePredictor().

void LBDatabase::CollectStatsOn ( void   )  [inline]

Definition at line 275 of file LBDatabase.h.

References LDCollectStatsOn(), and myLDHandle.

Referenced by HbmLB::HbmLB(), HybridBaseLB::HybridBaseLB(), CentralLB::initLB(), LBTurnInstrumentOn(), NborBaseLB::NborBaseLB(), and WSLB::WSLB().

void LBDatabase::CollectStatsOff ( void   )  [inline]

Definition at line 276 of file LBDatabase.h.

References LDCollectStatsOff(), and myLDHandle.

Referenced by LBTurnInstrumentOff().

int LBDatabase::CollectingStats ( void   )  [inline]

Definition at line 277 of file LBDatabase.h.

References LDCollectingStats(), and myLDHandle.

void LBDatabase::QueryEstLoad ( void   )  [inline]

Definition at line 278 of file LBDatabase.h.

References LDQueryEstLoad(), and myLDHandle.

int LBDatabase::GetObjDataSz ( void   )  [inline]

Definition at line 280 of file LBDatabase.h.

References LDGetObjDataSz(), and myLDHandle.

Referenced by WSLB::AssembleStats(), NborBaseLB::AssembleStats(), HybridBaseLB::AssembleStats(), CentralLB::BuildStatsMsg(), HbmLB::ProcessAtSync(), and CentralLB::ProcessAtSync().

void LBDatabase::GetObjData ( LDObjData data  )  [inline]

Definition at line 281 of file LBDatabase.h.

References data, LDGetObjData(), and myLDHandle.

Referenced by WSLB::AssembleStats(), NborBaseLB::AssembleStats(), HybridBaseLB::AssembleStats(), CentralLB::BuildStatsMsg(), and HbmLB::ProcessAtSync().

int LBDatabase::GetCommDataSz ( void   )  [inline]

Definition at line 282 of file LBDatabase.h.

References LDGetCommDataSz(), and myLDHandle.

Referenced by WSLB::AssembleStats(), NborBaseLB::AssembleStats(), HybridBaseLB::AssembleStats(), CentralLB::BuildStatsMsg(), HbmLB::ProcessAtSync(), and CentralLB::ProcessAtSync().

void LBDatabase::GetCommData ( LDCommData data  )  [inline]

Definition at line 283 of file LBDatabase.h.

References data, LDGetCommData(), and myLDHandle.

Referenced by WSLB::AssembleStats(), NborBaseLB::AssembleStats(), HybridBaseLB::AssembleStats(), CentralLB::BuildStatsMsg(), and HbmLB::ProcessAtSync().

void LBDatabase::BackgroundLoad ( double *  walltime,
double *  cputime 
) [inline]

Definition at line 285 of file LBDatabase.h.

References LDBackgroundLoad(), and myLDHandle.

Referenced by WSLB::AssembleStats(), NborBaseLB::AssembleStats(), and HbmLB::ProcessAtSync().

void LBDatabase::IdleTime ( double *  walltime  )  [inline]

Definition at line 289 of file LBDatabase.h.

References LDIdleTime(), and myLDHandle.

Referenced by WSLB::AssembleStats(), NborBaseLB::AssembleStats(), and HbmLB::ProcessAtSync().

void LBDatabase::TotalTime ( double *  walltime,
double *  cputime 
) [inline]

Definition at line 293 of file LBDatabase.h.

References LDTotalTime(), and myLDHandle.

Referenced by WSLB::AssembleStats(), NborBaseLB::AssembleStats(), and HbmLB::ProcessAtSync().

void LBDatabase::GetTime ( double *  total_walltime,
double *  total_cputime,
double *  idletime,
double *  bg_walltime,
double *  bg_cputime 
) [inline]

Definition at line 297 of file LBDatabase.h.

References LDGetTime(), and myLDHandle.

Referenced by HybridBaseLB::AssembleStats(), and CentralLB::BuildStatsMsg().

void LBDatabase::ClearLoads ( void   )  [inline]

Definition at line 302 of file LBDatabase.h.

References LDClearLoads(), and myLDHandle.

Referenced by BaseLB::flushStates(), LBClearLoads(), NborBaseLB::MigrationDone(), CentralLB::MigrationDone(), WSLB::ReceiveStats(), HybridBaseLB::ResumeClients(), and HbmLB::ResumeClients().

int LBDatabase::Migrate ( LDObjHandle  h,
int  dest 
) [inline]

Definition at line 303 of file LBDatabase.h.

References dest, and LDMigrate().

Referenced by HybridBaseLB::PropagateInfo(), HybridBaseLB::ReceiveMigration(), CentralLB::ReceiveMigration(), WSLB::ReceiveStats(), and NborBaseLB::ReceiveStats().

void LBDatabase::Migrated ( LDObjHandle  h,
int  waitBarrier = 1 
) [inline]

Definition at line 305 of file LBDatabase.h.

References LDMigrated().

Referenced by CkLocRec_local::CkLocRec_local().

LDBarrierClient LBDatabase::AddLocalBarrierClient ( LDResumeFn  fn,
void *  data 
) [inline]

Definition at line 307 of file LBDatabase.h.

References LDAddLocalBarrierClient(), and myLDHandle.

Referenced by CkMigratable::ckFinishConstruction().

void LBDatabase::RemoveLocalBarrierClient ( LDBarrierClient  h  )  [inline]

Definition at line 311 of file LBDatabase.h.

References LDRemoveLocalBarrierClient(), and myLDHandle.

Referenced by CkMigratable::~CkMigratable().

LDBarrierReceiver LBDatabase::AddLocalBarrierReceiver ( LDBarrierFn  fn,
void *  data 
) [inline]

Definition at line 315 of file LBDatabase.h.

References LDAddLocalBarrierReceiver(), and myLDHandle.

Referenced by CkMigratable::ckFinishConstruction().

void LBDatabase::RemoveLocalBarrierReceiver ( LDBarrierReceiver  h  )  [inline]

Definition at line 319 of file LBDatabase.h.

References LDRemoveLocalBarrierReceiver(), and myLDHandle.

Referenced by BaseLB::unregister(), CkMigratable::~CkMigratable(), and NullLB::~NullLB().

void LBDatabase::AtLocalBarrier ( LDBarrierClient  h  )  [inline]

Definition at line 323 of file LBDatabase.h.

References LDAtLocalBarrier(), and myLDHandle.

Referenced by CkMigratable::AtSync().

void LBDatabase::LocalBarrierOn ( void   )  [inline]

Definition at line 324 of file LBDatabase.h.

References LDLocalBarrierOn(), and myLDHandle.

void LBDatabase::LocalBarrierOff ( void   )  [inline]

Definition at line 325 of file LBDatabase.h.

References LDLocalBarrierOn(), and myLDHandle.

void LBDatabase::ResumeClients (  )  [inline]

Definition at line 326 of file LBDatabase.h.

References LDResumeClients(), and myLDHandle.

Referenced by NullLB::migrationsDone(), WSLB::ResumeClients(), NborBaseLB::ResumeClients(), HybridBaseLB::ResumeClients(), HbmLB::ResumeClients(), and CentralLB::ResumeClients().

int LBDatabase::ProcessorSpeed (  )  [inline]

Definition at line 328 of file LBDatabase.h.

References LDProcessorSpeed().

Referenced by CentralLB::initLB(), NborBaseLB::NborBaseLB(), and WSLB::WSLB().

void LBDatabase::SetLBPeriod ( double  s  )  [inline]

Definition at line 329 of file LBDatabase.h.

References LDSetLBPeriod(), and myLDHandle.

Referenced by LBSetPeriod().

double LBDatabase::GetLBPeriod (  )  [inline]

Definition at line 330 of file LBDatabase.h.

References LDGetLBPeriod(), and myLDHandle.

char* LBDatabase::availVector (  )  [inline]

Definition at line 344 of file LBDatabase.h.

References avail_vector.

Referenced by CentralLB::LoadBalance().

int& LBDatabase::new_lbbalancer (  )  [inline]

Definition at line 347 of file LBDatabase.h.

References new_ld_balancer.

Referenced by CentralLB::BuildStatsMsg(), and CentralLB::LoadBalance().

double LBDatabase::myExpectedLoad (  )  [inline]

Definition at line 355 of file LBDatabase.h.

References Converse::CkMyPe(), LBDatabase::LastLBInfo::expectedLoad, and lastLBInfo.

double* LBDatabase::expectedLoad (  )  [inline]

Definition at line 356 of file LBDatabase.h.

References LBDatabase::LastLBInfo::expectedLoad, and lastLBInfo.

int LBDatabase::useMem (  )  [inline]

Definition at line 357 of file LBDatabase.h.

References LDMemusage(), and myLDHandle.

Referenced by CentralLB::LoadBalance().

int LBDatabase::step (  )  [inline]

Definition at line 364 of file LBDatabase.h.

References mystep.

Referenced by BaseLB::step().

void LBDatabase::incStep (  )  [inline]

Definition at line 365 of file LBDatabase.h.

References mystep.

Referenced by NborBaseLB::MigrationDone(), HybridBaseLB::MigrationDone(), HbmLB::MigrationDone(), CentralLB::MigrationDone(), and HbmLB::ResumeClients().


Field Documentation

int LBDatabase::mystep [private]

Definition at line 333 of file LBDatabase.h.

Referenced by incStep(), init(), and step().

LDHandle LBDatabase::myLDHandle [private]

Definition at line 334 of file LBDatabase.h.

Referenced by AddLocalBarrierClient(), AddLocalBarrierReceiver(), AddStartLBFn(), AtLocalBarrier(), BackgroundLoad(), ChangePredictor(), ClearLoads(), CollectingStats(), CollectStatsOff(), CollectStatsOn(), DumpDatabase(), GetCommData(), GetCommDataSz(), getLBDB(), GetLBPeriod(), GetObjData(), GetObjDataSz(), GetObjHandle(), GetTime(), IdleTime(), init(), LocalBarrierOff(), LocalBarrierOn(), NotifyMigrated(), PredictorOff(), PredictorOn(), QueryEstLoad(), RegisterOM(), RemoveLocalBarrierClient(), RemoveLocalBarrierReceiver(), RemoveStartLBFn(), ResumeClients(), RunningObject(), SetLBPeriod(), StartLB(), TotalTime(), TurnManualLBOff(), TurnManualLBOn(), and useMem().

int LBDatabase::new_ld_balancer [private]

Definition at line 336 of file LBDatabase.h.

Referenced by init(), new_lbbalancer(), and set_avail_vector().

CkVec<BaseLB *> LBDatabase::loadbalancers [private]

Definition at line 337 of file LBDatabase.h.

Referenced by addLoadbalancer(), getLoadbalancerTicket(), and nextLoadbalancer().

int LBDatabase::nloadbalancers [private]

Definition at line 338 of file LBDatabase.h.

Referenced by addLoadbalancer(), getLoadbalancerTicket(), init(), and nextLoadbalancer().

LastLBInfo LBDatabase::lastLBInfo

Definition at line 354 of file LBDatabase.h.

Referenced by expectedLoad(), myExpectedLoad(), and CentralLB::ReceiveMigration().


The documentation for this class was generated from the following files:
Generated on Sun Jun 29 13:33:50 2008 for Charm++ by  doxygen 1.5.1