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

Issue at adios test32 #2463

Merged
merged 2 commits into from
Sep 18, 2020
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
6 changes: 5 additions & 1 deletion source/adios2/engine/hdf5/HDF5ReaderP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "HDF5ReaderP.tcc"

#include "adios2/helper/adiosFunctions.h" //CSVToVector

#include "adios2/helper/adiosFunctions.h" //IsHDF5
#include <vector>

namespace adios2
Expand All @@ -27,6 +27,10 @@ HDF5ReaderP::HDF5ReaderP(IO &io, const std::string &name, const Mode openMode,
: Engine("HDF5Reader", io, name, openMode, std::move(comm))
{
m_EndMessage = ", in call to IO HDF5Reader Open " + m_Name + "\n";
if (!helper::IsHDF5File(name, m_Comm, {}))
throw std::invalid_argument("!ADIOS2 Error: Invalid HDF5 file found" +
m_EndMessage);

Init();
}

Expand Down
17 changes: 13 additions & 4 deletions source/adios2/engine/hdf5/HDF5WriterP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,18 @@ void HDF5WriterP::Init()
", in call to ADIOS Open or HDF5Writer constructor\n");
}

#ifdef NEVER
m_H5File.Init(m_Name, m_Comm, true);
#else
m_H5File.ParseParameters(m_IO);

if (m_OpenMode == Mode::Append)
{
m_H5File.Append(m_Name, m_Comm);
m_H5File.ReadAttrToIO(m_IO);
m_H5File.ReadAllVariables(m_IO);
}
else
m_H5File.Init(m_Name, m_Comm, true);

/*
// enforce .h5 ending
std::string suffix = ".h5";
std::string wrongSuffix = ".bp";
Expand Down Expand Up @@ -93,7 +102,7 @@ void HDF5WriterP::Init()
m_H5File.ReadAttrToIO(m_IO);
m_H5File.ReadAllVariables(m_IO);
}
#endif
*/
}

#define declare_type(T) \
Expand Down