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

Backports bp5 bugfix #3619

Merged
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
18 changes: 15 additions & 3 deletions source/adios2/engine/bp5/BP5Writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,12 +547,14 @@ void BP5Writer::EndStep()
m_Profiler.Start("AWD");
// TSInfo destructor would delete the DataBuffer so we need to save it
// for async IO and let the writer free it up when not needed anymore
adios2::format::BufferV *databuf = TSInfo.DataBuffer;
TSInfo.DataBuffer = NULL;
m_AsyncWriteLock.lock();
m_flagRush = false;
m_AsyncWriteLock.unlock();
WriteData(databuf);

// WriteData will free TSInfo.DataBuffer
WriteData(TSInfo.DataBuffer);
TSInfo.DataBuffer = NULL;

m_Profiler.Stop("AWD");

/*
Expand Down Expand Up @@ -688,6 +690,16 @@ void BP5Writer::EndStep()
m_EndStepEnd = Now();
/* Seconds ts2 = Now() - m_EngineStart;
std::cout << "END STEP ended at: " << ts2.count() << std::endl;*/

if (TSInfo.AttributeEncodeBuffer)
{
delete TSInfo.AttributeEncodeBuffer;
}

if (TSInfo.MetaEncodeBuffer)
{
delete TSInfo.MetaEncodeBuffer;
}
}

// PRIVATE
Expand Down
4 changes: 0 additions & 4 deletions source/adios2/toolkit/format/bp5/BP5Serializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ class BP5Serializer : virtual public BP5Base

~TimestepInfo()
{
delete MetaEncodeBuffer;
if (AttributeEncodeBuffer)
delete AttributeEncodeBuffer;
delete DataBuffer;
}
};

Expand Down