Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADIOS2: Ensure that a step is always active at write time #1492

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/IO/ADIOS/ADIOS2IOHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2560,7 +2560,9 @@ namespace detail
// might have been closed previously
if (engine)
{
if (streamStatus == StreamStatus::DuringStep)
if (streamStatus == StreamStatus::DuringStep ||
(streamStatus == StreamStatus::NoStream &&
m_mode == adios2::Mode::Write))
{
engine.EndStep();
}
Expand Down Expand Up @@ -3114,6 +3116,11 @@ namespace detail
// the streaming API was used.
m_engine = std::make_optional(
adios2::Engine(m_IO.Open(m_file, tempMode)));
if (streamStatus == StreamStatus::NoStream)
{
// Write everything into one big step
m_engine->BeginStep();
}
break;
}
#if HAS_ADIOS_2_8
Expand Down
3 changes: 2 additions & 1 deletion test/SerialIOTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4328,7 +4328,8 @@ TEST_CASE("adios2_bp5_flush", "[serial][adios2]")
[adios2]

[adios2.engine]
usesteps = true
# Check that BP5 can also be used without steps
usesteps = false
type = "bp5"
preferred_flush_target = "disk"

Expand Down
Loading