|
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 |
|
inline |
|
inline |
Accumulates cost from a function.
References madness::f.
Referenced by DF::DF_load_balance(), doit(), madness::SCF::initial_guess(), madness::SCF::initial_load_bal(), initial_loadbal(), iterate(), madness::load_balance(), EmbeddedDirichlet::load_balance(), load_balance(), madness::load_balance(), madness::SCF::loadbal(), loadbal(), loadbal(), loadbal(), main(), madness::SCF::make_fock_matrix(), preloadbal(), run(), test(), and trotter().
|
inlinestaticprivate |
Used to sort results into descending order.
Referenced by madness::LoadBalanceDeux< NDIM >::load_balance().
|
inline |
Actually does the partitioning of the tree.
References madness::WorldContainer< keyT, valueT, hashfunT >::begin(), madness::WorldGopInterface::broadcast_serializable(), madness::LoadBalanceDeux< NDIM >::compare(), madness::WorldGopInterface::concat0(), madness::LoadBalanceDeux< NDIM >::CostPerProc::cost, madness::WorldContainer< keyT, valueT, hashfunT >::end(), madness::f, madness::WorldGopInterface::fence(), madness::World::gop, madness::nonlinear_vector_solver(), madness::WorldContainer< keyT, valueT, hashfunT >::owner(), p(), madness::LBNodeDeux< NDIM >::partition(), madness::print(), madness::LoadBalanceDeux< NDIM >::CostPerProc::proc, madness::World::rank(), madness::WorldContainer< keyT, valueT, hashfunT >::send(), madness::World::size(), madness::LoadBalanceDeux< NDIM >::sum(), madness::LoadBalanceDeux< NDIM >::tree, and madness::LoadBalanceDeux< NDIM >::world.
Referenced by DF::DF_load_balance(), doit(), madness::SCF::initial_guess(), madness::SCF::initial_load_bal(), initial_loadbal(), iterate(), madness::load_balance(), EmbeddedDirichlet::load_balance(), load_balance(), madness::load_balance(), madness::SCF::loadbal(), loadbal(), loadbal(), loadbal(), main(), madness::SCF::make_fock_matrix(), preloadbal(), run(), test(), and trotter().
|
inline |
Per-rank cost bar chart under the given pmap.
Walks the aggregator tree locally; each entry with total_cost >= 0 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 madness::WorldContainer< keyT, valueT, hashfunT >::begin(), c, madness::WorldContainer< keyT, valueT, hashfunT >::end(), madness::WorldGopInterface::fence(), madness::World::gop, madness::nonlinear_vector_solver(), p(), madness::World::rank(), madness::World::size(), madness::WorldGopInterface::sum(), madness::LoadBalanceDeux< NDIM >::tree, and madness::LoadBalanceDeux< NDIM >::world.
|
inline |
Printing for the curious.
References madness::WorldContainer< keyT, valueT, hashfunT >::end(), madness::WorldContainer< keyT, valueT, hashfunT >::find(), madness::nonlinear_vector_solver(), madness::print(), madness::LoadBalanceDeux< NDIM >::print_tree(), and madness::LoadBalanceDeux< NDIM >::tree.
Referenced by madness::LoadBalanceDeux< NDIM >::print_tree().
|
inlineprivate |
Sums costs up the tree returning to everyone the total cost.
References madness::WorldContainer< keyT, valueT, hashfunT >::begin(), madness::WorldGopInterface::broadcast(), madness::WorldContainer< keyT, valueT, hashfunT >::end(), madness::WorldGopInterface::fence(), madness::WorldContainer< keyT, valueT, hashfunT >::find(), madness::LBNodeDeux< NDIM >::get_total_cost(), madness::World::gop, madness::LBNodeDeux< NDIM >::has_children(), madness::Key< NDIM >::level(), madness::nonlinear_vector_solver(), madness::WorldContainer< keyT, valueT, hashfunT >::owner(), madness::Key< NDIM >::parent(), madness::World::rank(), madness::LBNodeDeux< NDIM >::sum(), madness::WorldContainer< keyT, valueT, hashfunT >::task(), madness::LoadBalanceDeux< NDIM >::tree, and madness::LoadBalanceDeux< NDIM >::world.
Referenced by madness::LoadBalanceDeux< NDIM >::load_balance().
|
private |
|
private |