Skip to content

Commit

Permalink
[WIP] Remove adios2.usesteps, set it always to true
Browse files Browse the repository at this point in the history
This uncovered loads of bugs
  • Loading branch information
franzpoeschel committed Oct 18, 2023
1 parent f2db458 commit 49b52e3
Show file tree
Hide file tree
Showing 7 changed files with 119 additions and 125 deletions.
9 changes: 6 additions & 3 deletions include/openPMD/IO/ADIOS/ADIOS2IOHandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ class ADIOS2IOHandlerImpl
* If the iteration encoding is variableBased, we default to using a group
* table, since it is the only reliable way to recover currently active
* groups.
* If group-based encoding is used without group table, then
* READ_RANDOM_ACCESS is forbidden as it will be unreliable in reporting
* currently available data.
*/
IterationEncoding m_iterationEncoding = IterationEncoding::groupBased;
/**
Expand Down Expand Up @@ -1064,7 +1067,7 @@ namespace detail
* without steps. This is not a workaround since not using steps,
* while inefficient in ADIOS2, is something that we support.
*/
NoStream,
ReadWithoutStream,
/**
* Rationale behind this state:
* When user code opens a Series, series.iterations should contain
Expand Down Expand Up @@ -1152,8 +1155,8 @@ namespace detail
void create_IO();

void configure_IO(ADIOS2IOHandlerImpl &impl);
void configure_IO_Read(std::optional<bool> userSpecifiedUsesteps);
void configure_IO_Write(std::optional<bool> userSpecifiedUsesteps);
void configure_IO_Read();
void configure_IO_Write();
};

} // namespace detail
Expand Down
9 changes: 9 additions & 0 deletions include/openPMD/IO/AbstractIOHandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "openPMD/IO/Access.hpp"
#include "openPMD/IO/Format.hpp"
#include "openPMD/IO/IOTask.hpp"
#include "openPMD/IterationEncoding.hpp"
#include "openPMD/config.hpp"

#if openPMD_HAVE_MPI
Expand Down Expand Up @@ -180,6 +181,12 @@ class AbstractIOHandler
{
friend class Series;

public:
/* @todo access control, remove this from open_file, create_file tasks,
* remove the same field from ADIOS2IOHandlerImpl
*/
IterationEncoding m_encoding = IterationEncoding::groupBased;

private:
void setIterationEncoding(IterationEncoding encoding)
{
Expand All @@ -193,6 +200,8 @@ class AbstractIOHandler
// do we really want to have those as const members..?
*const_cast<Access *>(&m_backendAccess) = Access::CREATE;
}

m_encoding = encoding;
}

public:
Expand Down
2 changes: 1 addition & 1 deletion include/openPMD/cli/ls.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ namespace cli
{
auto s = Series(
argv[1],
Access::READ_ONLY,
Access::READ_LINEAR,
R"({"defer_iteration_parsing": true})");

helper::listSeries(s, true, std::cout);
Expand Down
Loading

0 comments on commit 49b52e3

Please sign in to comment.