|
MADNESS 0.10.1
|
#include <lbdeux.h>

Classes | |
| struct | add_op |
| struct | CostPerProc |
Public Member Functions | |
| LoadBalanceDeux (World &world) | |
| template<typename T, typename costT> | |
| void | add_tree (const Function< T, NDIM > &f, const costT &costfn, bool fence=false) |
| Accumulates cost from a function. | |
| std::shared_ptr< WorldDCPmapInterface< keyT > > | load_balance (double fac=1.0, bool printstuff=false) |
| Actually does the partitioning of the tree. | |
| void | print_cost_per_rank (const std::string &label, const std::shared_ptr< WorldDCPmapInterface< keyT > > &pmap, std::ostream &os=std::cout) |
| void | print_tree (const keyT &key=keyT(0)) |
| Printing for the curious. | |
Private Types | |
| typedef treeT::const_iterator | const_iteratorT |
| typedef treeT::iterator | iteratorT |
| typedef Key< NDIM > | keyT |
| typedef LBNodeDeux< NDIM > | nodeT |
| typedef WorldContainer< keyT, nodeT > | treeT |
Private Member Functions | |
| double | sum () |
| Sums costs up the tree returning to everyone the total cost. | |
Static Private Member Functions | |
| static bool | compare (const std::pair< keyT, double > &a, const std::pair< keyT, double > &b) |
| Used to sort results into descending order. | |
Private Attributes | |
| treeT | tree |
| World & | world |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inline |
References NDIM, tree, and world.
Referenced by madness::LoadBalanceDeux< NDIM >::add_op< T, costT >::add_op().
|
inline |
Accumulates cost from a function.
References madness::f.
Referenced by DF::DF_load_balance(), doit(), madness::SCF::initial_guess_ao_eigenvectors(), madness::SCF::initial_load_bal(), initial_loadbal(), iterate(), EmbeddedDirichlet::load_balance(), load_balance(), madness::load_balance(), madness::load_balance(), loadbal(), loadbal(), loadbal(), madness::SCF::loadbal(), main(), madness::SCF::make_fock_matrix(), preloadbal(), run(), test(), test_driver_keeps_root(), test_driver_rejects_nonfinite_cost(), and trotter().
|
inlinestaticprivate |
|
inline |
Actually does the partitioning of the tree.
References compare(), madness::LoadBalanceDeux< NDIM >::CostPerProc::cost, madness::f, madness::GaussianConvolution1DCache< double >::map, MADNESS_CHECK_THROW, nproc, p(), madness::LBNodeDeux< NDIM >::partition(), madness::print(), madness::LoadBalanceDeux< NDIM >::CostPerProc::proc, sum(), tree, and world.
Referenced by DF::DF_load_balance(), doit(), madness::SCF::initial_guess_ao_eigenvectors(), madness::SCF::initial_load_bal(), initial_loadbal(), iterate(), EmbeddedDirichlet::load_balance(), load_balance(), madness::load_balance(), madness::load_balance(), loadbal(), loadbal(), loadbal(), madness::SCF::loadbal(), main(), madness::SCF::make_fock_matrix(), preloadbal(), run(), test(), test_driver_keeps_root(), test_driver_rejects_nonfinite_cost(), and trotter().
|
inline |
Per-rank cost bar chart under the given pmap.
Walks the aggregator tree locally; each entry that is not deleted contributes its total_cost to bucket pmap->owner(key). Buckets are summed across ranks and rank 0 prints a horizontal bar chart with total/avg/max/avg/max/min ratios.
Call BEFORE load_balance() with the old pmap to see the per-key distribution that the partitioner is about to act on; call AFTER with the returned pmap to see how the bin-packed subtrees fell out. Both invocations sum to the same total work, so the bars are directly comparable.
References c, madness::FunctionDefaults< NDIM >::pmap, nproc, p(), tree, and world.
|
inline |
Printing for the curious.
References madness::Future< T >::get(), madness::print(), print_tree(), and tree.
Referenced by print_tree().
|
inlineprivate |
Sums costs up the tree returning to everyone the total cost.
References madness::LBNodeDeux< NDIM >::get_total_cost(), madness::LBNodeDeux< NDIM >::has_children(), madness::Key< NDIM >::level(), madness::Key< NDIM >::parent(), madness::LBNodeDeux< NDIM >::sum(), tree, and world.
Referenced by load_balance().
|
private |
Referenced by LoadBalanceDeux(), load_balance(), print_cost_per_rank(), print_tree(), and sum().
|
private |
Referenced by LoadBalanceDeux(), load_balance(), print_cost_per_rank(), and sum().