8 #define BOOST_TEST_DYN_LINK
9 #include <boost/test/unit_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" + std::to_string(v_cl.getProcessingUnits()));
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.load(
"grid_dist_id.h5" + std::to_string(v_cl.getProcessingUnits()));
113 auto it = g_dist.getDomainIterator();
126 auto keyg = g_dist.getGKey(
key);
128 match &= g_dist.template get<0>(
key) == keyg.get(0);
135 v_cl.allGather(count,count_total);
140 for (
size_t i = 0; i < count_total.
size(); i++)
141 sum += count_total.get(i);
143 BOOST_REQUIRE_EQUAL(sum, (
size_t)k*k);
144 BOOST_REQUIRE_EQUAL(match,
true);
148 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.