From 5ce226f2468a74e16b3155bac9546355e98bdf67 Mon Sep 17 00:00:00 2001 From: Junmin Gu Date: Wed, 16 Sep 2020 21:03:17 -0700 Subject: [PATCH] do not enforce .h5 as file extension --- source/adios2/engine/hdf5/HDF5WriterP.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/source/adios2/engine/hdf5/HDF5WriterP.cpp b/source/adios2/engine/hdf5/HDF5WriterP.cpp index f7cc30495c..c503edc75d 100644 --- a/source/adios2/engine/hdf5/HDF5WriterP.cpp +++ b/source/adios2/engine/hdf5/HDF5WriterP.cpp @@ -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"; @@ -93,7 +102,7 @@ void HDF5WriterP::Init() m_H5File.ReadAttrToIO(m_IO); m_H5File.ReadAllVariables(m_IO); } -#endif + */ } #define declare_type(T) \