MADNESS  0.10.1
Classes | Typedefs | Functions
test_cloud.cc File Reference
#include <madness/mra/mra.h>
#include <madness/world/cloud.h>
#include <madness/mra/macrotaskq.h>
#include <madness/world/test_utilities.h>
Include dependency graph for test_cloud.cc:

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() More...
 
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)
 
void simple_example (World &universe)
 a simple example for how to use the cloud for inter-world communication More...
 
int test_custom_serialization (World &universe, Cloud &cloud)
 
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 More...
 

Typedef Documentation

◆ is_world_constructible

template<typename T >
using is_world_constructible = std::is_constructible<T, World &>

Function Documentation

◆ chunk_example()

int chunk_example ( World universe)

test the cloud with message larger than chunk size set in cloud.replicate()

References std::abs(), madness::test_output::end(), madness::Cloud::load(), madness::Cloud::replicate(), madness::Cloud::store(), and madness::sum().

Referenced by main().

◆ main()

int main ( int  argc,
char **  argv 
)

◆ norm() [1/5]

template<typename T , std::size_t NDIM>
double norm ( const Function< T, NDIM > &  f1)

References f1.

◆ norm() [2/5]

template<typename T , std::size_t NDIM>
double norm ( const std::vector< Function< T, NDIM >> &  f1)

References f1, and madness::norm2().

◆ norm() [3/5]

template<typename T >
double norm ( const std::vector< T > &  v)

References e(), and v.

◆ norm() [4/5]

template<typename T >
double norm ( const T  i1)

Referenced by main(), and simple_example().

◆ norm() [5/5]

template<typename T >
double norm ( const Tensor< T > &  t)

◆ simple_example()

void simple_example ( World universe)

a simple example for how to use the cloud for inter-world communication

Notes:

  • during the subworld section no universe-wide fence must be invoked, including the creation of universe WorldObjects – they must be constructed before
  • Certain operation can be performed between objects living in different world (e.g. Function::operator+=) – store/lood pointers to these universe-wide world objects
  • when the subworld is destroyed all subworld objects must have been destroyed
  • subworld objects will be destroyed only at subworld fences

References madness::Cloud::clear_cache(), madness::MacroTaskQ::create_worlds(), madness::WorldGopInterface::fence(), gaussian(), madness::World::gop, madness::World::id(), madness::Cloud::load(), norm(), madness::Function< T, NDIM >::norm2(), madness::print(), madness::World::rank(), madness::MacroTaskQ::set_pmap(), madness::World::size(), and madness::Cloud::store().

Referenced by main().

◆ test_custom_serialization()

int test_custom_serialization ( World universe,
Cloud cloud 
)

◆ test_custom_worldobject()

int test_custom_worldobject ( World universe,
World subworld,
Cloud cloud 
)