Skip to content
Snippets Groups Projects
Commit cc116023 authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Fixing IO

parent 6b10922d
No related branches found
No related tags found
No related merge requests found
openfpm_io @ 0357b11b
Subproject commit c66d8ce6b84935972cc773ea457614bdb8707ea7
Subproject commit 0357b11b1c27cc519793659ddb22b3bbd16f14b3
......@@ -145,6 +145,64 @@ BOOST_AUTO_TEST_CASE( grid_dist_id_hdf5_load_test )
}
BOOST_AUTO_TEST_CASE( grid_dist_id_hdf5_load_test_diff_proc )
{
// Input data
size_t k = 200;
float ghost_part = 0.0;
// Domain
Box<2,float> domain({0.0,0.0},{1.0,1.0});
Vcluster<> & v_cl = create_vcluster();
// Skip this test on big scale
if (v_cl.getProcessingUnits() >= 32)
return;
// grid size
size_t sz[2];
sz[0] = k;
sz[1] = k;
// Ghost
Ghost<2,float> g(3);
// Distributed grid with id decomposition
grid_dist_id<2, float, aggregate<float>> g_dist(sz,domain,g);
g_dist.load("test_data/test_data_single.h5");
auto it = g_dist.getDomainIterator();
size_t count = 0;
bool match = true;
while (it.isNext())
{
//key
auto key = it.get();
//BOOST_CHECK_CLOSE(g_dist.template get<0>(key),1,0.0001);
//std::cout << "Element: " << g_dist.template get<0>(key) << std::endl;
auto keyg = g_dist.getGKey(key);
match &= g_dist.template get<0>(key) == keyg.get(0);
++it;
count++;
}
v_cl.sum(count);
v_cl.execute();
BOOST_REQUIRE_EQUAL(count, (size_t)k*k);
BOOST_REQUIRE_EQUAL(match,true);
}
BOOST_AUTO_TEST_CASE( grid_dist_id_hdf5_2GB_save_test )
{
float ghost_part = 0.0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment