Skip to content

Commit

Permalink
fix: IO object has a flag m_ReadStreaming set to false initially but …
Browse files Browse the repository at this point in the history
…set to true by a reader engine in the first BeginStep. If later a second reader is created using the existing IO object, the mode stayed true, which breaks the Open() routine processing all variables and steps. Now each reader initializes this flag to false to ensure running properly.
  • Loading branch information
pnorbert committed Jul 29, 2021
1 parent 779310a commit 2bfb07f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/adios2/engine/bp3/BP3Reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ void BP3Reader::Init()
" " + m_EndMessage);
}

// if IO was involved in reading before this flag may be true now
m_IO.m_ReadStreaming = false;

InitTransports();
InitBuffer();
}
Expand Down
2 changes: 2 additions & 0 deletions source/adios2/engine/bp4/BP4Reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ void BP4Reader::Init()
"supports OpenMode::Read from" +
m_Name + " " + m_EndMessage);
}
// if IO was involved in reading before this flag may be true now
m_IO.m_ReadStreaming = false;

m_BP4Deserializer.Init(m_IO.m_Parameters, "in call to BP4::Open to write");
InitTransports();
Expand Down
3 changes: 3 additions & 0 deletions source/adios2/engine/bp5/BP5Reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ void BP5Reader::Init()
m_Name + " " + m_EndMessage);
}

// if IO was involved in reading before this flag may be true now
m_IO.m_ReadStreaming = false;

ParseParams(m_IO, m_Parameters);
m_ReaderIsRowMajor = helper::IsRowMajor(m_IO.m_HostLanguage);
InitTransports();
Expand Down

0 comments on commit 2bfb07f

Please sign in to comment.