Skip to content
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
7 changes: 6 additions & 1 deletion include/openPMD/IO/ADIOS/CommonADIOS1IOHandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ class CommonADIOS1IOHandlerImpl : public AbstractIOHandlerImpl
m_openWriteFileHandles;
std::unordered_map<std::shared_ptr<std::string>, ADIOS_FILE *>
m_openReadFileHandles;
std::unordered_map<ADIOS_FILE *, std::vector<ADIOS_SELECTION *> >
struct ScheduledRead
{
ADIOS_SELECTION *selection;
std::shared_ptr<void> data; // needed to avoid early freeing
};
std::unordered_map<ADIOS_FILE *, std::vector<ScheduledRead> >
m_scheduledReads;
std::unordered_map<int64_t, std::unordered_map<std::string, Attribute> >
m_attributeWrites;
Expand Down
2 changes: 1 addition & 1 deletion src/IO/ADIOS/ADIOS1IOHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ std::future<void> ADIOS1IOHandlerImpl::flush()
"dataset reading");

for (auto &sel : file.second)
adios_selection_delete(sel);
adios_selection_delete(sel.selection);
}
m_scheduledReads.clear();

Expand Down
4 changes: 2 additions & 2 deletions src/IO/ADIOS/CommonADIOS1IOHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ void CommonADIOS1IOHandlerImpl<ChildClass>::closeFile(
"dataset reading");

for (auto &sel : scheduled->second)
adios_selection_delete(sel);
adios_selection_delete(sel.selection);
m_scheduledReads.erase(scheduled);
}
close(handle_read->second);
Expand Down Expand Up @@ -1183,7 +1183,7 @@ void CommonADIOS1IOHandlerImpl<ChildClass>::readDataset(
"[ADIOS1] Internal error: Failed to schedule ADIOS read during dataset "
"reading");

m_scheduledReads[f].push_back(sel);
m_scheduledReads[f].push_back({sel, parameters.data});
}

template <typename ChildClass>
Expand Down
2 changes: 1 addition & 1 deletion src/IO/ADIOS/ParallelADIOS1IOHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ std::future<void> ParallelADIOS1IOHandlerImpl::flush()
"dataset reading");

for (auto &sel : file.second)
adios_selection_delete(sel);
adios_selection_delete(sel.selection);
}
m_scheduledReads.clear();

Expand Down