PPL Logo

DistributedLB Class Reference

#include <DistributedLB.h>

Inheritance diagram for DistributedLB:

Inheritance graph
[legend]
Collaboration diagram for DistributedLB:

Collaboration graph
[legend]

Public Member Functions

 DistributedLB (const CkLBOptions &)
 DistributedLB (CkMigrateMessage *m)
void GossipLoadInfo (int, int, int[], double[])
void LoadReduction (CkReductionMsg *msg)
void AfterLBReduction (CkReductionMsg *msg)
void DoneGossip ()
void InformMigration (int obj_id, int from_pe, double obj_load, bool force)
void RecvAck (int obj_id, int assigned_pe, bool can_accept)
void turnOn ()
void turnOff ()

Static Public Member Functions

static void initnodeFn (void)

Private Member Functions

void InitLB (const CkLBOptions &)
void SendLoadInfo ()
void LoadBalance ()
void LoadBalance (CkVec< int > &obj_no, CkVec< int > &obj_pe_no)
void MapObjsToPe (minHeap *objs, CkVec< int > &obj_no, CkVec< int > &obj_pe_no)
int PickRandReceiverPeIdx () const
void CalculateCumulateDistribution ()
void Strategy (const DistBaseLB::LDStats *const stats)
void Setup ()
void Cleanup ()
void PackAndSendMigrateMsgs ()
void StartNextLBPhase ()
void DoneWithLBPhase ()
bool QueryBalanceNow (int step)

Private Attributes

int underloaded_pe_count
std::vector< intpe_no
std::vector< double > loads
std::vector< double > distribution
minHeapobjs
int total_migrates_ack
int total_migrates
std::vector< MigrateInfo * > migrateInfo
bool kUseAck
int kPartialInfoCount
int kMaxTrials
int kMaxGossipMsgCount
int kMaxObjPickTrials
int kMaxPhases
double kTargetRatio
double avg_load
double max_load
double load_ratio
double my_load
double init_load
double b_load
double b_load_per_obj
bool lb_started
int phase_number
int gossip_msg_count
int objs_count
int negack_count
double transfer_threshold
double start_time
const DistBaseLB::LDStatsmy_stats

Detailed Description

Definition at line 29 of file DistributedLB.h.


Constructor & Destructor Documentation

DistributedLB::DistributedLB ( const CkLBOptions opt  ) 

Definition at line 19 of file DistributedLB.C.

References Converse::CkMyPe(), InitLB(), kMaxPhases, kTargetRatio, and quietModeRequested.

Here is the call graph for this function:

DistributedLB::DistributedLB ( CkMigrateMessage m  ) 


Member Function Documentation

void DistributedLB::initnodeFn ( void   )  [static]

Definition at line 28 of file DistributedLB.C.

References _registerCommandLineOpt().

Here is the call graph for this function:

void DistributedLB::GossipLoadInfo ( int  from_pe,
int  n,
int  remote_pe_no[],
double  remote_loads[] 
)

Definition at line 177 of file DistributedLB.C.

References PUP::l, loads, PUP::m, pe_no, and SendLoadInfo().

Referenced by LoadReduction().

Here is the call graph for this function:

Here is the caller graph for this function:

void DistributedLB::LoadReduction ( CkReductionMsg msg  ) 

void DistributedLB::AfterLBReduction ( CkReductionMsg msg  ) 

void DistributedLB::DoneGossip (  ) 

void DistributedLB::InformMigration ( int  obj_id,
int  from_pe,
double  obj_load,
bool  force 
)

Definition at line 504 of file DistributedLB.C.

References Converse::CkMyPe(), kUseAck, my_load, and transfer_threshold.

Here is the call graph for this function:

void DistributedLB::RecvAck ( int  obj_id,
int  assigned_pe,
bool  can_accept 
)

void DistributedLB::turnOn (  ) 

Definition at line 34 of file DistributedLB.C.

void DistributedLB::turnOff (  ) 

Definition at line 46 of file DistributedLB.C.

Referenced by InitLB().

Here is the caller graph for this function:

void DistributedLB::InitLB ( const CkLBOptions opt  )  [private]

Definition at line 58 of file DistributedLB.C.

References _lb_args, CkLBOptions::getSeqNo(), kMaxPhases, kPartialInfoCount, kTargetRatio, kUseAck, CkLBArgs::maxDistPhases(), CkLBArgs::metaLbModelDir(), CkLBArgs::metaLbOn(), CkLBArgs::targetRatio(), and turnOff().

Referenced by DistributedLB().

Here is the call graph for this function:

Here is the caller graph for this function:

void DistributedLB::SendLoadInfo (  )  [private]

Definition at line 229 of file DistributedLB.C.

References Converse::CkMyPe(), Converse::CkNumPes(), gossip_msg_count, kMaxGossipMsgCount, kPartialInfoCount, PUP::l, loads, p, and pe_no.

Referenced by GossipLoadInfo().

Here is the call graph for this function:

Here is the caller graph for this function:

void DistributedLB::LoadBalance ( void   )  [private]

Definition at line 374 of file DistributedLB.C.

References DoneWithLBPhase(), CkVec< T >::length(), MapObjsToPe(), objs, total_migrates, and total_migrates_ack.

Referenced by StartNextLBPhase().

Here is the call graph for this function:

Here is the caller graph for this function:

void DistributedLB::LoadBalance ( CkVec< int > &  obj_no,
CkVec< int > &  obj_pe_no 
) [private]

void DistributedLB::MapObjsToPe ( minHeap objs,
CkVec< int > &  obj_no,
CkVec< int > &  obj_pe_no 
) [private]

int DistributedLB::PickRandReceiverPeIdx (  )  const [private]

Definition at line 605 of file DistributedLB.C.

References distribution, and underloaded_pe_count.

Referenced by MapObjsToPe().

Here is the caller graph for this function:

void DistributedLB::CalculateCumulateDistribution (  )  [private]

Definition at line 624 of file DistributedLB.C.

References distribution, loads, transfer_threshold, and underloaded_pe_count.

Referenced by Setup().

Here is the caller graph for this function:

void DistributedLB::Strategy ( const DistBaseLB::LDStats *const   stats  )  [private]

void DistributedLB::Setup (  )  [private]

Definition at line 390 of file DistributedLB.C.

References CalculateCumulateDistribution(), InfoRecord::Id, minHeap::insert(), InfoRecord::load, LDObjData::migratable, my_stats, DistBaseLB::LDStats::n_objs, DistBaseLB::LDStats::objData, objs, objs_count, and LDObjData::wallTime.

Referenced by DoneGossip().

Here is the call graph for this function:

Here is the caller graph for this function:

void DistributedLB::Cleanup (  )  [private]

Definition at line 421 of file DistributedLB.C.

References minHeap::deleteMin(), and objs.

Referenced by AfterLBReduction().

Here is the call graph for this function:

Here is the caller graph for this function:

void DistributedLB::PackAndSendMigrateMsgs (  )  [private]

Definition at line 589 of file DistributedLB.C.

References Converse::CkNumPes(), migrateInfo, LBMigrateMsg::moves, msg, LBMigrateMsg::n_moves, and total_migrates.

Referenced by AfterLBReduction(), and LoadReduction().

Here is the call graph for this function:

Here is the caller graph for this function:

void DistributedLB::StartNextLBPhase (  )  [private]

Definition at line 291 of file DistributedLB.C.

References DoneWithLBPhase(), LoadBalance(), my_load, transfer_threshold, and underloaded_pe_count.

Referenced by AfterLBReduction(), and DoneGossip().

Here is the call graph for this function:

Here is the caller graph for this function:

void DistributedLB::DoneWithLBPhase (  )  [private]

Definition at line 302 of file DistributedLB.C.

References _lb_args, CkReductionMsg::buildFromTuple(), cb, count, CkLBArgs::debug(), CkReduction::max_double, CkReduction::max_int, msg, my_load, negack_count, phase_number, CkReductionMsg::setCallback(), CkReduction::sum_int, and total_migrates.

Referenced by LoadBalance(), RecvAck(), and StartNextLBPhase().

Here is the call graph for this function:

Here is the caller graph for this function:

bool DistributedLB::QueryBalanceNow ( int  step  )  [inline, private]

Definition at line 104 of file DistributedLB.h.


Field Documentation

std::vector<int> DistributedLB::pe_no [private]

Definition at line 47 of file DistributedLB.h.

Referenced by DoneGossip(), GossipLoadInfo(), MapObjsToPe(), SendLoadInfo(), and Strategy().

std::vector<double> DistributedLB::loads [private]

std::vector<double> DistributedLB::distribution [private]

Definition at line 49 of file DistributedLB.h.

Referenced by CalculateCumulateDistribution(), PickRandReceiverPeIdx(), and Strategy().

Definition at line 51 of file DistributedLB.h.

Referenced by Cleanup(), LoadBalance(), RecvAck(), and Setup().

Definition at line 53 of file DistributedLB.h.

Referenced by LoadBalance(), RecvAck(), and Strategy().

std::vector<MigrateInfo*> DistributedLB::migrateInfo [private]

Definition at line 55 of file DistributedLB.h.

Referenced by PackAndSendMigrateMsgs(), and RecvAck().

Definition at line 58 of file DistributedLB.h.

Referenced by InformMigration(), and InitLB().

Definition at line 59 of file DistributedLB.h.

Referenced by InitLB(), and SendLoadInfo().

Definition at line 60 of file DistributedLB.h.

Referenced by MapObjsToPe(), and Strategy().

Definition at line 61 of file DistributedLB.h.

Referenced by SendLoadInfo(), and Strategy().

Definition at line 62 of file DistributedLB.h.

Referenced by MapObjsToPe(), and Strategy().

Definition at line 63 of file DistributedLB.h.

Referenced by AfterLBReduction(), DistributedLB(), and InitLB().

double DistributedLB::kTargetRatio [private]

Definition at line 64 of file DistributedLB.h.

Referenced by AfterLBReduction(), DistributedLB(), InitLB(), and LoadReduction().

double DistributedLB::avg_load [private]

Definition at line 67 of file DistributedLB.h.

Referenced by AfterLBReduction(), DoneGossip(), and LoadReduction().

double DistributedLB::max_load [private]

Definition at line 68 of file DistributedLB.h.

Referenced by AfterLBReduction(), DoneGossip(), and LoadReduction().

double DistributedLB::load_ratio [private]

Definition at line 69 of file DistributedLB.h.

Referenced by AfterLBReduction(), and LoadReduction().

double DistributedLB::my_load [private]

double DistributedLB::init_load [private]

Definition at line 73 of file DistributedLB.h.

Referenced by Strategy().

double DistributedLB::b_load [private]

Definition at line 74 of file DistributedLB.h.

Referenced by Strategy().

Definition at line 75 of file DistributedLB.h.

Definition at line 78 of file DistributedLB.h.

Referenced by DoneGossip(), and Strategy().

Definition at line 79 of file DistributedLB.h.

Referenced by AfterLBReduction(), DoneWithLBPhase(), and Strategy().

Definition at line 80 of file DistributedLB.h.

Referenced by SendLoadInfo(), and Strategy().

Definition at line 81 of file DistributedLB.h.

Referenced by MapObjsToPe(), RecvAck(), and Setup().

Definition at line 82 of file DistributedLB.h.

Referenced by DoneWithLBPhase(), RecvAck(), and Strategy().

double DistributedLB::start_time [private]

Definition at line 85 of file DistributedLB.h.

Referenced by AfterLBReduction(), DoneGossip(), and Strategy().

Definition at line 87 of file DistributedLB.h.

Referenced by MapObjsToPe(), RecvAck(), Setup(), and Strategy().


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

Generated on Mon Sep 21 08:22:39 2020 for Charm++ by  doxygen 1.5.5