@@ -1624,9 +1624,9 @@ void ADIOS2IOHandlerImpl::readAttributeAllsteps(
16241624 auto file = refreshFileFromParent (writable, /* preferParentFile = */ false );
16251625 auto pos = setAndGetFilePosition (writable);
16261626 auto name = nameOfAttribute (writable, param.name );
1627+ detail::ADIOS2File &ba = getFileData (file, IfFileNotOpen::ThrowError);
16271628
16281629#if OPENPMD_PREPARSE_EVERYTHING
1629- detail::ADIOS2File &ba = getFileData (file, IfFileNotOpen::ThrowError);
16301630 auto type = detail::attributeInfo (ba.m_IO , name, /* verbose = */ true );
16311631#if openPMD_HAVE_MPI
16321632 auto adios = [&]() {
@@ -1643,10 +1643,11 @@ void ADIOS2IOHandlerImpl::readAttributeAllsteps(
16431643 adios2::ADIOS adios;
16441644#endif
16451645 auto IO = adios.DeclareIO (" PreparseSnapshots" );
1646- // @todo check engine type
1647- IO.SetEngine ( realEngineType ());
1646+ IO. SetEngine (ba. m_IO . EngineType ());
1647+ IO.SetParameters (ba. m_IO . Parameters ());
16481648 IO.SetParameter (" StreamReader" , " ON" ); // this be for BP4
16491649 auto engine = IO.Open (fullPath (*file), adios2::Mode::Read);
1650+
16501651 std::vector<detail::PreloadAdiosAttributes> preload;
16511652 preload.reserve (engine.Steps ());
16521653 adios2::StepStatus status;
@@ -1671,8 +1672,8 @@ void ADIOS2IOHandlerImpl::readAttributeAllsteps(
16711672 auto read_from_file_in_serial = [&]() {
16721673 adios2::ADIOS adios;
16731674 auto IO = adios.DeclareIO (" PreparseSnapshots" );
1674- // @todo check engine type
1675- IO.SetEngine ( realEngineType ());
1675+ IO. SetEngine (ba. m_IO . EngineType ());
1676+ IO.SetParameters (ba. m_IO . Parameters ());
16761677 IO.SetParameter (" StreamReader" , " ON" ); // this be for BP4
16771678 auto engine = IO.Open (fullPath (*file), adios2::Mode::Read);
16781679 auto status = engine.BeginStep ();
0 commit comments