PPL Logo

LBDB Class Reference
[Charm++ Load Balancing Framework]

#include <LBDBManager.h>

Collaboration diagram for LBDB:

Collaboration graph
[legend]

Public Member Functions

 LBDB ()
 ~LBDB ()
void SetPeriod (double secs)
double GetPeriod ()
void insert (LBOM *om)
LDOMHandle AddOM (LDOMid _userID, void *_userData, LDCallbacks _callbacks)
void RemoveOM (LDOMHandle om)
LDObjHandle AddObj (LDOMHandle _h, CmiUInt8 _id, void *_userData, bool _migratable)
void UnregisterObj (LDObjHandle _h)
void RegisteringObjects (LDOMHandle _h)
void DoneRegisteringObjects (LDOMHandle _h)
void LocalBarrierOn ()
void LocalBarrierOff ()
LBOMLbOM (LDOMHandle h)
LBObjLbObj (const LDObjHandle &h) const
LBObjLbObjIdx (int h) const
void DumpDatabase (void)
void TurnStatsOn (void)
void TurnStatsOff (void)
bool StatsOn (void) const
void SetupPredictor (LDPredictModelFn on, LDPredictWindowFn onWin, LDPredictFn off, LDPredictModelFn change, void *data)
void TurnPredictorOn (void *model)
void TurnPredictorOn (void *model, int wind)
void TurnPredictorOff (void)
void ChangePredictor (void *model)
void Send (const LDOMHandle &destOM, const CmiUInt8 &destid, unsigned int bytes, int destObjProc)
void MulticastSend (const LDOMHandle &destOM, CmiUInt8 *destids, int ndests, unsigned int bytes, int nMsgs)
int ObjDataCount ()
void GetObjData (LDObjData *data)
int CommDataCount ()
void GetCommData (LDCommData *data)
void GetCommInfo (int &bytes, int &msgs, int &withinbytes, int &acrossbytes, int &num_nghbors, int &hops, int &hopbytes)
void MetaLBResumeWaitingChares (int lb_ideal_period)
void MetaLBCallLBOnChares ()
int Migrate (LDObjHandle h, int dest)
void Migrated (LDObjHandle h, int waitBarrier=1)
int NotifyMigrated (LDMigratedFn fn, void *data)
void TurnOnNotifyMigrated (int handle)
void TurnOffNotifyMigrated (int handle)
void RemoveNotifyMigrated (int handle)
void TurnManualLBOn ()
void TurnManualLBOff ()
int AddStartLBFn (LDStartLBFn fn, void *data)
void TurnOnStartLBFn (int handle)
void TurnOffStartLBFn (int handle)
void RemoveStartLBFn (LDStartLBFn fn)
void StartLB ()
int AddMigrationDoneFn (LDMigrationDoneFn fn, void *data)
void RemoveMigrationDoneFn (LDMigrationDoneFn fn)
void MigrationDone ()
void IdleTime (LBRealType *walltime)
void TotalTime (LBRealType *walltime, LBRealType *cputime)
void BackgroundLoad (LBRealType *walltime, LBRealType *cputime)
void GetTime (LBRealType *total_walltime, LBRealType *total_cputime, LBRealType *idletime, LBRealType *bg_walltime, LBRealType *bg_cputime)
void ClearLoads (void)
void SetRunningObj (const LDObjHandle &_h)
 runningObj records the obj handler index so that load balancer knows if an event(e.g.
const LDObjHandleRunningObj () const
void NoRunningObj ()
bool ObjIsRunning () const
LDBarrierClient AddLocalBarrierClient (LDResumeFn fn, void *data)
void RemoveLocalBarrierClient (LDBarrierClient h)
LDBarrierReceiver AddLocalBarrierReceiver (LDBarrierFn fn, void *data)
void RemoveLocalBarrierReceiver (LDBarrierReceiver h)
void TurnOnBarrierReceiver (LDBarrierReceiver h)
void TurnOffBarrierReceiver (LDBarrierReceiver h)
void AtLocalBarrier (LDBarrierClient h)
void DecreaseLocalBarrier (LDBarrierClient h, int c)
void ResumeClients ()
void MeasuredObjTime (double wtime, double ctime)
int useMem ()
int validObjHandle (LDObjHandle h)
const ObjListgetObjs ()

Private Types

typedef CkVec< LBOM * > OMList
typedef std::vector< LBObjEntryObjList
typedef CkVec< MigrateCB * > MigrateCBList
typedef CkVec< StartLBCB * > StartLBCBList
typedef CkVec< MigrationDoneCB * > MigrationDoneCBList

Private Attributes

LBCommTablecommTable
OMList oms
int omCount
int oms_registering
LDObjIndex objsEmptyHead
ObjList objs
bool statsAreOn
MigrateCBList migrateCBList
MigrationDoneCBList migrationDoneCBList
PredictCBpredictCBFn
bool obj_running
int runningObj
batsyncer batsync
LocalBarrier localBarrier
bool useBarrier
LBMachineUtil machineUtil
double obj_walltime
double obj_cputime
StartLBCBList startLBFnList
int startLBFn_count

Data Structures

class  batsyncer
struct  LBObjEntry
struct  MigrateCB
struct  MigrationDoneCB
struct  PredictCB
struct  StartLBCB

Detailed Description

Definition at line 62 of file LBDBManager.h.


Member Typedef Documentation

typedef CkVec<LBOM*> LBDB::OMList [private]

Definition at line 267 of file LBDBManager.h.

typedef std::vector<LBObjEntry> LBDB::ObjList [private]

Definition at line 268 of file LBDBManager.h.

typedef CkVec<MigrateCB*> LBDB::MigrateCBList [private]

Definition at line 269 of file LBDBManager.h.

typedef CkVec<StartLBCB*> LBDB::StartLBCBList [private]

Definition at line 270 of file LBDBManager.h.

Definition at line 271 of file LBDBManager.h.


Constructor & Destructor Documentation

LBDB::~LBDB (  )  [inline]

Definition at line 65 of file LBDBManager.h.


Member Function Documentation

void LBDB::SetPeriod ( double  secs  )  [inline]

Definition at line 67 of file LBDBManager.h.

References batsync, and LBDB::batsyncer::setPeriod().

Referenced by LDSetLBPeriod().

Here is the call graph for this function:

Here is the caller graph for this function:

double LBDB::GetPeriod (  )  [inline]

Definition at line 68 of file LBDBManager.h.

References batsync, and LBDB::batsyncer::getPeriod().

Referenced by LDGetLBPeriod().

Here is the call graph for this function:

Here is the caller graph for this function:

void LBDB::insert ( LBOM om  ) 

void LBDB::LocalBarrierOn ( void   )  [inline]

Definition at line 82 of file LBDBManager.h.

References localBarrier, and LocalBarrier::TurnOn().

Referenced by LDLocalBarrierOn(), and TurnManualLBOff().

Here is the call graph for this function:

Here is the caller graph for this function:

void LBDB::LocalBarrierOff ( void   )  [inline]

Definition at line 84 of file LBDBManager.h.

References localBarrier, and LocalBarrier::TurnOff().

Referenced by LDLocalBarrierOff(), and TurnManualLBOn().

Here is the call graph for this function:

Here is the caller graph for this function:

LBOM* LBDB::LbOM ( LDOMHandle  h  )  [inline]

Definition at line 87 of file LBDBManager.h.

References LDOMHandle::handle, and oms.

Referenced by LDOMUserData().

Here is the caller graph for this function:

LBObj* LBDB::LbObj ( const LDObjHandle h  )  const [inline]

LBObj* LBDB::LbObjIdx ( int  h  )  const [inline]

Definition at line 91 of file LBDBManager.h.

References objs.

Referenced by LDGetObjHandle().

Here is the caller graph for this function:

void LBDB::TurnStatsOn ( void   )  [inline]

Definition at line 95 of file LBDBManager.h.

References machineUtil, statsAreOn, and LBMachineUtil::StatsOn().

Referenced by LDCollectStatsOn().

Here is the call graph for this function:

Here is the caller graph for this function:

void LBDB::TurnStatsOff ( void   )  [inline]

Definition at line 97 of file LBDBManager.h.

References machineUtil, statsAreOn, and LBMachineUtil::StatsOff().

Referenced by LDCollectStatsOff().

Here is the call graph for this function:

Here is the caller graph for this function:

bool LBDB::StatsOn ( void   )  const [inline]

Definition at line 99 of file LBDBManager.h.

References statsAreOn.

Referenced by LDCollectingStats(), LDCollectStatsOn(), LDMulticastSend(), LDObjectStart(), LDObjectStop(), and LDSend().

Here is the caller graph for this function:

void LBDB::TurnPredictorOn ( void *  model  )  [inline]

Definition at line 103 of file LBDBManager.h.

References CmiPrintf(), LBDB::PredictCB::data, LBDB::PredictCB::on, and predictCBFn.

Referenced by LDTurnPredictorOn(), and LDTurnPredictorOnWin().

Here is the call graph for this function:

Here is the caller graph for this function:

void LBDB::TurnPredictorOn ( void *  model,
int  wind 
) [inline]

Definition at line 107 of file LBDBManager.h.

References CmiPrintf(), LBDB::PredictCB::data, LBDB::PredictCB::onWin, and predictCBFn.

Here is the call graph for this function:

void LBDB::TurnPredictorOff ( void   )  [inline]

Definition at line 111 of file LBDBManager.h.

References CmiPrintf(), LBDB::PredictCB::data, LBDB::PredictCB::off, and predictCBFn.

Referenced by LDTurnPredictorOff().

Here is the call graph for this function:

Here is the caller graph for this function:

void LBDB::ChangePredictor ( void *  model  )  [inline]

Definition at line 116 of file LBDBManager.h.

References LBDB::PredictCB::change, CmiPrintf(), LBDB::PredictCB::data, and predictCBFn.

Referenced by LDChangePredictor().

Here is the call graph for this function:

Here is the caller graph for this function:

int LBDB::CommDataCount (  )  [inline]

Definition at line 125 of file LBDBManager.h.

References LBCommTable::CommCount(), and commTable.

Referenced by LDGetCommDataSz().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 130 of file LBDBManager.h.

References commTable, and LBCommTable::GetCommData().

Referenced by LDGetCommData().

Here is the call graph for this function:

Here is the caller graph for this function:

void LBDB::GetCommInfo ( int bytes,
int msgs,
int withinbytes,
int acrossbytes,
int num_nghbors,
int hops,
int hopbytes 
) [inline]

Definition at line 133 of file LBDBManager.h.

References commTable, and LBCommTable::GetCommInfo().

Referenced by MetaBalancer::ContributeStats(), and LDGetCommInfo().

Here is the call graph for this function:

Here is the caller graph for this function:

void LBDB::TurnOnNotifyMigrated ( int  handle  )  [inline]

Definition at line 143 of file LBDBManager.h.

References migrateCBList.

void LBDB::TurnOffNotifyMigrated ( int  handle  )  [inline]

Definition at line 145 of file LBDBManager.h.

References migrateCBList.

void LBDB::TurnManualLBOn (  )  [inline]

Definition at line 149 of file LBDBManager.h.

References LocalBarrierOff(), and useBarrier.

Referenced by LDTurnManualLBOn().

Here is the call graph for this function:

Here is the caller graph for this function:

void LBDB::TurnManualLBOff (  )  [inline]

Definition at line 151 of file LBDBManager.h.

References LocalBarrierOn(), oms_registering, and useBarrier.

Referenced by LDTurnManualLBOff().

Here is the call graph for this function:

Here is the caller graph for this function:

void LBDB::TurnOnStartLBFn ( int  handle  )  [inline]

Definition at line 155 of file LBDBManager.h.

References startLBFnList.

void LBDB::TurnOffStartLBFn ( int  handle  )  [inline]

Definition at line 157 of file LBDBManager.h.

References startLBFnList.

void LBDB::IdleTime ( LBRealType walltime  )  [inline]

Definition at line 166 of file LBDBManager.h.

References LBMachineUtil::IdleTime(), and machineUtil.

Referenced by BackgroundLoad(), GetTime(), and LDIdleTime().

Here is the call graph for this function:

Here is the caller graph for this function:

void LBDB::TotalTime ( LBRealType walltime,
LBRealType cputime 
) [inline]

Definition at line 168 of file LBDBManager.h.

References machineUtil, and LBMachineUtil::TotalTime().

Referenced by BackgroundLoad(), GetTime(), and LDTotalTime().

Here is the call graph for this function:

Here is the caller graph for this function:

void LBDB::SetRunningObj ( const LDObjHandle _h  )  [inline]

runningObj records the obj handler index so that load balancer knows if an event(e.g.

Send) is in an entry function or not. An index is enough here because LDObjHandle can be retrieved from objs array. Copying LDObjHandle is expensive.

Definition at line 181 of file LBDBManager.h.

References LDObjHandle::handle, obj_running, and runningObj.

Referenced by LDObjectStart().

Here is the caller graph for this function:

const LDObjHandle& LBDB::RunningObj (  )  const [inline]

Definition at line 183 of file LBDBManager.h.

References objs, and runningObj.

Referenced by LDCollectStatsOn(), LDObjectStart(), LDRunningObject(), MulticastSend(), LBDatabase::RunningObject(), and Send().

Here is the caller graph for this function:

void LBDB::NoRunningObj (  )  [inline]

Definition at line 185 of file LBDBManager.h.

References obj_running.

Referenced by LDObjectStop().

Here is the caller graph for this function:

bool LBDB::ObjIsRunning (  )  const [inline]

Definition at line 187 of file LBDBManager.h.

References obj_running.

Referenced by LDCollectStatsOn(), LDObjectStart(), LDRunningObject(), and LBDatabase::RunningObject().

Here is the caller graph for this function:

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

Definition at line 190 of file LBDBManager.h.

References LocalBarrier::AddClient(), and localBarrier.

Referenced by LBDB::batsyncer::init(), and LDAddLocalBarrierClient().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 192 of file LBDBManager.h.

References localBarrier, and LocalBarrier::RemoveClient().

Referenced by LDRemoveLocalBarrierClient().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 194 of file LBDBManager.h.

References LocalBarrier::AddReceiver(), and localBarrier.

Referenced by LDAddLocalBarrierReceiver().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 196 of file LBDBManager.h.

References localBarrier, and LocalBarrier::RemoveReceiver().

Referenced by LDRemoveLocalBarrierReceiver().

Here is the call graph for this function:

Here is the caller graph for this function:

void LBDB::TurnOnBarrierReceiver ( LDBarrierReceiver  h  )  [inline]

Definition at line 198 of file LBDBManager.h.

References localBarrier, and LocalBarrier::TurnOnReceiver().

Here is the call graph for this function:

void LBDB::TurnOffBarrierReceiver ( LDBarrierReceiver  h  )  [inline]

Definition at line 200 of file LBDBManager.h.

References localBarrier, and LocalBarrier::TurnOffReceiver().

Here is the call graph for this function:

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

Definition at line 202 of file LBDBManager.h.

References LocalBarrier::AtBarrier(), and localBarrier.

Referenced by LBDB::batsyncer::gotoSync(), and LDAtLocalBarrier().

Here is the call graph for this function:

Here is the caller graph for this function:

void LBDB::DecreaseLocalBarrier ( LDBarrierClient  h,
int  c 
) [inline]

Definition at line 204 of file LBDBManager.h.

References LocalBarrier::DecreaseBarrier(), and localBarrier.

Referenced by LDDecreaseLocalBarrier().

Here is the call graph for this function:

Here is the caller graph for this function:

void LBDB::ResumeClients ( void   )  [inline]

Definition at line 206 of file LBDBManager.h.

References localBarrier, and LocalBarrier::ResumeClients().

Referenced by LDResumeClients().

Here is the call graph for this function:

Here is the caller graph for this function:

void LBDB::MeasuredObjTime ( double  wtime,
double  ctime 
) [inline]

Definition at line 208 of file LBDBManager.h.

References obj_cputime, obj_walltime, and statsAreOn.

Referenced by LDObjectStop(), and LDObjTime().

Here is the caller graph for this function:

int LBDB::validObjHandle ( LDObjHandle  h  )  [inline]

Definition at line 307 of file LBDBManager.h.

References LDObjHandle::handle, and objs.

Referenced by CentralLB::ProcessReceiveMigration().

Here is the caller graph for this function:

const ObjList& LBDB::getObjs (  )  [inline]

Definition at line 318 of file LBDBManager.h.

References objs.

Referenced by controlPointManager::gotoNextPhase().

Here is the caller graph for this function:


Field Documentation

OMList LBDB::oms [private]

int LBDB::omCount [private]

Definition at line 275 of file LBDBManager.h.

Referenced by AddOM(), DumpDatabase(), LBDB(), and RemoveOM().

Definition at line 276 of file LBDBManager.h.

Referenced by DoneRegisteringObjects(), LBDB(), RegisteringObjects(), and TurnManualLBOff().

Definition at line 278 of file LBDBManager.h.

Referenced by AddObj(), LBDB(), and UnregisterObj().

ObjList LBDB::objs [private]

Definition at line 281 of file LBDBManager.h.

Referenced by LBDB(), MeasuredObjTime(), StatsOn(), TurnStatsOff(), and TurnStatsOn().

Definition at line 284 of file LBDBManager.h.

Referenced by AddMigrationDoneFn(), MigrationDone(), and RemoveMigrationDoneFn().

Definition at line 288 of file LBDBManager.h.

Referenced by LBDB(), MulticastSend(), NoRunningObj(), ObjIsRunning(), Send(), and SetRunningObj().

int LBDB::runningObj [private]

Definition at line 289 of file LBDBManager.h.

Referenced by RunningObj(), and SetRunningObj().

Definition at line 291 of file LBDBManager.h.

Referenced by GetPeriod(), LBDB(), and SetPeriod().

Definition at line 294 of file LBDBManager.h.

Referenced by DoneRegisteringObjects(), TurnManualLBOff(), and TurnManualLBOn().

Definition at line 296 of file LBDBManager.h.

Referenced by ClearLoads(), IdleTime(), TotalTime(), TurnStatsOff(), and TurnStatsOn().

double LBDB::obj_walltime [private]

Definition at line 297 of file LBDBManager.h.

Referenced by BackgroundLoad(), ClearLoads(), GetTime(), LBDB(), and MeasuredObjTime().

double LBDB::obj_cputime [private]

Definition at line 299 of file LBDBManager.h.

Referenced by BackgroundLoad(), ClearLoads(), GetTime(), LBDB(), and MeasuredObjTime().

Definition at line 303 of file LBDBManager.h.

Referenced by AddStartLBFn(), LBDB(), RemoveStartLBFn(), and StartLB().


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

Generated on Mon Sep 21 08:26:28 2020 for Charm++ by  doxygen 1.5.5