|
MADNESS 0.10.1
|
#include <madness/mra/mra.h>#include <madness/mra/lbdeux.h>#include <madness/world/test_utilities.h>#include <algorithm>#include <cmath>#include <memory>#include <string>#include <type_traits>#include <utility>#include <vector>
Classes | |
| struct | NaNCost |
| struct | NegativeRootCost |
| struct | ZeroCost |
| A guard, not a regression test: a zero root cost passed the old cost >= 0 filter too. More... | |
Typedefs | |
| template<std::size_t NDIM> | |
| using | Assignment = std::vector<std::pair<Key<NDIM>, ProcessID>> |
Functions | |
| template<typename costT> | |
| static bool | all_children_split_off (World &world, const real_function_3d &f, const costT &cost, const double root_cost, const double fac) |
| template<std::size_t NDIM> | |
| static bool | constructor_throws (const Assignment< NDIM > &assignment) |
| True only for MadnessException. An old-style throw "..." or a clean return is a failure. | |
| static double | gaussian (const coord_3d &r) |
| static Key< 1 > | key1 (Level n, Translation l) |
| static Key< 3 > | key3 (Level n, Translation x, Translation y, Translation z) |
| int | main (int argc, char **argv) |
| template<typename costT> | |
| static int | test_driver_keeps_root (World &world, const std::string &name, const costT &cost, const double fac) |
| Runs the real driver, then asks the returned map for the root and for every local function key. | |
| static int | test_driver_rejects_nonfinite_cost (World &world) |
| A non-finite cost must stop load_balance() on every rank, before it reaches the sort. | |
| static int | test_duplicate_key_throws (World &world) |
| static int | test_key_below_deepest_level (World &world) |
| static int | test_missing_root_throws (World &world) |
| static int | test_nearest_ancestor (World &world) |
| static int | test_rank_out_of_range_throws (World &world) |
| static int | test_unmatched_level_zero_key_throws (World &world) |
Variables | |
| static constexpr ProcessID | nproc = 3 |
| Rank bound for the hand-written maps, which use the ranks 0, 1 and 2. | |
| using Assignment = std::vector<std::pair<Key<NDIM>, ProcessID>> |
|
static |
True if load_balance(fac) splits every child off the root, so that only the root's own cost stays as its residual. partition() tests the remaining cost against 1.1 times the average before it subtracts each child, in descending order, so the last test sees the smallest child.
References c, f, madness::World::gop, madness::Key< NDIM >::level(), madness::Key< NDIM >::parent(), madness::World::size(), madness::WorldGopInterface::sum(), and madness::Key< NDIM >::translation().
Referenced by test_driver_keeps_root().
|
static |
True only for MadnessException. An old-style throw "..." or a clean return is a failure.
References madness::FunctionDefaults< NDIM >::pmap, and nproc.
Referenced by test_duplicate_key_throws(), test_missing_root_throws(), and test_rank_out_of_range_throws().
|
static |
|
static |
References madness::vec().
Referenced by madness::Key< D >::break_apart(), madness::FunctionImpl< T, NDIM >::Vphi_ij_u_op_NS< opT, LDIM >::compute_error_from_inaccurate_refinement(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::compute_error_from_inaccurate_refinement(), madness::FunctionImpl< T, LDIM >::dirac_convolution_op(), madness::FunctionImpl< T, LDIM >::do_dirac_convolution(), TestCalculationParameters::make_all_parameter_doubles(), TestCalculationParameters::make_all_parameters_for_two_keys(), madness::FunctionImpl< T, NDIM >::hartree_op< LDIM, leaf_opT >::make_child(), madness::FunctionImpl< T, NDIM >::multiply_op< LDIM >::make_child(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::make_child(), madness::FunctionImpl< T, NDIM >::recursive_apply_op< opT, LDIM >::make_child(), madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >::make_child(), madness::FunctionImpl< T, NDIM >::Vphi_ij_u_op_NS< opT, LDIM >::make_child(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_child(), madness::FunctionImpl< T, NDIM >::Vphi_ij_u_op_NS< opT, LDIM >::make_sum_coeffs(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs(), madness::ElectronCuspyBox_op< T, NDIM >::operator()(), madness::FunctionImpl< T, NDIM >::do_inner_local_on_demand< R >::operator()(), madness::FunctionImpl< T, NDIM >::hartree_op< LDIM, leaf_opT >::operator()(), madness::FunctionImpl< T, NDIM >::multiply_op< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::pointwise_multiplier< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::recursive_apply_op< opT, LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >::operator()(), madness::NuclearCuspyBox_op< T, NDIM >::operator()(), YetAnotherWrapperClass::operator()(), madness::FunctionImpl< T, LDIM >::project_out2(), test0(), test_duplicate_key_throws(), test_missing_root_throws(), test_nearest_ancestor(), test_rank_out_of_range_throws(), and test_unmatched_level_zero_key_throws().
|
static |
References madness::vec().
Referenced by test_key_below_deepest_level().
| int main | ( | int | argc, |
| char ** | argv ) |
References madness::WorldGopInterface::fence(), madness::finalize(), madness::World::gop, madness::initialize(), madness::FunctionDefaults< NDIM >::set_cubic_cell(), madness::FunctionDefaults< NDIM >::set_k(), madness::FunctionDefaults< NDIM >::set_thresh(), madness::startup(), test_driver_keeps_root(), test_driver_rejects_nonfinite_cost(), test_duplicate_key_throws(), test_key_below_deepest_level(), test_missing_root_throws(), test_nearest_ancestor(), test_rank_out_of_range_throws(), and test_unmatched_level_zero_key_throws().
|
static |
Runs the real driver, then asks the returned map for the root and for every local function key.
References madness::LoadBalanceDeux< NDIM >::add_tree(), all_children_split_off(), madness::test_output::checkpoint(), madness::test_output::end(), f, madness::FunctionFactory< T, NDIM >::f(), madness::FunctionDefaults< NDIM >::pmap, madness::LoadBalanceDeux< NDIM >::load_balance(), madness::name(), p(), madness::World::rank(), NegativeRootCost::root_cost, and madness::World::size().
Referenced by main().
|
static |
A non-finite cost must stop load_balance() on every rank, before it reaches the sort.
References madness::LoadBalanceDeux< NDIM >::add_tree(), madness::test_output::checkpoint(), madness::test_output::end(), f, madness::FunctionFactory< T, NDIM >::f(), madness::LoadBalanceDeux< NDIM >::load_balance(), and madness::World::rank().
Referenced by main().
|
static |
References madness::test_output::checkpoint(), constructor_throws(), madness::test_output::end(), key1(), and madness::World::rank().
Referenced by main().
|
static |
Each level-20 key below has the translation of its level-3 ancestor in the high 3 bits. The two level-3 entries are siblings, so a lookup that stops one level too high finds neither.
References madness::test_output::checkpoint(), madness::test_output::end(), madness::FunctionDefaults< NDIM >::pmap, key3(), nproc, and madness::World::rank().
Referenced by main().
|
static |
References madness::test_output::checkpoint(), constructor_throws(), madness::test_output::end(), key1(), and madness::World::rank().
Referenced by main().
|
static |
Mapped tree, with a distinct rank for each entry:
(0,0) -> 0
(1,1) -> 1
(2,2) -> 2
References madness::test_output::checkpoint(), madness::test_output::end(), madness::FunctionDefaults< NDIM >::pmap, key1(), nproc, and madness::World::rank().
Referenced by main().
|
static |
References madness::test_output::checkpoint(), constructor_throws(), madness::test_output::end(), key1(), nproc, and madness::World::rank().
Referenced by main().
|
static |
A level-0 key with a nonzero translation is not in the box, and only such a key can reach this branch, because the constructor requires the root.
References madness::test_output::checkpoint(), madness::test_output::end(), madness::FunctionDefaults< NDIM >::pmap, key1(), nproc, and madness::World::rank().
Referenced by main().
|
staticconstexpr |
Rank bound for the hand-written maps, which use the ranks 0, 1 and 2.
Referenced by madness::LBDeuxPmap< NDIM >::LBDeuxPmap(), madness::check_thread_binding(), constructor_throws(), SafeMPI::Intracomm::Create(), madness::gprofexit(), madness::LoadBalanceDeux< NDIM >::load_balance(), madness::Localizer::localize_cholesky(), main(), madness::LoadBalanceDeux< NDIM >::print_cost_per_rank(), SafeMPI::Intracomm::Split(), SafeMPI::Intracomm::Split_type(), test10(), test5(), test6(), test7(), test_key_below_deepest_level(), test_nearest_ancestor(), test_rank_out_of_range_throws(), test_unmatched_level_zero_key_throws(), and SafeMPI::Group::Translate_ranks().