ALL 0.9.3
A Loadbalacing Library
|
#include <ALL_Histogram.hpp>
Public Member Functions | |
Histogram_LB () | |
default constructor | |
Histogram_LB (int d, std::vector< W > w, T g) | |
~Histogram_LB () | |
default destructor | |
void | balance (int step) override |
virtual W | getEstimatedEfficiency () override |
std::vector< int > & | getNeighbors () override |
virtual void | setAdditionalData (const void *data) override |
void | setup () override |
method to setup the loac-balancing method | |
![]() | |
LB (const int dim, const T g) | |
virtual | ~LB ()=default |
destructor | |
virtual int | getDimension () |
double | getEfficiency () |
virtual const T | getGamma () |
virtual const std::vector< T > & | getMinDomainSize () |
std::vector< T > & | getNeighborVertices () |
int | getNVertices () |
virtual std::vector< Point< T > > & | getPrevVertices () |
virtual const std::vector< T > & | getSysSize () |
virtual std::vector< Point< T > > & | getVertices () |
virtual std::vector< W > & | getWork () |
virtual void | setCommunicator (const MPI_Comm comm) |
virtual void | setDimension (const int d) |
virtual void | setGamma (const T g) |
virtual void | setMinDomainSize (const std::vector< T > &minSize) |
virtual void | setSysSize (const std::vector< T > &newSysSize) |
virtual void | setVertices (const std::vector< Point< T > > &vertices_in) |
virtual void | setWork (const std::vector< W > &w) |
virtual void | setWork (const W w) |
Additional Inherited Members | |
![]() | |
void | resizeVertices (const int newSize) |
![]() | |
int | dimension |
dimension of the used vertices | |
T | gamma |
correction factor | |
std::vector< int > | global_dims |
dimensions of the global process grid | |
MPI_Comm | globalComm |
used MPI communicator | |
std::vector< int > | local_coords |
cartesian coordinates of the local domain in the process grid | |
int | localRank |
local rank in the used MPI communicator | |
std::vector< T > | minSize |
std::vector< T > | neighborVertices |
vertices describing neighboring domains | |
std::vector< int > | periodicity |
periodicity of the MPI communicator / system | |
std::vector< Point< T > > | prevVertices |
original vertices before previous balancing step | |
std::vector< T > | sysSize |
(orthogonal) system size | |
std::vector< Point< T > > | vertices |
local vertices after previous balancing step | |
std::vector< W > | work |
local work | |
Load-balancing scheme based on the usage of global histograms in order to provide a most optimal decomposition of data. The decomposition is created by calling the balancing method three times. For each of the different dimensions the data is sorted into histograms (the correction factor gamma determines the width of each data bin) and using this as a cumulative distribution function a decomposition is computed where each chunk contains roughly the same amount of data. For the next dimensions this operation is repeated within the chunks provided by the previous call, therefore resulting after three call in a full three-dimensional decomposition. Between each call to the balancing method the data needs to be transferred according to the newly created domain boundaries.
T | data for vertices and related data |
W | data for work and related data |
Definition at line 55 of file ALL_Histogram.hpp.
|
inline |
default constructor
Definition at line 58 of file ALL_Histogram.hpp.
|
inline |
constructor to initialize the main parameters
d | the dimension of the used vertices |
w | the multi-dimensional work of the local domain, the number of entries has to be equal to the number of bins overlapping the local domain in the current direction (bin width = correction factor gamma) |
g | the correction factor, i.e. the width of a single bin |
Definition at line 65 of file ALL_Histogram.hpp.
|
inline |
default destructor
Definition at line 81 of file ALL_Histogram.hpp.
|
overridevirtual |
method to perform a single load-balancing step
step | the number the actual load-balancing step should get (e.g. if counting the number of loadbalancing steps) |
Implements ALL::LB< T, W >.
Definition at line 267 of file ALL_Histogram.hpp.
|
overridevirtual |
method to get an estimated work distribution after the balance step (currently only implemented in ALL::HISTOGRAM!)
[out] | double | providing the estimated LB after the balance step |
Implements ALL::LB< T, W >.
Definition at line 727 of file ALL_Histogram.hpp.
|
overridevirtual |
method to provide a list of neighbors by MPI rank
[out] | list | the std::vector the list of neighbors is stored to |
Implements ALL::LB< T, W >.
Definition at line 722 of file ALL_Histogram.hpp.
|
overridevirtual |
method to set method specific data
data | pointer to an array of integers (int) containing the number of bins in the system for all three dimensions (int, int, int) |
Implements ALL::LB< T, W >.
Definition at line 144 of file ALL_Histogram.hpp.
|
overridevirtual |
method to setup the loac-balancing method
Implements ALL::LB< T, W >.
Definition at line 158 of file ALL_Histogram.hpp.