Skip to content

Commit

Permalink
Merge pull request #2463 from guj/issueAtAdiosTest32
Browse files Browse the repository at this point in the history
Issue at adios test32
  • Loading branch information
pnorbert authored Sep 18, 2020
2 parents 2baa08d + 5ce226f commit 66a2557
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
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

0 comments on commit 66a2557

Please sign in to comment.