8 #ifndef SRC_GRID_GRID_DIST_ID_HDF5_CHCKPNT_RESTART_TEST_HPP_
9 #define SRC_GRID_GRID_DIST_ID_HDF5_CHCKPNT_RESTART_TEST_HPP_
11 #include "Grid/grid_dist_id.hpp"
13 BOOST_AUTO_TEST_SUITE( gd_hdf5_chckpnt_rstrt_test )
15 BOOST_AUTO_TEST_CASE( grid_dist_id_hdf5_save_test )
21 float ghost_part = 0.0;
29 if (v_cl.getProcessingUnits() >= 32)
44 auto & dec = g_dist.getDecomposition();
47 bool val = dec.check_consistency();
48 BOOST_REQUIRE_EQUAL(val,
true);
52 auto it = g_dist.getDomainIterator();
59 auto keyg = g_dist.getGKey(
key);
61 g_dist.template get<0>(
key) = keyg.get(0);
68 v_cl.allGather(count,count_total);
73 for (
size_t i = 0; i < count_total.
size(); i++)
74 sum += count_total.get(i);
79 g_dist.save(
"grid_dist_id.h5");
83 BOOST_AUTO_TEST_CASE( grid_dist_id_hdf5_load_test )
89 float ghost_part = 0.0;
97 if (v_cl.getProcessingUnits() >= 32)
111 g_dist.getDecomposition().write(
"Before_load_grid_decomposition");
112 g_dist.write(
"Before_Loaded_grid");
117 g_dist.load(
"grid_dist_id.h5");
120 g_dist.write(
"Loaded_grid");
121 g_dist.getDecomposition().write(
"Loaded_grid_decomposition");
123 auto it = g_dist.getDomainIterator();
135 auto keyg = g_dist.getGKey(
key);
137 BOOST_REQUIRE_EQUAL(g_dist.template get<0>(
key), keyg.get(0));
144 v_cl.allGather(count,count_total);
149 for (
size_t i = 0; i < count_total.
size(); i++)
150 sum += count_total.get(i);
152 BOOST_REQUIRE_EQUAL(sum, (
size_t)k*k);
156 BOOST_AUTO_TEST_SUITE_END()
Implementation of VCluster class.
This class decompose a space into sub-sub-domains and distribute them across processors.
This is a distributed grid.
void start()
Start the timer.
This class represent an N-dimensional box.
This class is a trick to indicate the compiler a specific specialization pattern. ...
It model an expression expr1 + ... exprn.
Class for cpu time benchmarking.
void stop()
Stop the timer.