|
MADNESS 0.10.1
|
Tests the MacroTaskQ and MacroTask classes.
More...
#include <madness/mra/mra.h>#include <madness/world/cloud.h>#include <madness/mra/macrotaskq.h>#include <madness/world/world.h>#include <madness/world/timing_utilities.h>#include <madness/mra/macrotaskpartitioner.h>#include "test_utilities.h"
Classes | |
| struct | gaussian |
| class | MicroTask< T, NDIM > |
| class | MicroTask1 |
| class | MicroTask2 |
| class | MixedTupleTask< elementT, elementR > |
| this task won't do anything, is mostly to check if the combinations compile More... | |
| class | ScalarTask |
| struct | slater |
| class | TupleTask |
| class | VectorOfScalarTask |
Functions | |
| int | check (World &universe, const double &ref, const double &test, const std::string msg) |
| int | check (World &universe, const real_function_3d &ref, const real_function_3d &test, const std::string msg) |
| template<typename T , std::size_t NDIM> | |
| int | check_vector (World &universe, const std::vector< Function< T, NDIM > > &ref, const std::vector< Function< T, NDIM > > &test, const std::string msg) |
| int | main (int argc, char **argv) |
| int | test_2d_partitioning (World &universe, const std::vector< real_function_3d > &v3) |
| int | test_deferred (World &universe, const std::vector< real_function_3d > &v3, const std::vector< real_function_3d > &ref) |
| template<typename T , std::size_t NDIM> | |
| int | test_immediate (World &universe, const std::vector< Function< T, NDIM > > &v3, const std::vector< Function< T, NDIM > > &ref) |
| int | test_mixed_tuple (World &universe, const std::vector< real_function_3d > &v3) |
| int | test_scalar_task (World &universe, const std::vector< real_function_3d > &v3) |
| each task accumulates into the same result | |
| int | test_task1 (World &universe, const std::vector< real_function_3d > &v3) |
| int | test_tuple_of_vectors (World &universe, const std::vector< real_function_3d > &v3) |
| each task accumulates into the same result | |
| int | test_twice (World &universe, const std::vector< real_function_3d > &v3, const std::vector< real_function_3d > &ref) |
| int | test_vector_of_scalar_task (World &universe, const std::vector< real_function_3d > &v3) |
Tests the MacroTaskQ and MacroTask classes.
For more information also see macrotask.h
The user defines a macrotask (an example is found in test_vectormacrotask.cc), the tasks are lightweight and carry only bookkeeping information, actual input and output are stored in a cloud (see cloud.h)
The user-defined MacroTask is derived from MacroTaskOperationBase and must implement the call operator method. A heterogeneous task queue is possible.
| int check | ( | World & | universe, |
| const double & | ref, | ||
| const double & | test, | ||
| const std::string | msg | ||
| ) |
References madness::error(), madness::print(), madness::World::rank(), and test().
Referenced by test_scalar_task(), test_task1(), test_tuple_of_vectors(), and test_vector_of_scalar_task().
| int check | ( | World & | universe, |
| const real_function_3d & | ref, | ||
| const real_function_3d & | test, | ||
| const std::string | msg | ||
| ) |
| int check_vector | ( | World & | universe, |
| const std::vector< Function< T, NDIM > > & | ref, | ||
| const std::vector< Function< T, NDIM > > & | test, | ||
| const std::string | msg | ||
| ) |
References madness::error(), madness::norm2(), madness::print(), madness::World::rank(), and test().
Referenced by test_2d_partitioning(), and test_twice().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
References f1, madness::WorldGopInterface::fence(), madness::finalize(), madness::World::gop, madness::World::id(), madness::initialize(), madness::print(), madness::World::rank(), madness::FunctionDefaults< NDIM >::set_cubic_cell(), madness::FunctionDefaults< NDIM >::set_k(), madness::FunctionDefaults< NDIM >::set_tensor_type(), madness::FunctionDefaults< NDIM >::set_thresh(), madness::World::size(), madness::startup(), madness::timer::tag(), test_2d_partitioning(), test_deferred(), test_mixed_tuple(), test_scalar_task(), test_task1(), test_tuple_of_vectors(), test_twice(), test_vector_of_scalar_task(), and madness::TT_2D.
| int test_2d_partitioning | ( | World & | universe, |
| const std::vector< real_function_3d > & | v3 | ||
| ) |
References check_vector(), madness::MacroTaskOperationBase::partitioner, madness::MacroTaskInfo::preset(), madness::print(), madness::World::rank(), and task().
Referenced by main().
| int test_deferred | ( | World & | universe, |
| const std::vector< real_function_3d > & | v3, | ||
| const std::vector< real_function_3d > & | ref | ||
| ) |
References madness::test_output::checkpoint(), madness::test_output::end(), madness::error(), madness::MacroTaskInfo::get_all_preset_names(), madness::norm2(), madness::MacroTaskInfo::preset(), madness::print(), madness::World::rank(), madness::test_output::set_cout_to_terminal(), stats, madness::MacroTaskInfo::StoreFunction, madness::MacroTaskInfo::StoreFunctionViaPointer, and task().
Referenced by main().
| int test_mixed_tuple | ( | World & | universe, |
| const std::vector< real_function_3d > & | v3 | ||
| ) |
References madness::print(), and madness::World::rank().
Referenced by main().
| int test_scalar_task | ( | World & | universe, |
| const std::vector< real_function_3d > & | v3 | ||
| ) |
each task accumulates into the same result
References check(), madness::ScalarResult< T >::get(), madness::print(), and madness::World::rank().
Referenced by main().
| int test_task1 | ( | World & | universe, |
| const std::vector< real_function_3d > & | v3 | ||
| ) |
References check(), madness::print(), madness::World::rank(), and madness::MacroTask< taskT >::set_debug().
Referenced by main().
| int test_tuple_of_vectors | ( | World & | universe, |
| const std::vector< real_function_3d > & | v3 | ||
| ) |
each task accumulates into the same result
References check(), madness::norm2(), madness::print(), and madness::World::rank().
Referenced by main().
| int test_twice | ( | World & | universe, |
| const std::vector< real_function_3d > & | v3, | ||
| const std::vector< real_function_3d > & | ref | ||
| ) |
References check_vector(), madness::MacroTaskInfo::preset(), madness::print(), madness::World::rank(), and task().
Referenced by main().
| int test_vector_of_scalar_task | ( | World & | universe, |
| const std::vector< real_function_3d > & | v3 | ||
| ) |
References check(), madness::error(), madness::print(), and madness::World::rank().
Referenced by main().