#include <DistBaseLB.h>
Public Member Functions | |
DistBaseLB (const CkLBOptions &) | |
DistBaseLB (CkMigrateMessage *m) | |
~DistBaseLB () | |
void | AtSync (void) |
void | barrierDone () |
void | ProcessAtSync () |
void | LoadBalance () |
void | ResumeClients () |
void | ResumeClients (int balancing) |
void | Migrated (LDObjHandle h, int waitBarrier) |
Static Public Member Functions | |
static void | staticAtSync (void *) |
static void | staticStartLB (void *) |
static void | staticMigrated (void *me, LDObjHandle h, int waitBarrier) |
Protected Member Functions | |
virtual void | Strategy (const LDStats *const myStats) |
void | ProcessMigrationDecision (LBMigrateMsg *migrateMsg) |
Protected Attributes | |
LDStats | myStats |
int | migrates_expected |
Private Member Functions | |
void | AssembleStats () |
void | MigrationDone (int balancing) |
Private Attributes | |
bool | lb_started |
double | start_lb_time |
double | strat_start_time |
double | strat_end_time |
int | migrates_completed |
LBMigrateMsg ** | mig_msgs |
Data Structures | |
struct | LDStats |
Definition at line 19 of file DistBaseLB.h.
DistBaseLB::DistBaseLB | ( | const CkLBOptions & | opt | ) |
Definition at line 38 of file DistBaseLB.C.
References _lb_args, Converse::CkMyPe(), DistBaseLB::LDStats::commData, DistBaseLB::LDStats::from_pe, lb_started, mig_msgs, migrates_completed, migrates_expected, myStats, DistBaseLB::LDStats::n_comm, DistBaseLB::LDStats::n_objs, DistBaseLB::LDStats::objData, DistBaseLB::LDStats::pe_speed, staticAtSync(), staticMigrated(), staticStartLB(), and CkLBArgs::statsOn().
DistBaseLB::DistBaseLB | ( | CkMigrateMessage * | m | ) | [inline] |
Definition at line 22 of file DistBaseLB.h.
DistBaseLB::~DistBaseLB | ( | ) |
Definition at line 68 of file DistBaseLB.C.
References _lbdb, mig_msgs, and staticStartLB().
void DistBaseLB::staticAtSync | ( | void * | data | ) | [static] |
Definition at line 18 of file DistBaseLB.C.
References ProcessAtSync().
Referenced by DistBaseLB().
void DistBaseLB::AtSync | ( | void | ) |
Definition at line 82 of file DistBaseLB.C.
References _lb_args, AssembleStats(), Converse::CkMyPe(), Converse::CkNumPes(), CkLBArgs::debug(), lb_started, MigrationDone(), and start_lb_time.
void DistBaseLB::barrierDone | ( | ) |
Definition at line 28 of file DistBaseLB.C.
Referenced by ProcessAtSync(), and staticStartLB().
void DistBaseLB::staticStartLB | ( | void * | data | ) | [static] |
Definition at line 23 of file DistBaseLB.C.
References barrierDone().
Referenced by DistBaseLB(), and ~DistBaseLB().
void DistBaseLB::ProcessAtSync | ( | void | ) |
Definition at line 32 of file DistBaseLB.C.
References barrierDone(), and cb.
Referenced by staticAtSync().
void DistBaseLB::LoadBalance | ( | void | ) |
Definition at line 147 of file DistBaseLB.C.
References _lb_args, Converse::CkMyPe(), CmiMemoryUsage(), CkLBArgs::debug(), migrates_completed, migrates_expected, myStats, strat_start_time, and Strategy().
void DistBaseLB::ResumeClients | ( | void | ) |
Definition at line 222 of file DistBaseLB.C.
Referenced by MigrationDone().
void DistBaseLB::ResumeClients | ( | int | balancing | ) |
Definition at line 226 of file DistBaseLB.C.
References _lb_args, Converse::CkMyPe(), CmiMemoryUsage(), CkLBArgs::debug(), and strat_start_time.
void DistBaseLB::staticMigrated | ( | void * | me, | |
LDObjHandle | h, | |||
int | waitBarrier | |||
) | [static] |
Definition at line 13 of file DistBaseLB.C.
References Migrated().
Referenced by DistBaseLB().
void DistBaseLB::Migrated | ( | LDObjHandle | h, | |
int | waitBarrier | |||
) |
Definition at line 162 of file DistBaseLB.C.
References lb_started, migrates_completed, migrates_expected, and MigrationDone().
Referenced by staticMigrated().
void DistBaseLB::Strategy | ( | const LDStats *const | myStats | ) | [protected, virtual] |
Definition at line 242 of file DistBaseLB.C.
References Converse::CkNumPes(), msg, LBMigrateMsg::n_moves, and sizes.
Referenced by LoadBalance().
void DistBaseLB::ProcessMigrationDecision | ( | LBMigrateMsg * | migrateMsg | ) | [protected] |
Definition at line 173 of file DistBaseLB.C.
References _lb_args, Converse::CkMyPe(), CmiMemoryUsage(), CkLBArgs::debug(), MigrateInfo::from_pe, lb_started, migrates_completed, migrates_expected, MigrationDone(), LBMigrateMsg::moves, LBMigrateMsg::n_moves, MigrateInfo::obj, strat_end_time, strat_start_time, and MigrateInfo::to_pe.
void DistBaseLB::AssembleStats | ( | ) | [private] |
Definition at line 111 of file DistBaseLB.C.
References DistBaseLB::LDStats::bg_cputime, DistBaseLB::LDStats::bg_walltime, DistBaseLB::LDStats::commData, LDObjData::cpuTime, DistBaseLB::LDStats::idletime, DistBaseLB::LDStats::move, myStats, DistBaseLB::LDStats::n_comm, DistBaseLB::LDStats::n_objs, DistBaseLB::LDStats::obj_cputime, DistBaseLB::LDStats::obj_walltime, DistBaseLB::LDStats::objData, DistBaseLB::LDStats::total_cputime, DistBaseLB::LDStats::total_walltime, and LDObjData::wallTime.
Referenced by AtSync().
void DistBaseLB::MigrationDone | ( | int | balancing | ) | [private] |
Definition at line 204 of file DistBaseLB.C.
References _lb_args, Converse::CkMyPe(), lb_started, ResumeClients(), and CkLBArgs::syncResume().
Referenced by AtSync(), Migrated(), and ProcessMigrationDecision().
LDStats DistBaseLB::myStats [protected] |
Definition at line 70 of file DistBaseLB.h.
Referenced by AssembleStats(), DistBaseLB(), and LoadBalance().
int DistBaseLB::migrates_expected [protected] |
Definition at line 71 of file DistBaseLB.h.
Referenced by DistBaseLB(), LoadBalance(), Migrated(), and ProcessMigrationDecision().
bool DistBaseLB::lb_started [private] |
Definition at line 74 of file DistBaseLB.h.
Referenced by AtSync(), DistBaseLB(), Migrated(), MigrationDone(), and ProcessMigrationDecision().
double DistBaseLB::start_lb_time [private] |
double DistBaseLB::strat_start_time [private] |
Definition at line 76 of file DistBaseLB.h.
Referenced by LoadBalance(), ProcessMigrationDecision(), and ResumeClients().
double DistBaseLB::strat_end_time [private] |
int DistBaseLB::migrates_completed [private] |
Definition at line 79 of file DistBaseLB.h.
Referenced by DistBaseLB(), LoadBalance(), Migrated(), and ProcessMigrationDecision().
LBMigrateMsg** DistBaseLB::mig_msgs [private] |