diff --git a/test/ParallelIOTest.cpp b/test/ParallelIOTest.cpp index de6c89a39e..cb3e147120 100644 --- a/test/ParallelIOTest.cpp +++ b/test/ParallelIOTest.cpp @@ -1687,22 +1687,14 @@ TEST_CASE("append_mode", "[serial]") { "adios2": { - "use_group_table": false, - "engine": - { - "usesteps" : true - } + "use_group_table": false } })END"; std::string jsonConfigNew = R"END( { "adios2": { - "use_group_table": true, - "engine": - { - "usesteps" : true - } + "use_group_table": true } })END"; if (t == "bp" || t == "bp4" || t == "bp5") diff --git a/test/SerialIOTest.cpp b/test/SerialIOTest.cpp index b399329eb3..0d95296f40 100644 --- a/test/SerialIOTest.cpp +++ b/test/SerialIOTest.cpp @@ -4323,8 +4323,6 @@ TEST_CASE("adios2_bp5_flush", "[serial][adios2]") [adios2] [adios2.engine] -# Check that BP5 can also be used without steps -usesteps = false type = "bp5" preferred_flush_target = "disk" @@ -4343,7 +4341,6 @@ BufferChunkSize = 2147483646 # 2^31 - 2 [adios2] [adios2.engine] -usesteps = true type = "bp5" preferred_flush_target = "buffer" @@ -4361,7 +4358,6 @@ BufferChunkSize = 2147483646 # 2^31 - 2 [adios2] [adios2.engine] -usesteps = true type = "bp5" # preferred_flush_target = @@ -4384,7 +4380,6 @@ BufferChunkSize = 2147483646 # 2^31 - 2 [adios2] [adios2.engine] -usesteps = true type = "bp5" preferred_flush_target = "buffer_override" @@ -4402,7 +4397,6 @@ BufferChunkSize = 2147483646 # 2^31 - 2 [adios2] [adios2.engine] -usesteps = true type = "bp5" preferred_flush_target = "disk_override" @@ -4922,8 +4916,7 @@ this = "should not warn" void bp4_steps( std::string const &file, std::string const &options_write, - std::string const &options_read, - Access access = Access::READ_ONLY) + std::optional access = Access::READ_ONLY) { { Series writeSeries(file, Access::CREATE, options_write); @@ -4943,12 +4936,12 @@ void bp4_steps( } } - if (options_read.empty()) + if (!access.has_value()) { return; } - Series readSeries(file, access, options_read); + Series readSeries(file, *access); size_t last_iteration_index = 0; for (auto iteration : readSeries.readIterations()) @@ -4974,12 +4967,11 @@ void bp4_steps( TEST_CASE("bp4_steps", "[serial][adios2]") { - std::string useSteps = R"( + std::string bp4 = R"( { "ADIOS2": { "engine": { - "type": "bp4", - "usesteps": true + "type": "bp4" } } } @@ -4987,91 +4979,33 @@ TEST_CASE("bp4_steps", "[serial][adios2]") std::string nullcore = R"( { "adios2": { - "type": "nullcore", - "ENGINE": { - "type": "bp4", - "usesteps": true - } + "type": "nullcore" } } )"; - std::string dontUseSteps = R"( - # let's use TOML for this one - [adios2.engine] - type = "bp4" - UseSteps = false - )"; - // sing the yes no song - bp4_steps("../samples/bp4steps_yes_yes.bp", useSteps, useSteps); - bp4_steps("../samples/bp4steps_no_yes.bp", dontUseSteps, useSteps); - bp4_steps("../samples/bp4steps_yes_no.bp", useSteps, dontUseSteps); - bp4_steps("../samples/bp4steps_no_no.bp", dontUseSteps, dontUseSteps); - bp4_steps("../samples/nullcore.bp", nullcore, ""); - bp4_steps("../samples/bp4steps_default.bp", "{}", "{}"); - - // bp4_steps( - // "../samples/newlayout_bp4steps_yes_yes.bp", - // useSteps, - // useSteps, - // Access::READ_LINEAR); - // bp4_steps( - // "../samples/newlayout_bp4steps_yes_no.bp", - // useSteps, - // dontUseSteps, - // Access::READ_LINEAR); + bp4_steps("../samples/bp4steps.bp", bp4); + bp4_steps("../samples/bp4steps.bp", bp4, Access::READ_LINEAR); + bp4_steps("../samples/nullcore.bp", nullcore, std::nullopt); + bp4_steps("../samples/bp4steps_default.bp", "{}"); #if openPMD_HAS_ADIOS_2_9 /* * Do this whole thing once more, but this time use the new attribute * layout. */ - useSteps = R"( - { - "adios2": { - "use_group_table": true, - "engine": { - "type": "bp4", - "usesteps": true - } - } - } - )"; - dontUseSteps = R"( + bp4 = R"( { "adios2": { "use_group_table": true, "engine": { - "type": "bp4", - "usesteps": false + "type": "bp4" } } } )"; - // sing the yes no song - bp4_steps( - "../samples/newlayout_bp4steps_yes_yes.bp", - useSteps, - useSteps, - Access::READ_LINEAR); - bp4_steps("../samples/newlayout_bp4steps_yes_yes.bp", useSteps, useSteps); - bp4_steps( - "../samples/newlayout_bp4steps_yes_no.bp", useSteps, dontUseSteps); - bp4_steps( - "../samples/newlayout_bp4steps_no_yes.bp", dontUseSteps, useSteps); - bp4_steps( - "../samples/newlayout_bp4steps_no_no.bp", dontUseSteps, dontUseSteps); - - bp4_steps( - "../samples/newlayout_bp4steps_yes_yes.bp", - useSteps, - useSteps, - Access::READ_LINEAR); - bp4_steps( - "../samples/newlayout_bp4steps_yes_no.bp", - useSteps, - dontUseSteps, - Access::READ_LINEAR); + bp4_steps("../samples/newlayout_bp4steps.bp", bp4, Access::READ_LINEAR); + bp4_steps("../samples/newlayout_bp4steps.bp", bp4); #endif } #endif @@ -6539,10 +6473,7 @@ void chaotic_stream(std::string filename, bool variableBased) std::string jsonConfig = R"( { "adios2": { - "use_group_table": true, - "engine": { - "usesteps": true - } + "use_group_table": true } })"; @@ -7211,22 +7142,14 @@ TEST_CASE("append_mode", "[serial]") { "adios2": { - "use_group_table": false, - "engine": - { - "usesteps" : true - } + "use_group_table": false } })END"; std::string jsonConfigNew = R"END( { "adios2": { - "use_group_table": true, - "engine": - { - "usesteps" : true - } + "use_group_table": true } })END"; if (t == "bp" || t == "bp4" || t == "bp5") @@ -7273,11 +7196,7 @@ void append_mode_filebased(std::string const &extension) { "adios2": { - "use_group_table": true, - "engine": - { - "usesteps" : true - } + "use_group_table": true } })END"; auto writeSomeIterations = [](WriteIterations &&writeIterations,