Skip to content

Commit

Permalink
Fix tests in new schema
Browse files Browse the repository at this point in the history
Note: ADIOS2 needs at least one defined variable to find any more steps
than only the first one.
  • Loading branch information
franzpoeschel committed Oct 26, 2022
1 parent 6d492b1 commit 1a85aa2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/SerialIOTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6317,11 +6317,14 @@ void unfinished_iteration_test(
std::string file = std::string("../samples/unfinished_iteration") +
(encoding == IterationEncoding::fileBased ? "_%T." : ".") + ext;
{
std::vector<int> data{0, 1, 2, 3, 4};
Series write(file, Access::CREATE, config);
auto it0 = write.writeIterations()[0];
it0.meshes["E"]["x"].resetDataset({Datatype::INT, {5}});
it0.meshes["E"]["x"].storeChunk(data, {0}, {5});
auto it5 = write.writeIterations()[5];
it5.meshes["E"]["x"].resetDataset({Datatype::INT, {5}});
it5.meshes["E"]["x"].storeChunk(data, {0}, {5});
;
/*
* With enabled invasive tests, this attribute will let the Iteration
Expand All @@ -6330,6 +6333,7 @@ void unfinished_iteration_test(
it5.setAttribute("__openPMD_internal_fail", "asking for trouble");
auto it10 = write.writeIterations()[10];
it10.meshes["E"]["x"].resetDataset({Datatype::INT, {5}});
it10.meshes["E"]["x"].storeChunk(data, {0}, {5});
it10.setAttribute("__openPMD_internal_fail", "playing nice again");
auto e_density = it10.meshes["e_density"][RecordComponent::SCALAR];
auto electron_x = it10.particles["e"]["position"]["x"];
Expand Down

0 comments on commit 1a85aa2

Please sign in to comment.