Skip to content
Snippets Groups Projects
Commit 8464b196 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

git subrepo pull --force packages/HighFive

subrepo:
  subdir:   "packages/HighFive"
  merged:   "88fcc8989"
upstream:
  origin:   "git@github.com:BlueBrain/HighFive.git"
  branch:   "master"
  commit:   "88fcc8989"
git-subrepo:
  version:  "0.4.6"
  origin:   "git@github.com:ingydotnet/git-subrepo.git"
  commit:   "110b9eb"
parent 88cd46aa
No related branches found
No related tags found
1 merge request!176Add HDF5 support
Showing
with 124 additions and 33 deletions
...@@ -80,7 +80,7 @@ jobs: ...@@ -80,7 +80,7 @@ jobs:
- name: Test - name: Test
working-directory: ${{github.workspace}}/build working-directory: ${{github.workspace}}/build
run: ctest --output-on-failure -C $BUILD_TYPE run: ctest -j2 --output-on-failure -C $BUILD_TYPE
# Job testing several versions of hdf5 # Job testing several versions of hdf5
...@@ -89,7 +89,7 @@ jobs: ...@@ -89,7 +89,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
hdf5_version : [ hdf5-1_8_23, hdf5-1_10_10, hdf5-1_12_2, hdf5-1_14_1 ] hdf5_version : [ hdf5-1_8_23, hdf5-1_10_11, hdf5-1_12_2, hdf5-1_14_3 ]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
...@@ -105,7 +105,7 @@ jobs: ...@@ -105,7 +105,7 @@ jobs:
wget https://github.com/HDFGroup/hdf5/archive/refs/tags/${{ matrix.hdf5_version }}.tar.gz --output-document hdf5.tar.gz wget https://github.com/HDFGroup/hdf5/archive/refs/tags/${{ matrix.hdf5_version }}.tar.gz --output-document hdf5.tar.gz
tar xf hdf5.tar.gz tar xf hdf5.tar.gz
mkdir -p hdf5-${{ matrix.hdf5_version }}/BUILD && cd hdf5-${{ matrix.hdf5_version }}/BUILD mkdir -p hdf5-${{ matrix.hdf5_version }}/BUILD && cd hdf5-${{ matrix.hdf5_version }}/BUILD
cmake .. -DCMAKE_BUILD_TYPE=Release -GNinja -DCMAKE_INSTALL_PREFIX=$HOME/${{ matrix.hdf5_version }} -DHDF5_ENABLE_Z_LIB_SUPPORT=ON -DUSE_LIBAEC=ON cmake .. -DCMAKE_BUILD_TYPE=Release -GNinja -DCMAKE_INSTALL_PREFIX=$HOME/${{ matrix.hdf5_version }} -DHDF5_ENABLE_Z_LIB_SUPPORT=ON -DUSE_LIBAEC=ON -DHDF5_BUILD_EXAMPLES=OFF -DBUILD_STATIC_LIBS=OFF -DBUILD_TESTING=OFF
ninja && ninja install ninja && ninja install
- name: Build - name: Build
...@@ -118,7 +118,7 @@ jobs: ...@@ -118,7 +118,7 @@ jobs:
- name: Test - name: Test
working-directory: ${{github.workspace}}/build working-directory: ${{github.workspace}}/build
run: ctest --output-on-failure -C $BUILD_TYPE run: ctest -j2 --output-on-failure -C $BUILD_TYPE
- name: Examples - name: Examples
...@@ -156,7 +156,7 @@ jobs: ...@@ -156,7 +156,7 @@ jobs:
- name: Test - name: Test
working-directory: ${{github.workspace}}/build working-directory: ${{github.workspace}}/build
run: ctest --output-on-failure -C $BUILD_TYPE run: ctest -j2 --output-on-failure -C $BUILD_TYPE
- name: Examples - name: Examples
working-directory: ${{github.workspace}}/build/src/examples working-directory: ${{github.workspace}}/build/src/examples
...@@ -199,7 +199,7 @@ jobs: ...@@ -199,7 +199,7 @@ jobs:
- name: Test - name: Test
working-directory: ${{github.workspace}}/build working-directory: ${{github.workspace}}/build
run: ctest --output-on-failure -C $BUILD_TYPE run: ctest -j2 --output-on-failure -C $BUILD_TYPE
- name: Examples - name: Examples
working-directory: ${{github.workspace}}/build/src/examples working-directory: ${{github.workspace}}/build/src/examples
...@@ -295,7 +295,7 @@ jobs: ...@@ -295,7 +295,7 @@ jobs:
- name: Test - name: Test
working-directory: ${{github.workspace}}/build working-directory: ${{github.workspace}}/build
run: ctest --output-on-failure -C $BUILD_TYPE run: ctest -j2 --output-on-failure -C $BUILD_TYPE
- name: Examples - name: Examples
working-directory: ${{github.workspace}}/build/src/examples working-directory: ${{github.workspace}}/build/src/examples
...@@ -348,4 +348,4 @@ jobs: ...@@ -348,4 +348,4 @@ jobs:
- name: Test - name: Test
working-directory: ${{github.workspace}}/build working-directory: ${{github.workspace}}/build
shell: bash -l {0} shell: bash -l {0}
run: ctest --output-on-failure -C $BUILD_TYPE run: ctest -j2 --output-on-failure -C $BUILD_TYPE
name: HighFive Check Version File
on:
push:
branches:
- ci_test
- release/**
pull_request:
branches:
- master
- release/**
jobs:
CheckVersion:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: "Install libraries"
run: |
sudo apt-get -qq update
sudo apt-get -qq install libhdf5-dev ninja-build
- name: Build
run: |
# Will trigger `configure_file` for H5Version.hpp.
cmake -DHIGHFIVE_USE_BOOST=Off -B build .
- name: Test
run: |
# Check that the file hasn't changed, i.e. was updated
# after changing the version number.
! git status | grep include/highfive/H5Version.hpp
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
[subrepo] [subrepo]
remote = git@github.com:BlueBrain/HighFive.git remote = git@github.com:BlueBrain/HighFive.git
branch = master branch = master
commit = 7340d1fcc7c455519c113216d8415e003ed37cc6 commit = 88fcc898970f93a63be8e25760d6b9f33589690f
parent = 95783fdd2e50f442c21e5a9e668d14d4985bf2a0 parent = 88cd46aaec511360705df0fc7e577098877862d0
method = merge method = merge
cmdver = 0.4.6 cmdver = 0.4.6
...@@ -2,6 +2,7 @@ Adrien Devresse ...@@ -2,6 +2,7 @@ Adrien Devresse
Alexandru Săvulescu Alexandru Săvulescu
Ali Can Demiralp Ali Can Demiralp
Angelos Plastropoulos Angelos Plastropoulos
@antonysigma
Chris Byrohl Chris Byrohl
Chris De Grendele Chris De Grendele
@contre @contre
...@@ -12,6 +13,8 @@ Fernando L. Pereira ...@@ -12,6 +13,8 @@ Fernando L. Pereira
@guoxy @guoxy
Haoran Ni Haoran Ni
Henry Schreiner Henry Schreiner
@hn-sl
Hunter Belanger
@JaWSnl @JaWSnl
Jia Li Jia Li
John W. Peterson John W. Peterson
...@@ -49,6 +52,7 @@ Tino Wagner ...@@ -49,6 +52,7 @@ Tino Wagner
Tobias Klauser Tobias Klauser
Tom de Geus Tom de Geus
Tom Vander Aa Tom Vander Aa
Torsten Reuschel
Tristan Carel Tristan Carel
Wolf Vollprecht Wolf Vollprecht
Y. Yang Y. Yang
# Changes # Changes
## Version 2.8.0 - 2023-MM-DD ## Version 2.8.0 - 2023-11-02
### Important Change
- `Eigen::Matrix` is (by default) stored with column-major index ordering. Under
certain conditions `Eigen::Matrix` was written and read as row-major.
Due to code duplication H5Easy isn't affected by this bug. Starting
`2.8.0` HighFive will now throw an exception whenever prior versions would
have read with incorrect assumptions about the index ordering. (#731)
### New Features ### New Features
- Improve reading and writing `std::string` as fixed and variable length HDF5 strings (#744).
- Implement creation of hard links (#765). Thanks to @Quark-X10. - Implement creation of hard links (#765). Thanks to @Quark-X10.
- Get the size of file and amound of tracked unused space (#764). Thanks to @Quark-X10. - Get the size of file and amound of tracked unused space (#764). Thanks to @Quark-X10.
- `class DataType` has a new ctor to open a commited `DataType` (#796). Thanks to @Quark-X10.
- Allow user-specified `mem_space` for hyperslabs. (#740)
- New properties: `AttributePhaseChange`. (#785)
- New options to link against HDF5 statically (#823). Thanks @HunterBelanger.
- Add support for `std::complex<integral_type>` valid with C++23 (#828). Thanks @unbtorsten.
- Add a top-level header to include all compononents (#818).
### Improvements ### Improvements
- Add concept checks to `Property` if C++20 for better errors (#811). Thanks @antonysigma.
- Add parallel HDF5 test in CI (#760). - Add parallel HDF5 test in CI (#760).
- Simplify github workflow (#761). - Simplify github workflow (#761).
- Move inspectors in their own file to be able to better implements strings (#759). - Move inspectors in their own file to be able to better implements strings (#759).
### Bug Fix
- Fix vector constructor ambiguity in H5DataType.hpp (#775). Thanks to @hn-sl.
- `getElementCount()` fixed. (#787)
- Remove leak when calling dtor of `CompoundType`. (#798)
## Version 2.7.1 - 2023-04-04 ## Version 2.7.1 - 2023-04-04
### Bug Fix ### Bug Fix
- Revert removing `#include "H5FileDriver.hpp"` from `H5File.hpp` (#711). - Revert removing `#include "H5FileDriver.hpp"` from `H5File.hpp` (#711).
......
...@@ -26,6 +26,7 @@ if(NOT TARGET libdeps) ...@@ -26,6 +26,7 @@ if(NOT TARGET libdeps)
# HDF5 # HDF5
if(NOT DEFINED HDF5_C_LIBRARIES) if(NOT DEFINED HDF5_C_LIBRARIES)
set(HDF5_PREFER_PARALLEL ${HIGHFIVE_PARALLEL_HDF5}) set(HDF5_PREFER_PARALLEL ${HIGHFIVE_PARALLEL_HDF5})
set(HDF5_USE_STATIC_LIBRARIES ${HIGHFIVE_STATIC_HDF5})
find_package(HDF5 REQUIRED) find_package(HDF5 REQUIRED)
endif() endif()
......
...@@ -4,7 +4,6 @@ add_library(libheaders INTERFACE) ...@@ -4,7 +4,6 @@ add_library(libheaders INTERFACE)
target_include_directories(libheaders INTERFACE target_include_directories(libheaders INTERFACE
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>" "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
"$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>"
"$<INSTALL_INTERFACE:include>") "$<INSTALL_INTERFACE:include>")
# Combined HighFive # Combined HighFive
......
...@@ -5,10 +5,10 @@ else() ...@@ -5,10 +5,10 @@ else()
cmake_policy(VERSION 3.13) cmake_policy(VERSION 3.13)
endif() endif()
project(HighFive VERSION 2.7.1) project(HighFive VERSION 2.8.0)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/highfive/H5Version.hpp.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/highfive/H5Version.hpp.in
${CMAKE_CURRENT_BINARY_DIR}/include/highfive/H5Version.hpp) ${CMAKE_CURRENT_SOURCE_DIR}/include/highfive/H5Version.hpp)
# INCLUDES # INCLUDES
list(APPEND CMAKE_MODULE_PATH list(APPEND CMAKE_MODULE_PATH
${CMAKE_CURRENT_SOURCE_DIR}/CMake ${CMAKE_CURRENT_SOURCE_DIR}/CMake
...@@ -32,6 +32,7 @@ option(HIGHFIVE_USE_OPENCV "Enable OpenCV testing" ${USE_OPENCV}) ...@@ -32,6 +32,7 @@ option(HIGHFIVE_USE_OPENCV "Enable OpenCV testing" ${USE_OPENCV})
option(HIGHFIVE_USE_XTENSOR "Enable xtensor testing" ${USE_XTENSOR}) option(HIGHFIVE_USE_XTENSOR "Enable xtensor testing" ${USE_XTENSOR})
option(HIGHFIVE_EXAMPLES "Compile examples" ON) option(HIGHFIVE_EXAMPLES "Compile examples" ON)
option(HIGHFIVE_PARALLEL_HDF5 "Enable Parallel HDF5 support" OFF) option(HIGHFIVE_PARALLEL_HDF5 "Enable Parallel HDF5 support" OFF)
option(HIGHFIVE_STATIC_HDF5 "Staticly link to HDF5 library" OFF)
option(HIGHFIVE_BUILD_DOCS "Enable documentation building" ON) option(HIGHFIVE_BUILD_DOCS "Enable documentation building" ON)
option(HIGHFIVE_VERBOSE "Set logging level to verbose." OFF) option(HIGHFIVE_VERBOSE "Set logging level to verbose." OFF)
option(HIGHFIVE_GLIBCXX_ASSERTIONS "Enable bounds check for STL." OFF) option(HIGHFIVE_GLIBCXX_ASSERTIONS "Enable bounds check for STL." OFF)
...@@ -103,11 +104,6 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ ...@@ -103,11 +104,6 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/
DESTINATION "include" DESTINATION "include"
PATTERN "*.in" EXCLUDE) PATTERN "*.in" EXCLUDE)
# Installation of configured headers
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
DESTINATION "include")
# Preparing local building (tests, examples) # Preparing local building (tests, examples)
# ------------------------------------------ # ------------------------------------------
......
...@@ -53,7 +53,7 @@ It integrates nicely with other CMake projects by defining (and exporting) a Hig ...@@ -53,7 +53,7 @@ It integrates nicely with other CMake projects by defining (and exporting) a Hig
#### Write a std::vector<int> to 1D HDF5 dataset and read it back #### Write a std::vector<int> to 1D HDF5 dataset and read it back
```c++ ```c++
#include <highfive/H5File.hpp> #include <highfive/highfive.hpp>
using namespace HighFive; using namespace HighFive;
......
...@@ -42,7 +42,7 @@ the git repository. Conveniently, `clang-format` is available via `pip`: ...@@ -42,7 +42,7 @@ the git repository. Conveniently, `clang-format` is available via `pip`:
python -m venv venv python -m venv venv
source venv/bin/activate source venv/bin/activate
pip install clang-format=12.0.1 pip install clang-format==12.0.1
``` ```
The changed lines can be formatted with `git-clang-format`, e.g. to format all lines changed compared to master: The changed lines can be formatted with `git-clang-format`, e.g. to format all lines changed compared to master:
...@@ -57,6 +57,7 @@ your changes.) ...@@ -57,6 +57,7 @@ your changes.)
Before releasing a new version perform the following: Before releasing a new version perform the following:
* Update `CHANGELOG.md` and `AUTHORS.txt` as required. * Update `CHANGELOG.md` and `AUTHORS.txt` as required.
* Update `CMakeLists.txt` and `include/highfive/H5Version.hpp`.
* Follow semantic versioning when deciding the next version number. * Follow semantic versioning when deciding the next version number.
* Check that * Check that
[HighFive-testing](https://github.com/BlueBrain/HighFive-testing/actions) ran [HighFive-testing](https://github.com/BlueBrain/HighFive-testing/actions) ran
......
...@@ -202,7 +202,7 @@ install. The detailed instructions would be ...@@ -202,7 +202,7 @@ install. The detailed instructions would be
git clone --recursive https://github.com/BlueBrain/HighFive.git git clone --recursive https://github.com/BlueBrain/HighFive.git
cd HighFive cd HighFive
git checkout v2.7.1 git checkout v2.8.0
If it complains that Catch is missing, you forgot the `--recursive`. To fix If it complains that Catch is missing, you forgot the `--recursive`. To fix
this you type this you type
...@@ -218,7 +218,7 @@ Okay, on to configure, compile and install. The CMake commands are ...@@ -218,7 +218,7 @@ Okay, on to configure, compile and install. The CMake commands are
### Confirming It Works ### Confirming It Works
We again need a dummy file called `dummy.cpp` with the following contents We again need a dummy file called `dummy.cpp` with the following contents
#include <highfive/H5File.hpp> #include <highfive/highfive.hpp>
int main() { int main() {
auto file = HighFive::File("foo.h5", HighFive::File::Create); auto file = HighFive::File("foo.h5", HighFive::File::Create);
......
#include <highfive/H5File.hpp> #include <highfive/highfive.hpp>
typedef struct { typedef struct {
......
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
#include <mpi.h> #include <mpi.h>
#include <highfive/H5DataSet.hpp> #include <highfive/highfive.hpp>
#include <highfive/H5DataSpace.hpp>
#include <highfive/H5File.hpp>
int main(int argc, char** argv) { int main(int argc, char** argv) {
......
#include <complex> #include <complex>
#define H5_USE_BOOST 1 #define H5_USE_BOOST 1
#include <highfive/highfive.hpp>
#include <boost/multi_array.hpp> #include <boost/multi_array.hpp>
#include <highfive/H5DataSet.hpp>
#include <highfive/H5DataSpace.hpp>
#include <highfive/H5File.hpp>
using complex_t = std::complex<double>; using complex_t = std::complex<double>;
......
#include <iostream> #include <iostream>
#define H5_USE_BOOST 1 #define H5_USE_BOOST 1
#include <highfive/highfive.hpp>
// In some versions of Boost (starting with 1.64), you have to // In some versions of Boost (starting with 1.64), you have to
// include the serialization header before ublas // include the serialization header before ublas
...@@ -8,7 +9,6 @@ ...@@ -8,7 +9,6 @@
#include <boost/numeric/ublas/io.hpp> #include <boost/numeric/ublas/io.hpp>
#include <boost/numeric/ublas/matrix.hpp> #include <boost/numeric/ublas/matrix.hpp>
#include <highfive/H5File.hpp>
using namespace HighFive; using namespace HighFive;
......
#include <xtensor/xarray.hpp> #include <xtensor/xarray.hpp>
#include <highfive/H5Easy.hpp> #include <highfive/H5Easy.hpp>
int main() { int main() {
......
#include <highfive/H5File.hpp> #include <highfive/highfive.hpp>
using namespace HighFive; using namespace HighFive;
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#include <type_traits> #include <type_traits>
#include <vector> #include <vector>
#include <H5Tpublic.h>
#include "H5Object.hpp" #include "H5Object.hpp"
#include "bits/H5Utils.hpp" #include "bits/H5Utils.hpp"
......
/*
* Copyright (c), 2020
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*
*/
#pragma once
#define HIGHFIVE_VERSION_MAJOR 2
#define HIGHFIVE_VERSION_MINOR 8
#define HIGHFIVE_VERSION_PATCH 0
/** \brief Concatenated representation of the HighFive version.
*
* \warning The macro `HIGHFIVE_VERSION` by itself isn't valid C/C++.
*
* However, it can be stringified with two layers of macros, e.g.,
* \code{.cpp}
* #define STRINGIFY_VALUE(s) STRINGIFY_NAME(s)
* #define STRINGIFY_NAME(s) #s
*
* std::cout << STRINGIFY_VALUE(HIGHFIVE_VERSION) << "\n";
* \endcode
*/
#define HIGHFIVE_VERSION 2.8.0
/** \brief String representation of the HighFive version.
*
* \warning This macro only exists from 2.7.1 onwards.
*/
#define HIGHFIVE_VERSION_STRING "2.8.0"
...@@ -87,8 +87,10 @@ inline void Attribute::read(T& array) const { ...@@ -87,8 +87,10 @@ inline void Attribute::read(T& array) const {
read(r.getPointer(), buffer_info.data_type); read(r.getPointer(), buffer_info.data_type);
// re-arrange results // re-arrange results
r.unserialize(array); r.unserialize(array);
auto t = create_datatype<typename details::inspector<T>::base_type>();
auto t = buffer_info.data_type;
auto c = t.getClass(); auto c = t.getClass();
if (c == DataTypeClass::VarLen || t.isVariableStr()) { if (c == DataTypeClass::VarLen || t.isVariableStr()) {
#if H5_VERSION_GE(1, 12, 0) #if H5_VERSION_GE(1, 12, 0)
// This one have been created in 1.12.0 // This one have been created in 1.12.0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment