Skip to content

Commit 5eaf97b

Browse files
committed
Fixes
1 parent 4e69a6e commit 5eaf97b

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

src/IO/ADIOS/ADIOS2File.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,11 @@ namespace
344344

345345
size_t ADIOS2File::currentStep()
346346
{
347-
if (nonpersistentEngine(m_impl->m_engineType))
347+
if (auto step_selection = stepSelection(); step_selection.has_value())
348+
{
349+
return *step_selection;
350+
}
351+
else if (nonpersistentEngine(m_impl->m_engineType))
348352
{
349353
return m_currentStep;
350354
}

src/IO/ADIOS/ADIOS2IOHandler.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,6 +1625,7 @@ void ADIOS2IOHandlerImpl::readAttributeAllsteps(
16251625

16261626
#if OPENPMD_PREPARSE_EVERYTHING
16271627
detail::ADIOS2File &ba = getFileData(file, IfFileNotOpen::ThrowError);
1628+
auto type = detail::attributeInfo(ba.m_IO, name, /* verbose = */ true);
16281629
#if openPMD_HAVE_MPI
16291630
auto adios = [&]() {
16301631
if (m_communicator.has_value())
@@ -1662,11 +1663,7 @@ void ADIOS2IOHandlerImpl::readAttributeAllsteps(
16621663
engine.Close();
16631664
auto &attributes = ba.attributes();
16641665
switchType<ReadAttributeAllstepsFullPreparsing>(
1665-
preload.at(0).attributeType(param.name),
1666-
preload,
1667-
IO,
1668-
param.name,
1669-
*param.resource);
1666+
type, preload, IO, name, *param.resource);
16701667
attributes.m_data = std::move(preload);
16711668
#else
16721669
auto read_from_file_in_serial = [&]() {

test/SerialIOTest.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5950,11 +5950,8 @@ void variableBasedSeries(std::string const &file)
59505950
{
59515951
REQUIRE(
59525952
iteration.getAttribute("changing_value").get<unsigned>() ==
5953-
(supportsModifiableAttributes
5954-
? (access == Access::READ_LINEAR
5955-
? iteration.iterationIndex
5956-
: 9)
5957-
: 0));
5953+
(supportsModifiableAttributes ? iteration.iterationIndex
5954+
: 0));
59585955
}
59595956
auto E_x = iteration.meshes["E"]["x"];
59605957
REQUIRE(E_x.getDimensionality() == 1);

0 commit comments

Comments
 (0)