|
MADNESS 0.10.1
|
#include <madness/mra/mra.h>#include <madness/world/cloud.h>#include <madness/mra/macrotaskq.h>#include <madness/world/test_utilities.h>#include <madness/world/ranks_and_hosts.h>#include <memory>#include "memory_measurement.h"
Classes | |
| class | custom_serialize_tester |
| this class stores different member variables in different records of the cloud More... | |
| struct | gaussian |
Typedefs | |
| template<typename T > | |
| using | is_world_constructible = std::is_constructible< T, World & > |
Functions | |
| int | chunk_example (World &universe) |
| test the cloud with message larger than chunk size set in cloud.replicate() | |
| int | main (int argc, char **argv) |
| template<typename T , std::size_t NDIM> | |
| double | norm (const Function< T, NDIM > &f1) |
| template<typename T , std::size_t NDIM> | |
| double | norm (const std::vector< Function< T, NDIM > > &f1) |
| template<typename T > | |
| double | norm (const std::vector< T > &v) |
| template<typename T > | |
| double | norm (const T i1) |
| template<typename T > | |
| double | norm (const Tensor< T > &t) |
| template<typename T , typename... Ts> | |
| void | print0 (const World &world, const T &t, const Ts &... ts) |
| int | simple_example (World &universe) |
| a simple example for how to use the cloud for inter-world communication | |
| int | test_batch_fetch_chunked (World &universe) |
| a payload spanning several MPI messages must arrive intact | |
| int | test_batch_fetch_of_missing_record (World &universe) |
| fetching a record nobody stored must fail where the failure can be attributed | |
| int | test_batch_store_and_fetch (World &universe) |
| test the owner-pinned batch store and its point-to-point fetch | |
| int | test_copy_function_from_other_world (World &universe) |
| given a function in the universe, this function will copy it to a subworld | |
| int | test_copy_function_from_other_world_through_cloud (World &universe) |
| int | test_custom_serialization (World &universe) |
| int | test_custom_worldobject (World &universe, World &subworld, Cloud &cloud) |
| test storing and loading a custom WorldObject, used e.g. for the scalar output of a macrotask | |
| int | test_pointer_to_funcimpl (World &universe, World &subworld) |
| int | test_replication_policy (World &universe) |
| test replication of a function and/or cloud over nodes and ranks | |
| int | test_tuple (World &universe, World &subworld, const real_function_3d &f1, const real_function_3d &f2) |
| int | test_twice (World &universe, World &subworld, const std::vector< double > &vd) |
| using is_world_constructible = std::is_constructible<T, World&> |
| int chunk_example | ( | World & | universe | ) |
test the cloud with message larger than chunk size set in cloud.replicate()
References std::abs(), madness::Cloud::clear_cache(), madness::Cloud::load(), madness::nonlinear_vector_solver(), madness::World::rank(), madness::Cloud::replicate(), madness::Cloud::store(), sum, and test_size().
Referenced by main().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
References madness::arg(), chunk_example(), madness::Cloud::clear_cache(), madness::MacroTaskQ::create_worlds(), madness::error(), f1, f2, f3, madness::WorldGopInterface::fence(), madness::Tensor< T >::fillrandom(), madness::finalize(), madness::World::gop, madness::World::id(), madness::initialize(), madness::Cloud::load(), madness::nonlinear_vector_solver(), norm(), madness::print(), madness::World::rank(), madness::Cloud::set_force_load_from_cache(), madness::MacroTaskQ::set_pmap(), madness::FunctionDefaults< NDIM >::set_thresh(), simple_example(), madness::World::size(), madness::startup(), madness::Cloud::store(), test_batch_fetch_chunked(), test_batch_fetch_of_missing_record(), test_batch_store_and_fetch(), test_copy_function_from_other_world(), test_copy_function_from_other_world_through_cloud(), test_custom_serialization(), test_custom_worldobject(), test_pointer_to_funcimpl(), test_replication_policy(), test_tuple(), and test_twice().
References f1.
| double norm | ( | const std::vector< Function< T, NDIM > > & | f1 | ) |
References f1, and madness::norm2().
| double norm | ( | const T | i1 | ) |
References madness::nonlinear_vector_solver().
Referenced by slymer::PrimitiveGaussian::PrimitiveGaussian(), a_fit(), madness::adq1(), apbar_fit(), bshrel_fit(), madness::SRConf< T >::check_right_orthonormality(), compute_energy(), compute_energy_with_U(), madness::Function< T, NDIM >::constexpr(), converge(), converge(), converge2s(), madness::Znemo::custom_guess(), madness::FunctionImpl< T, NDIM >::do_apply_directed_screening(), madness::FunctionImpl< T, NDIM >::do_apply_kernel2(), doit(), gauss_3d(), gauss_3d(), gauss_6d(), sgl_guess::get_wf(), madness::GMRES(), madness::CCTimer::info(), iterate(), iterate(), iterate(), iterate(), iterate(), iterate(), iterate(), iterate_ground(), iterate_ground(), madness::CC2::iterate_singles(), main(), main(), madness::ConvolutionData1D< Q >::make_approx(), madness::TDHF::make_virtuals(), madness::nearlyEqual(), Fcwf::normalize(), madness::SRConf< T >::normalize(), AnsatzBase::normalize(), madness::GenTensor< T >::normf(), madness::op_leaf_op< T, NDIM, opT >::operator()(), madness::hartree_leaf_op< T, NDIM >::operator()(), madness::hartree_convolute_leaf_op< T, NDIM, LDIM, opT >::operator()(), madness::FunctionImpl< T, NDIM >::do_norm2sq_local::operator()(), madness::FunctionImpl< T, NDIM >::do_check_symmetry_local::operator()(), madness::operator<<(), pbar_fit(), madness::Leaf_op< T, NDIM, opT, specialboxT >::post_screening(), print_info(), print_info(), madness::FunctionNode< T, NDIM >::print_json(), madness::FunctionImpl< T, NDIM >::print_size(), madness::CCPairFunction< T, NDIM >::print_size(), print_stats(), print_stats(), Calculation::project_potential_basis(), projector_external_dof(), madness::MolecularOptimizer::projector_external_dof(), propagate(), slymer::NWChem_Interface::read_basis_set(), madness::FunctionNode< T, NDIM >::recompute_snorm_and_dnorm(), run(), simple_example(), madness::Nemo::solve_cphf(), madness::GenTensor< T >::svd_normf(), tbar_fit(), test(), test_adaptive_tree(), test_basic(), test_bsh(), madness::Znemo::test_compute_current_density(), test_construction_optimization(), test_conversion(), test_convolution(), test_coulomb(), test_exchange(), test_inner(), test_molecular_grid(), test_opdir(), test_orthogonalization(), test_partial_inner_3d(), test_qm(), test_recursive_application(), test_unaryop(), madness::Diamagnetic_potential_factor::test_vector_potentials(), tightgauss_3d(), madness::unitvec(), and madness::FunctionImpl< T, NDIM >::vtransform_doit().
| double norm | ( | const Tensor< T > & | t | ) |
References madness::Tensor< T >::normf().
| void print0 | ( | const World & | world, |
| const T & | t, | ||
| const Ts &... | ts | ||
| ) |
References ENDL, madness::nonlinear_vector_solver(), madness::print_helper(), and madness::World::rank().
Referenced by test_copy_function_from_other_world(), and test_copy_function_from_other_world_through_cloud().
| int simple_example | ( | World & | universe | ) |
a simple example for how to use the cloud for inter-world communication
Notes:
References madness::Cloud::clear_cache(), madness::MacroTaskQ::create_worlds(), madness::WorldGopInterface::fence(), madness::World::gop, madness::World::id(), madness::Cloud::load(), madness::nonlinear_vector_solver(), norm(), madness::Function< T, NDIM >::norm2(), madness::print(), madness::World::rank(), madness::MacroTaskQ::set_pmap(), madness::Cloud::set_storing_policy(), madness::World::size(), madness::Cloud::store(), madness::Cloud::StoreFunction, and test_simple().
Referenced by main().
| int test_batch_fetch_chunked | ( | World & | universe | ) |
a payload spanning several MPI messages must arrive intact
A unit test cannot afford a 2 GiB batch, so it lowers the chunk size instead, and checks the payload really is larger so it cannot pass vacuously. Needs two ranks to leave the local leg.
References madness::BatchTransport::batch_chunk_bytes(), madness::test_output::checkpoint(), madness::MacroTaskQ::create_worlds(), madness::test_output::end(), madness::WorldGopInterface::fence(), madness::Cloud::fetch_batch_p2p(), madness::Cloud::get_statistics(), madness::World::gop, nfunc, madness::nonlinear_vector_solver(), madness::World::rank(), madness::BatchTransport::set_batch_chunk_bytes(), madness::MacroTaskQ::set_pmap(), madness::World::size(), and madness::Cloud::store_batch().
Referenced by main().
| int test_batch_fetch_of_missing_record | ( | World & | universe | ) |
fetching a record nobody stored must fail where the failure can be attributed
The owner discovers it holds no such record inside a comm-thread AM handler, where a throw would escape every task-level handler and abort with no task id and no what(). It has to surface here instead, in task context, as a named exception. An abort rather than a caught throw is a real failure of the transport, not a flaky test.
References madness::test_output::checkpoint(), madness::MacroTaskQ::create_worlds(), e(), madness::test_output::end(), madness::WorldGopInterface::fence(), madness::Cloud::fetch_batch_p2p(), madness::World::gop, madness::nonlinear_vector_solver(), madness::print(), madness::World::rank(), madness::Cloud::register_batch_owner(), madness::MacroTaskQ::set_pmap(), and madness::World::size().
Referenced by main().
| int test_batch_store_and_fetch | ( | World & | universe | ) |
test the owner-pinned batch store and its point-to-point fetch
Two ranks are needed to exercise a remote owner; with one rank only the local leg is reached, which is why the MPI variant of this test carries the coverage.
References madness::Cloud::batch_owner(), madness::test_output::checkpoint(), madness::Cloud::clear_cache(), madness::MacroTaskQ::create_worlds(), madness::Cloud::deserialize_batch_p2p(), madness::test_output::end(), madness::WorldGopInterface::fence(), madness::Cloud::fetch_batch_p2p(), madness::World::gop, madness::WorldGopInterface::max(), madness::WorldGopInterface::min(), nfunc, madness::nonlinear_vector_solver(), madness::World::rank(), madness::Cloud::request_batch_bytes_async(), madness::MacroTaskQ::set_pmap(), madness::World::size(), and madness::Cloud::store_batch().
Referenced by main().
| int test_copy_function_from_other_world | ( | World & | universe | ) |
given a function in the universe, this function will copy it to a subworld
References madness::test_output::checkpoint(), madness::copy(), madness::MacroTaskQ::create_worlds(), madness::test_output::end(), madness::WorldGopInterface::fence(), madness::World::gop, madness::World::id(), madness::nonlinear_vector_solver(), madness::Function< T, NDIM >::norm2(), madness::print(), print0(), madness::World::rank(), madness::MacroTaskQ::set_pmap(), and madness::World::size().
Referenced by main().
| int test_copy_function_from_other_world_through_cloud | ( | World & | universe | ) |
References madness::test_output::checkpoint(), madness::Cloud::clear_cache(), madness::MacroTaskQ::create_worlds(), madness::test_output::end(), madness::WorldGopInterface::fence(), madness::Cloud::gather_memory_statistics(), madness::World::gop, madness::World::id(), madness::Cloud::load(), madness::nonlinear_vector_solver(), madness::Function< T, NDIM >::norm2(), madness::print(), print0(), madness::World::rank(), madness::rank_to_host_and_rss_map(), madness::MacroTaskQ::set_pmap(), madness::Cloud::set_storing_policy(), madness::World::size(), stats, madness::Cloud::store(), madness::Cloud::StoreFunction, and madness::Cloud::StoreFunctionPointer.
Referenced by main().
| int test_custom_serialization | ( | World & | universe | ) |
References madness::test_output::checkpoint(), madness::Cloud::clear(), madness::test_output::end(), madness::WorldGopInterface::fence(), madness::World::gop, custom_serialize_tester::i, madness::Cloud::load(), madness::nonlinear_vector_solver(), madness::test_output::set_cout_to_terminal(), madness::Cloud::set_debug(), and madness::Cloud::store().
Referenced by main().
test storing and loading a custom WorldObject, used e.g. for the scalar output of a macrotask
References madness::test_output::end(), madness::error(), madness::Cloud::load(), madness::nonlinear_vector_solver(), madness::print(), madness::World::rank(), madness::Cloud::set_debug(), madness::Cloud::set_force_load_from_cache(), madness::MacroTaskQ::set_pmap(), and madness::Cloud::store().
Referenced by main().
References madness::Cloud::clear_cache(), madness::WorldGopInterface::fence(), madness::Function< T, NDIM >::get_impl(), madness::World::gop, madness::World::id(), madness::Cloud::load(), madness::nonlinear_vector_solver(), madness::Function< T, NDIM >::set_impl(), madness::MacroTaskQ::set_pmap(), madness::World::size(), and madness::Cloud::store().
Referenced by main().
| int test_replication_policy | ( | World & | universe | ) |
test replication of a function and/or cloud over nodes and ranks
References madness::WorldGopInterface::broadcast_serializable(), madness::test_output::checkpoint(), madness::Cloud::clear_cache(), madness::MacroTaskInfo::cloud_distribution_policy, madness::copy(), madness::MacroTaskQ::create_worlds(), madness::test_output::end(), madness::f, madness::Function< T, NDIM >::fence(), madness::WorldGopInterface::fence(), madness::Cloud::gather_memory_statistics(), madness::get_hostname(), madness::World::gop, madness::World::id(), madness::Cloud::load(), MADNESS_CHECK_THROW, madness::nonlinear_vector_solver(), madness::Function< T, NDIM >::norm2(), madness::primary_ranks_per_host(), madness::print(), madness::MacroTaskInfo::ptr_target_distribution_policy, madness::World::rank(), madness::ranks_per_host(), madness::Cloud::replicate_according_to_policy(), madness::test_output::set_cout_to_terminal(), madness::MacroTaskQ::set_pmap(), madness::Cloud::set_replication_policy(), madness::Cloud::set_storing_policy(), madness::World::size(), stats, madness::MacroTaskInfo::storage_policy, madness::Cloud::store(), madness::MacroTaskInfo::StoreFunction, madness::MacroTaskInfo::StorePointerToFunction, madness::MacroTaskInfo::to_cloud_storage_policy(), madness::validate_distribution_type(), and madness::Cloud::validate_replication_policy().
Referenced by main().
| int test_tuple | ( | World & | universe, |
| World & | subworld, | ||
| const real_function_3d & | f1, | ||
| const real_function_3d & | f2 | ||
| ) |
References madness::Cloud::clear_cache(), madness::error(), f1, f2, madness::Cloud::load(), madness::nonlinear_vector_solver(), madness::norm2(), madness::Cloud::set_debug(), madness::Cloud::set_force_load_from_cache(), madness::MacroTaskQ::set_pmap(), madness::Cloud::store(), and test_tuple().
Referenced by main(), and test_tuple().