#include <RefinerApprox.h>
Public Member Functions | |
RefinerApprox (double _overload) | |
~RefinerApprox () | |
void | Refine (int count, CentralLB::LDStats *stats, int *cur_p, int *new_p, int percentMoves=100) |
Protected Member Functions | |
void | create (int count, CentralLB::LDStats *stats, int *cur_p) |
void | reinitAssignment () |
virtual int | refine (double opt) |
void | multirefine (int num_moves) |
int | getNumLargeComputes (double opt) |
double | getLargestCompute () |
int | computeA (processorInfo *p, double opt) |
int | computeB (processorInfo *p, double opt) |
int | numMoves () |
void | printStats (int newStats) |
Set * | removeBiggestSmallComputes (int num, processorInfo *p, double opt) |
Set * | removeBigComputes (int num, processorInfo *p, double opt) |
Definition at line 13 of file RefinerApprox.h.
RefinerApprox::RefinerApprox | ( | double | _overload | ) | [inline] |
Definition at line 15 of file RefinerApprox.h.
References Refiner::computes, Refiner::overLoad, and Refiner::processors.
RefinerApprox::~RefinerApprox | ( | ) | [inline] |
Definition at line 18 of file RefinerApprox.h.
void RefinerApprox::Refine | ( | int | count, | |
CentralLB::LDStats * | stats, | |||
int * | cur_p, | |||
int * | new_p, | |||
int | percentMoves = 100 | |||
) |
Definition at line 603 of file RefinerApprox.C.
References _lb_args, _lb_debug, Refiner::assign(), Refiner::averageLoad, c, Converse::CkMyPe(), Refiner::computeAverage(), Refiner::computes, create(), CkLBArgs::debug(), InfoRecord::Id, Iterator::id, int, multirefine(), Refiner::numAvail, Refiner::numComputes, Refiner::P, printStats(), computeInfo::processor, Refiner::processors, and Refiner::removeComputes().
Referenced by RefineKLB::work().
Definition at line 7 of file RefinerApprox.C.
References processorInfo::available, processorInfo::backgroundLoad, CmiAbort(), CmiPrintf(), processorInfo::computeLoad, Refiner::computes, processorInfo::computeSet, CrnRand(), computeInfo::id, InfoRecord::Id, index, InfoRecord::load, computeInfo::migratable, LDObjData::migratable, Refiner::numAvail, Refiner::numComputes, LDObjData::objID(), computeInfo::oldProcessor, Refiner::P, processorInfo::pe_speed, computeInfo::processor, Refiner::processors, and LDObjData::wallTime.
Referenced by Refine().
void RefinerApprox::reinitAssignment | ( | ) | [protected] |
Definition at line 66 of file RefinerApprox.C.
References Refiner::assign(), c, Refiner::deAssign(), Iterator::id, computeInfo::oldProcessor, Refiner::P, and Refiner::processors.
Referenced by multirefine().
int RefinerApprox::refine | ( | double | opt | ) | [protected, virtual] |
Definition at line 353 of file RefinerApprox.C.
References _lb_debug, PUP::a, Refiner::assign(), Refiner::averageLoad, PUP::b, c, computeA(), computeB(), Refiner::deAssign(), minHeap::deleteMin(), getLargestCompute(), getNumLargeComputes(), InfoRecord::Id, Iterator::id, minHeap::insert(), Set::insert(), Set::iterator(), InfoRecord::load, Set::next(), numMoves(), Refiner::P, Refiner::processors, Set::remove(), removeBigComputes(), and removeBiggestSmallComputes().
void RefinerApprox::multirefine | ( | int | num_moves | ) | [protected] |
Definition at line 99 of file RefinerApprox.C.
References _lb_debug, Refiner::averageLoad, Refiner::computeAverage(), Refiner::computeMax(), max(), numMoves(), Refiner::refine(), and reinitAssignment().
Referenced by Refine().
int RefinerApprox::getNumLargeComputes | ( | double | opt | ) | [protected] |
Definition at line 248 of file RefinerApprox.C.
References c, Iterator::id, InfoRecord::load, Refiner::P, and Refiner::processors.
Referenced by refine().
double RefinerApprox::getLargestCompute | ( | ) | [protected] |
Definition at line 222 of file RefinerApprox.C.
References processorInfo::backgroundLoad, c, Iterator::id, InfoRecord::load, Refiner::P, and Refiner::processors.
Referenced by refine().
int RefinerApprox::computeA | ( | processorInfo * | p, | |
double | opt | |||
) | [protected] |
Definition at line 277 of file RefinerApprox.C.
References processorInfo::backgroundLoad, c, processorInfo::computeSet, maxHeap::deleteMax(), h, Iterator::id, maxHeap::insert(), Set::iterator(), InfoRecord::load, Set::next(), and Set::numElements().
Referenced by refine().
int RefinerApprox::computeB | ( | processorInfo * | p, | |
double | opt | |||
) | [protected] |
Definition at line 316 of file RefinerApprox.C.
References _lb_debug, processorInfo::backgroundLoad, c, processorInfo::computeSet, maxHeap::deleteMax(), h, Iterator::id, maxHeap::insert(), Set::iterator(), InfoRecord::load, Set::next(), and Set::numElements().
Referenced by refine().
int RefinerApprox::numMoves | ( | ) | [protected] |
Definition at line 592 of file RefinerApprox.C.
References Refiner::computes, and Refiner::numComputes.
Referenced by multirefine(), and refine().
void RefinerApprox::printStats | ( | int | newStats | ) | [protected] |
Definition at line 696 of file RefinerApprox.C.
References Refiner::P, and Refiner::processors.
Referenced by Refine().
Set * RefinerApprox::removeBiggestSmallComputes | ( | int | num, | |
processorInfo * | p, | |||
double | opt | |||
) | [protected] |
Definition at line 138 of file RefinerApprox.C.
References _lb_debug, processorInfo::backgroundLoad, c, processorInfo::computeSet, maxHeap::deleteMax(), h, InfoRecord::Id, Iterator::id, Set::insert(), maxHeap::insert(), Set::iterator(), InfoRecord::load, Set::next(), and Set::numElements().
Referenced by refine().
Set * RefinerApprox::removeBigComputes | ( | int | num, | |
processorInfo * | p, | |||
double | opt | |||
) | [protected] |
Definition at line 185 of file RefinerApprox.C.
References _lb_debug, c, processorInfo::computeSet, maxHeap::deleteMax(), h, Iterator::id, InfoRecord::Id, Set::insert(), maxHeap::insert(), Set::iterator(), InfoRecord::load, Set::next(), and Set::numElements().
Referenced by refine().