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

WIP: Do not modify steps information in BeginStep if the status is not OK. #1772

Closed
wants to merge 3 commits into from
Closed
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
34 changes: 22 additions & 12 deletions source/adios2/engine/bp4/BP4Reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,29 +56,39 @@ StepStatus BP4Reader::BeginStep(StepMode mode, const float timeoutSeconds)
}
}

if (m_FirstStep)
{
m_FirstStep = false;
}
else
{
++m_CurrentStep;
}

// used to inquire for variables in streaming mode
m_IO.m_ReadStreaming = true;
StepStatus status = StepStatus::OK;

if (m_CurrentStep >= m_BP4Deserializer.m_MetadataSet.StepsCount)
if (m_FirstStep)
{
status = CheckForNewSteps(Seconds(timeoutSeconds));
if (m_BP4Deserializer.m_MetadataSet.StepsCount == 0)
{
status = CheckForNewSteps(Seconds(timeoutSeconds));
}
}
else
{
if (m_CurrentStep + 1 >= m_BP4Deserializer.m_MetadataSet.StepsCount)
{
status = CheckForNewSteps(Seconds(timeoutSeconds));
}
}

// This should be after getting new steps
m_IO.m_EngineStep = m_CurrentStep;

if (status == StepStatus::OK)
{
if (m_FirstStep)
{
m_FirstStep = false;
}
else
{
++m_CurrentStep;
}

m_IO.m_EngineStep = m_CurrentStep;
m_IO.ResetVariablesStepSelection(false,
"in call to BP4 Reader BeginStep");
}
Expand Down