#include <DistributedLB.h>
Definition at line 29 of file DistributedLB.h.
DistributedLB::DistributedLB | ( | const CkLBOptions & | opt | ) |
Definition at line 19 of file DistributedLB.C.
References Converse::CkMyPe(), InitLB(), kMaxPhases, kTargetRatio, and quietModeRequested.
DistributedLB::DistributedLB | ( | CkMigrateMessage * | m | ) |
void DistributedLB::initnodeFn | ( | void | ) | [static] |
Definition at line 28 of file DistributedLB.C.
References _registerCommandLineOpt().
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().
void DistributedLB::LoadReduction | ( | CkReductionMsg * | msg | ) |
Definition at line 124 of file DistributedLB.C.
References _lb_args, avg_load, cb, Converse::CkMyPe(), Converse::CkNumPes(), CkStartQD(), count, data, CkLBArgs::debug(), GossipLoadInfo(), kTargetRatio, load_ratio, max_load, my_load, PackAndSendMigrateMsgs(), CkReductionMsg::toTuple(), and transfer_threshold.
void DistributedLB::AfterLBReduction | ( | CkReductionMsg * | msg | ) |
Definition at line 318 of file DistributedLB.C.
References _lb_args, abs(), avg_load, Converse::CkMyPe(), Cleanup(), CmiWallTimer(), count, data, CkLBArgs::debug(), end_time, kMaxPhases, kTargetRatio, load_ratio, max_load, CkLBArgs::metaLbModelDir(), CkLBArgs::metaLbOn(), PackAndSendMigrateMsgs(), phase_number, start_time, StartNextLBPhase(), CkReductionMsg::toTuple(), and transfer_threshold.
void DistributedLB::DoneGossip | ( | ) |
Definition at line 274 of file DistributedLB.C.
References _lb_args, avg_load, Converse::CkMyPe(), CmiWallTimer(), CkLBArgs::debug(), end_time, lb_started, max_load, pe_no, Setup(), start_time, StartNextLBPhase(), transfer_threshold, and underloaded_pe_count.
Definition at line 504 of file DistributedLB.C.
References Converse::CkMyPe(), kUseAck, my_load, and transfer_threshold.
Definition at line 535 of file DistributedLB.C.
References Converse::CkMyPe(), minHeap::deleteMin(), DoneWithLBPhase(), MigrateInfo::from_pe, LDObjData::handle, InfoRecord::Id, minHeap::insert(), InfoRecord::load, MapObjsToPe(), migrateInfo, my_load, my_stats, negack_count, MigrateInfo::obj, DistBaseLB::LDStats::objData, objs, objs_count, CkVec< T >::size(), MigrateInfo::to_pe, total_migrates, total_migrates_ack, underloaded_pe_count, and LDObjData::wallTime.
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().
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().
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().
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().
void DistributedLB::MapObjsToPe | ( | minHeap * | objs, | |
CkVec< int > & | obj_no, | |||
CkVec< int > & | obj_pe_no | |||
) | [private] |
Definition at line 436 of file DistributedLB.C.
References Converse::CkMyPe(), minHeap::deleteMin(), InfoRecord::Id, minHeap::insert(), CkVec< T >::insertAtEnd(), kMaxObjPickTrials, kMaxTrials, InfoRecord::load, loads, my_load, my_stats, DistBaseLB::LDStats::objData, objs_count, pe_no, PickRandReceiverPeIdx(), transfer_threshold, and LDObjData::wallTime.
Referenced by LoadBalance(), and RecvAck().
int DistributedLB::PickRandReceiverPeIdx | ( | ) | const [private] |
Definition at line 605 of file DistributedLB.C.
References distribution, and underloaded_pe_count.
Referenced by MapObjsToPe().
void DistributedLB::CalculateCumulateDistribution | ( | ) | [private] |
Definition at line 624 of file DistributedLB.C.
References distribution, loads, transfer_threshold, and underloaded_pe_count.
Referenced by Setup().
void DistributedLB::Strategy | ( | const DistBaseLB::LDStats *const | stats | ) | [private] |
Definition at line 70 of file DistributedLB.C.
References _lb_args, b_load, CkReductionMsg::buildFromTuple(), cb, Converse::CkMyPe(), Converse::CkNumPes(), CmiLog2(), CmiWallTimer(), CkLBArgs::debug(), distribution, gossip_msg_count, DistBaseLB::LDStats::idletime, init_load, kMaxGossipMsgCount, kMaxObjPickTrials, kMaxTrials, lb_started, loads, CkReduction::max_double, msg, my_load, my_stats, DistBaseLB::LDStats::n_objs, negack_count, DistBaseLB::LDStats::objData, pe_no, phase_number, CkReductionMsg::setCallback(), start_time, CkReduction::sum_double, total_migrates, total_migrates_ack, DistBaseLB::LDStats::total_walltime, and LDObjData::wallTime.
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().
void DistributedLB::Cleanup | ( | ) | [private] |
Definition at line 421 of file DistributedLB.C.
References minHeap::deleteMin(), and objs.
Referenced by AfterLBReduction().
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().
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().
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().
Definition at line 104 of file DistributedLB.h.
int DistributedLB::underloaded_pe_count [private] |
Definition at line 46 of file DistributedLB.h.
Referenced by CalculateCumulateDistribution(), DoneGossip(), PickRandReceiverPeIdx(), RecvAck(), and StartNextLBPhase().
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] |
Definition at line 48 of file DistributedLB.h.
Referenced by CalculateCumulateDistribution(), GossipLoadInfo(), MapObjsToPe(), SendLoadInfo(), and Strategy().
std::vector<double> DistributedLB::distribution [private] |
Definition at line 49 of file DistributedLB.h.
Referenced by CalculateCumulateDistribution(), PickRandReceiverPeIdx(), and Strategy().
minHeap* DistributedLB::objs [private] |
Definition at line 51 of file DistributedLB.h.
Referenced by Cleanup(), LoadBalance(), RecvAck(), and Setup().
int DistributedLB::total_migrates_ack [private] |
Definition at line 53 of file DistributedLB.h.
Referenced by LoadBalance(), RecvAck(), and Strategy().
int DistributedLB::total_migrates [private] |
Definition at line 54 of file DistributedLB.h.
Referenced by DoneWithLBPhase(), LoadBalance(), PackAndSendMigrateMsgs(), RecvAck(), and Strategy().
std::vector<MigrateInfo*> DistributedLB::migrateInfo [private] |
Definition at line 55 of file DistributedLB.h.
Referenced by PackAndSendMigrateMsgs(), and RecvAck().
bool DistributedLB::kUseAck [private] |
int DistributedLB::kPartialInfoCount [private] |
int DistributedLB::kMaxTrials [private] |
int DistributedLB::kMaxGossipMsgCount [private] |
int DistributedLB::kMaxObjPickTrials [private] |
int DistributedLB::kMaxPhases [private] |
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] |
Definition at line 72 of file DistributedLB.h.
Referenced by DoneWithLBPhase(), InformMigration(), LoadReduction(), MapObjsToPe(), RecvAck(), StartNextLBPhase(), and Strategy().
double DistributedLB::init_load [private] |
double DistributedLB::b_load [private] |
double DistributedLB::b_load_per_obj [private] |
Definition at line 75 of file DistributedLB.h.
bool DistributedLB::lb_started [private] |
int DistributedLB::phase_number [private] |
Definition at line 79 of file DistributedLB.h.
Referenced by AfterLBReduction(), DoneWithLBPhase(), and Strategy().
int DistributedLB::gossip_msg_count [private] |
int DistributedLB::objs_count [private] |
int DistributedLB::negack_count [private] |
Definition at line 82 of file DistributedLB.h.
Referenced by DoneWithLBPhase(), RecvAck(), and Strategy().
double DistributedLB::transfer_threshold [private] |
Definition at line 83 of file DistributedLB.h.
Referenced by AfterLBReduction(), CalculateCumulateDistribution(), DoneGossip(), InformMigration(), LoadReduction(), MapObjsToPe(), and StartNextLBPhase().
double DistributedLB::start_time [private] |
Definition at line 85 of file DistributedLB.h.
Referenced by AfterLBReduction(), DoneGossip(), and Strategy().
const DistBaseLB::LDStats* DistributedLB::my_stats [private] |
Definition at line 87 of file DistributedLB.h.
Referenced by MapObjsToPe(), RecvAck(), Setup(), and Strategy().