CentralLB Class Reference
[Charm++ Load Balancing Framework]

#include <CentralLB.h>

Inheritance diagram for CentralLB:

Inheritance graph
[legend]
Collaboration diagram for CentralLB:

Collaboration graph
[legend]

Public Member Functions

 CentralLB (const CkLBOptions &opt)
 CentralLB (CkMigrateMessage *m)
virtual ~CentralLB ()
void pup (PUP::er &p)
void turnOn ()
void turnOff ()
void AtSync (void)
void ProcessAtSync (void)
void SendStats ()
void ReceiveCounts (CkReductionMsg *)
void ReceiveStats (CkMarshalledCLBStatsMessage &msg)
void ReceiveStatsViaTree (CkMarshalledCLBStatsMessage &msg)
 added by Abhinav for receiving msgs via spanning tree
void depositData (CLBStatsMsg *m)
void LoadBalance (void)
void ResumeClients (int)
void ResumeClients (CkReductionMsg *)
void ReceiveMigration (LBMigrateMsg *)
void MissMigrate (int waitForBarrier)
void StartLB ()
void Migrated (LDObjHandle h, int waitBarrier=1)
void MigrationDone (int balancing)
void CheckMigrationComplete ()
void FuturePredictor (LDStats *stats)
void predictorOn (LBPredictorFunction *pred)
void predictorOn (LBPredictorFunction *pred, int window_size)
void predictorOff ()
void changePredictor (LBPredictorFunction *new_predictor)
LBMigrateMsgcallStrategy (LDStats *stats, int count)
void readStatsMsgs (const char *filename)
void writeStatsMsgs (const char *filename)
void preprocess (LDStats *stats, int count)
virtual LBMigrateMsgStrategy (LDStats *stats, int count)
virtual void work (LDStats *stats, int count)
virtual LBMigrateMsgcreateMigrateMsg (LDStats *stats, int count)
int useMem ()

Static Public Member Functions

static void staticAtSync (void *)
static void staticPredictorOn (void *data, void *model)
static void staticPredictorOnWin (void *data, void *model, int wind)
static void staticPredictorOff (void *data)
static void staticChangePredictor (void *data, void *model)
static void staticStartLB (void *data)
static void staticMigrated (void *me, LDObjHandle h, int waitBarrier=1)

Data Fields

CkMarshalledCLBStatsMessage bufMsg
SpanningTree st
int cur_ld_balancer

Protected Member Functions

virtual CmiBool QueryBalanceNow (int)
virtual CmiBool QueryDumpData ()
virtual void LoadbalanceDone (int balancing)
void simulationRead ()
void simulationWrite ()
void findSimResults (LDStats *stats, int count, LBMigrateMsg *msg, LBSimulation *simResults)
void removeNonMigratable (LDStats *statsDataList, int count)

Private Member Functions

void initLB (const CkLBOptions &)
void BuildStatsMsg ()
void buildStats ()

Private Attributes

CLBStatsMsgstatsMsg
int count_msgs
CProxy_CentralLB thisProxy
int myspeed
int stats_msg_count
CLBStatsMsg ** statsMsgsList
LDStats * statsData
int migrates_completed
int migrates_expected
int future_migrates_completed
int future_migrates_expected
int lbdone
double start_lb_time
FutureModelpredicted_model

Data Structures

struct  FutureModel

Detailed Description

Definition at line 69 of file CentralLB.h.


Constructor & Destructor Documentation

CentralLB::CentralLB ( const CkLBOptions opt  )  [inline]

Definition at line 78 of file CentralLB.h.

References initLB().

CentralLB::CentralLB ( CkMigrateMessage m  )  [inline]

Definition at line 79 of file CentralLB.h.


Member Function Documentation

void CentralLB::StartLB (  )  [inline]

Definition at line 112 of file CentralLB.h.

References CProxy_CentralLB::ProcessAtSync(), and thisProxy.

Referenced by staticStartLB().

void CentralLB::FuturePredictor ( LDStats *  stats  ) 

Referenced by preprocess().

void CentralLB::predictorOn ( LBPredictorFunction pred  )  [inline]

Definition at line 173 of file CentralLB.h.

References _lb_predict_window.

Referenced by staticPredictorOn(), and staticPredictorOnWin().

void CentralLB::predictorOn ( LBPredictorFunction pred,
int  window_size 
) [inline]

Definition at line 176 of file CentralLB.h.

References _lb_predict, _lb_predict_window, CmiTrue, and predicted_model.

void CentralLB::predictorOff (  )  [inline]

Definition at line 188 of file CentralLB.h.

References _lb_predict, CmiFalse, and predicted_model.

Referenced by staticPredictorOff().

void CentralLB::changePredictor ( LBPredictorFunction new_predictor  )  [inline]

Definition at line 197 of file CentralLB.h.

References CentralLB::FutureModel::changePredictor(), and predicted_model.

Referenced by staticChangePredictor().

LBMigrateMsg* CentralLB::callStrategy ( LDStats *  stats,
int  count 
) [inline]

Definition at line 205 of file CentralLB.h.

References Strategy().

virtual CmiBool CentralLB::QueryBalanceNow ( int   )  [inline, protected, virtual]

Reimplemented in BlockLB, ComboCentLB, Comm1LB, DummyLB, GreedyAgentLB, GreedyCommLB, GreedyLB, GridCommLB, GridCommRefineLB, GridHybridLB, GridHybridSeedLB, GridMetisLB, MetisLB, OrbLB, PhasebyArrayLB, RandCentLB, RecBisectBfLB, RefineCommLB, RefineKLB, RefineLB, RefineTopoLB, RotateLB, TopoCentLB, and TopoLB.

Definition at line 219 of file CentralLB.h.

References CmiTrue.

Referenced by AtSync().

virtual CmiBool CentralLB::QueryDumpData (  )  [inline, protected, virtual]

Definition at line 220 of file CentralLB.h.

References CmiFalse.

virtual void CentralLB::LoadbalanceDone ( int  balancing  )  [inline, protected, virtual]

Definition at line 221 of file CentralLB.h.

Referenced by MigrationDone().


Field Documentation

CLBStatsMsg* CentralLB::statsMsg [private]

Definition at line 72 of file CentralLB.h.

Referenced by BuildStatsMsg(), initLB(), and SendStats().

int CentralLB::count_msgs [private]

Definition at line 73 of file CentralLB.h.

Referenced by initLB(), and ReceiveStatsViaTree().

CkMarshalledCLBStatsMessage CentralLB::bufMsg

Definition at line 76 of file CentralLB.h.

Referenced by ReceiveStatsViaTree().

SpanningTree CentralLB::st

Definition at line 77 of file CentralLB.h.

Referenced by ReceiveStatsViaTree().

int CentralLB::cur_ld_balancer

Definition at line 207 of file CentralLB.h.

Referenced by BuildStatsMsg(), initLB(), LoadBalance(), ProcessAtSync(), ResumeClients(), and SendStats().

CProxy_CentralLB CentralLB::thisProxy [private]

Definition at line 230 of file CentralLB.h.

Referenced by AtSync(), initLB(), LoadBalance(), MigrationDone(), ProcessAtSync(), ReceiveCounts(), ReceiveMigration(), ReceiveStats(), ReceiveStatsViaTree(), SendStats(), and StartLB().

int CentralLB::myspeed [private]

Definition at line 231 of file CentralLB.h.

Referenced by BuildStatsMsg(), and initLB().

int CentralLB::stats_msg_count [private]

Definition at line 232 of file CentralLB.h.

Referenced by buildStats(), initLB(), LoadBalance(), readStatsMsgs(), ReceiveStats(), and writeStatsMsgs().

CLBStatsMsg** CentralLB::statsMsgsList [private]

Definition at line 233 of file CentralLB.h.

Referenced by buildStats(), initLB(), LoadBalance(), readStatsMsgs(), ReceiveStats(), and ~CentralLB().

LDStats* CentralLB::statsData [private]

Reimplemented in OrbLB.

Definition at line 234 of file CentralLB.h.

Referenced by buildStats(), depositData(), initLB(), LoadBalance(), preprocess(), readStatsMsgs(), ReceiveCounts(), ReceiveStats(), simulationRead(), useMem(), writeStatsMsgs(), and ~CentralLB().

int CentralLB::migrates_completed [private]

Definition at line 235 of file CentralLB.h.

Referenced by initLB(), Migrated(), MigrationDone(), and ReceiveMigration().

int CentralLB::migrates_expected [private]

Definition at line 236 of file CentralLB.h.

Referenced by initLB(), Migrated(), MigrationDone(), and ReceiveMigration().

int CentralLB::future_migrates_completed [private]

Definition at line 237 of file CentralLB.h.

Referenced by CheckMigrationComplete(), initLB(), Migrated(), and ResumeClients().

int CentralLB::future_migrates_expected [private]

Definition at line 238 of file CentralLB.h.

Referenced by CheckMigrationComplete(), initLB(), Migrated(), ReceiveMigration(), and ResumeClients().

int CentralLB::lbdone [private]

Definition at line 239 of file CentralLB.h.

Referenced by CheckMigrationComplete(), and initLB().

double CentralLB::start_lb_time [private]

Definition at line 240 of file CentralLB.h.

Referenced by LoadBalance(), ProcessAtSync(), and ResumeClients().

FutureModel* CentralLB::predicted_model [private]

Definition at line 242 of file CentralLB.h.

Referenced by changePredictor(), initLB(), predictorOff(), and predictorOn().


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