Loading source/adios2/engine/bp3/BP3Reader.tcc +2 −1 Original line number Diff line number Diff line Loading @@ -85,7 +85,8 @@ void BP3Reader::ReadVariableBlocks(Variable<T> &variable) { const std::string subFileName = m_BP3Deserializer.GetBPSubFileName( m_Name, subStreamBoxInfo.SubStreamID); m_Name, subStreamBoxInfo.SubStreamID, m_BP3Deserializer.m_Minifooter.HasSubFiles); m_SubFileManager.OpenFileID( subFileName, subStreamBoxInfo.SubStreamID, Mode::Read, Loading source/adios2/toolkit/format/bp3/BP3Base.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -195,9 +195,10 @@ BP3Base::GetBPSubStreamNames(const std::vector<std::string> &names) const } std::string BP3Base::GetBPSubFileName(const std::string &name, const size_t subFileIndex) const noexcept const size_t subFileIndex, const bool hasSubFiles) const noexcept { return GetBPSubStreamName(name, subFileIndex); return GetBPSubStreamName(name, subFileIndex, hasSubFiles); } size_t BP3Base::GetBPIndexSizeInData(const std::string &variableName, Loading Loading @@ -832,8 +833,14 @@ BP3Base::SetBP3Operation(const std::string type) const noexcept // PRIVATE std::string BP3Base::GetBPSubStreamName(const std::string &name, const size_t rank) const noexcept const size_t rank, const bool hasSubFiles) const noexcept { if (!hasSubFiles) { return name; } const std::string bpName = helper::AddExtension(name, ".bp"); // path/root.bp.dir/root.bp.Index Loading source/adios2/toolkit/format/bp3/BP3Base.h +6 −4 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ public: uint64_t PGIndexStart; uint64_t VarsIndexStart; uint64_t AttributesIndexStart; uint8_t Version = 3; int8_t Version = 3; bool IsLittleEndian = true; bool HasSubFiles = false; }; Loading Loading @@ -227,7 +227,8 @@ public: std::string GetBPMetadataFileName(const std::string &name) const noexcept; std::string GetBPSubFileName(const std::string &name, const size_t subFileIndex) const noexcept; const size_t subFileIndex, const bool hasSubFiles = true) const noexcept; /** * Returns the estimated variable index size. Used by ResizeBuffer public Loading Loading @@ -595,8 +596,9 @@ protected: noexcept; private: std::string GetBPSubStreamName(const std::string &name, const size_t rank) const noexcept; std::string GetBPSubStreamName(const std::string &name, const size_t rank, const bool hasSubFiles = true) const noexcept; /** * Specialized template for string and other types Loading source/adios2/toolkit/format/bp3/BP3Base.tcc +1 −0 Original line number Diff line number Diff line Loading @@ -361,6 +361,7 @@ inline void BP3Base::ParseCharacteristics(const std::vector<char> &buffer, characteristics.Statistics.Value = helper::ReadValue<T>(buffer, position, isLittleEndian); characteristics.Statistics.IsValue = true; characteristics.EntryShapeID = ShapeID::GlobalValue; // adding Min Max for global and local values characteristics.Statistics.Min = characteristics.Statistics.Value; Loading source/adios2/toolkit/format/bp3/BP3Deserializer.cpp +11 −6 Original line number Diff line number Diff line Loading @@ -71,9 +71,10 @@ void BP3Deserializer::ParseMinifooter(const BufferSTL &bufferSTL) { if (helper::IsLittleEndian() != m_Minifooter.IsLittleEndian) { throw std::runtime_error("ERROR: reader found BigEndian bp file, " throw std::runtime_error( "ERROR: reader found BigEndian bp file, " "this version of ADIOS2 wasn't compiled " "with -DADIOS2_USE_ENDIAN_REVERSE=ON " "with the cmake flag -DADIOS2_USE_ENDIAN_REVERSE=ON " "explicitly, in call to Open\n"); } } Loading @@ -81,12 +82,16 @@ void BP3Deserializer::ParseMinifooter(const BufferSTL &bufferSTL) position += 1; const uint8_t subFilesIndex = helper::ReadValue<uint8_t>( const int8_t fileType = helper::ReadValue<int8_t>( buffer, position, m_Minifooter.IsLittleEndian); if (subFilesIndex > 0) if (fileType == 3) { m_Minifooter.HasSubFiles = true; } else if (fileType == 0 || fileType == 2) { m_Minifooter.HasSubFiles = false; } m_Minifooter.Version = helper::ReadValue<uint8_t>( buffer, position, m_Minifooter.IsLittleEndian); Loading Loading
source/adios2/engine/bp3/BP3Reader.tcc +2 −1 Original line number Diff line number Diff line Loading @@ -85,7 +85,8 @@ void BP3Reader::ReadVariableBlocks(Variable<T> &variable) { const std::string subFileName = m_BP3Deserializer.GetBPSubFileName( m_Name, subStreamBoxInfo.SubStreamID); m_Name, subStreamBoxInfo.SubStreamID, m_BP3Deserializer.m_Minifooter.HasSubFiles); m_SubFileManager.OpenFileID( subFileName, subStreamBoxInfo.SubStreamID, Mode::Read, Loading
source/adios2/toolkit/format/bp3/BP3Base.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -195,9 +195,10 @@ BP3Base::GetBPSubStreamNames(const std::vector<std::string> &names) const } std::string BP3Base::GetBPSubFileName(const std::string &name, const size_t subFileIndex) const noexcept const size_t subFileIndex, const bool hasSubFiles) const noexcept { return GetBPSubStreamName(name, subFileIndex); return GetBPSubStreamName(name, subFileIndex, hasSubFiles); } size_t BP3Base::GetBPIndexSizeInData(const std::string &variableName, Loading Loading @@ -832,8 +833,14 @@ BP3Base::SetBP3Operation(const std::string type) const noexcept // PRIVATE std::string BP3Base::GetBPSubStreamName(const std::string &name, const size_t rank) const noexcept const size_t rank, const bool hasSubFiles) const noexcept { if (!hasSubFiles) { return name; } const std::string bpName = helper::AddExtension(name, ".bp"); // path/root.bp.dir/root.bp.Index Loading
source/adios2/toolkit/format/bp3/BP3Base.h +6 −4 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ public: uint64_t PGIndexStart; uint64_t VarsIndexStart; uint64_t AttributesIndexStart; uint8_t Version = 3; int8_t Version = 3; bool IsLittleEndian = true; bool HasSubFiles = false; }; Loading Loading @@ -227,7 +227,8 @@ public: std::string GetBPMetadataFileName(const std::string &name) const noexcept; std::string GetBPSubFileName(const std::string &name, const size_t subFileIndex) const noexcept; const size_t subFileIndex, const bool hasSubFiles = true) const noexcept; /** * Returns the estimated variable index size. Used by ResizeBuffer public Loading Loading @@ -595,8 +596,9 @@ protected: noexcept; private: std::string GetBPSubStreamName(const std::string &name, const size_t rank) const noexcept; std::string GetBPSubStreamName(const std::string &name, const size_t rank, const bool hasSubFiles = true) const noexcept; /** * Specialized template for string and other types Loading
source/adios2/toolkit/format/bp3/BP3Base.tcc +1 −0 Original line number Diff line number Diff line Loading @@ -361,6 +361,7 @@ inline void BP3Base::ParseCharacteristics(const std::vector<char> &buffer, characteristics.Statistics.Value = helper::ReadValue<T>(buffer, position, isLittleEndian); characteristics.Statistics.IsValue = true; characteristics.EntryShapeID = ShapeID::GlobalValue; // adding Min Max for global and local values characteristics.Statistics.Min = characteristics.Statistics.Value; Loading
source/adios2/toolkit/format/bp3/BP3Deserializer.cpp +11 −6 Original line number Diff line number Diff line Loading @@ -71,9 +71,10 @@ void BP3Deserializer::ParseMinifooter(const BufferSTL &bufferSTL) { if (helper::IsLittleEndian() != m_Minifooter.IsLittleEndian) { throw std::runtime_error("ERROR: reader found BigEndian bp file, " throw std::runtime_error( "ERROR: reader found BigEndian bp file, " "this version of ADIOS2 wasn't compiled " "with -DADIOS2_USE_ENDIAN_REVERSE=ON " "with the cmake flag -DADIOS2_USE_ENDIAN_REVERSE=ON " "explicitly, in call to Open\n"); } } Loading @@ -81,12 +82,16 @@ void BP3Deserializer::ParseMinifooter(const BufferSTL &bufferSTL) position += 1; const uint8_t subFilesIndex = helper::ReadValue<uint8_t>( const int8_t fileType = helper::ReadValue<int8_t>( buffer, position, m_Minifooter.IsLittleEndian); if (subFilesIndex > 0) if (fileType == 3) { m_Minifooter.HasSubFiles = true; } else if (fileType == 0 || fileType == 2) { m_Minifooter.HasSubFiles = false; } m_Minifooter.Version = helper::ReadValue<uint8_t>( buffer, position, m_Minifooter.IsLittleEndian); Loading