Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit dfc0653

Browse files
1ucpramodkmatz-e
authored
Update README - new repo highfive-devs/highfive (#1069)
* Shorten and update README with BBP closure * Update funding information / years Co-authored-by: Pramod Kumbhar <pramod.s.kumbhar@gmail.com> Co-authored-by: Matthias Wolf <matthias.wolf@epfl.ch>
1 parent ddcf632 commit dfc0653

File tree

2 files changed

+25
-212
lines changed

2 files changed

+25
-212
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ cmake_policy(VERSION 3.13)
44
project(HighFive VERSION 3.0.0)
55
set(HIGHFIVE_VERSION_PRERELEASE 2)
66

7+
message(WARNING "=================================================================\n"
8+
"HighFive development moved to:\n"
9+
" github.com/highfive-devs/highfive\n"
10+
"=================================================================")
11+
712
# Configure HighFive
813
# ------------------
914
option(HIGHFIVE_VERBOSE "Set logging level to verbose." OFF)

README.md

Lines changed: 20 additions & 212 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
*Note:* In preparation of `v3` of HighFive, we've started merging breaking
2-
changes into the main branch. More information and opportunity to comment can
3-
be found at:
4-
https://github.com/BlueBrain/HighFive/issues/864
1+
> [!WARNING]
2+
> The Blue Brain Project concluded in December 2024, so the HighFive development is ceased under the BlueBrain GitHub organization.
3+
>
4+
> The development of HighFive will continue at:
5+
> https://github.com/highfive-devs/highfive
56
67
# HighFive - HDF5 header-only C++ Library
78

8-
[![Doxygen -> gh-pages](https://github.com/BlueBrain/HighFive/workflows/gh-pages/badge.svg?branch=master)](https://BlueBrain.github.io/HighFive/actions/workflows/gh-pages.yml?query=branch%3Amaster)
9-
[![codecov](https://codecov.io/gh/BlueBrain/HighFive/branch/master/graph/badge.svg?token=UBKxHEn7RS)](https://codecov.io/gh/BlueBrain/HighFive)
10-
[![HighFive_Integration_tests](https://github.com/BlueBrain/HighFive-testing/actions/workflows/integration.yml/badge.svg)](https://github.com/BlueBrain/HighFive-testing/actions/workflows/integration.yml)
11-
[![Zenodo](https://zenodo.org/badge/47755262.svg)](https://zenodo.org/doi/10.5281/zenodo.10679422)
12-
139
Documentation: https://bluebrain.github.io/HighFive/
1410

1511
## Brief
@@ -47,237 +43,49 @@ It integrates nicely with other CMake projects by defining (and exporting) a Hig
4743
- xtensor (optional)
4844
- half (optional)
4945

50-
### Versioning & Code Stability
51-
We use semantic versioning. Currently, we're preparing `v3` which contains a
52-
limited set of breaking changes required to eliminate undesireable behaviour or
53-
modernize outdated patterns. We provide a
54-
[Migration Guide](https://bluebrain.github.io/HighFive/md__2home_2runner_2work_2_high_five_2_high_five_2doc_2migration__guide.html),
55-
please report any missing or incorrect information to help others make the
56-
switch more easily.
57-
58-
- `v2.x.y` are stable and any API breaking changes are considered bugs. There's
59-
like not going to be very many releases of the `v2` line once `v3` is stable.
60-
61-
- `v3.0.0-beta?` are pre-releases of `v3.0.0`. We predict that one more
62-
breaking changes might happen: the string handling is confusing to some of the
63-
maintainers and the default encoding is inconsistent (and will likely be made
64-
consistent).
65-
66-
For codes that either use `std::string` when dealing with strings, or that
67-
don't use strings with HDF5 at all, we don't currently have any additional
68-
breaking changes planned for 3.0.0.
69-
46+
The releases for versions 2.x.y and two prereleases of v3 can be found at:
47+
* https://github.com/BlueBrain/HighFive/releases
48+
* https://zenodo.org/doi/10.5281/zenodo.10679422
7049

71-
### Known flaws
72-
- HighFive is not thread-safe. At best it has the same limitations as the HDF5 library. However, HighFive objects modify their members without protecting these writes. Users have reported that HighFive is not thread-safe even when using the threadsafe HDF5 library, e.g., https://github.com/BlueBrain/HighFive/discussions/675.
73-
- Eigen support in core HighFive was broken until v3.0. See https://github.com/BlueBrain/HighFive/issues/532. H5Easy was not
74-
affected.
75-
- The support of fixed length strings isn't ideal.
50+
The state of HighFive immediately before preparing it for archival is:
51+
* https://github.com/BlueBrain/HighFive/tree/v3.0.0-beta2
7652

53+
All future development and new releases can be found at:
54+
* https://github.com/highfive-devs/highfive
7755

78-
## Examples
79-
80-
#### Write a std::vector<int> to 1D HDF5 dataset and read it back
56+
## Example
8157

8258
```c++
83-
#include <highfive/highfive.hpp>
84-
8559
using namespace HighFive;
8660

87-
std::string filename = "/tmp/new_file.h5";
61+
File file("foo.h5", File::Truncate);
8862

8963
{
90-
// We create an empty HDF55 file, by truncating an existing
91-
// file if required:
92-
File file(filename, File::Truncate);
93-
9464
std::vector<int> data(50, 1);
9565
file.createDataSet("grp/data", data);
9666
}
9767

9868
{
99-
// We open the file as read-only:
100-
File file(filename, File::ReadOnly);
10169
auto dataset = file.getDataSet("grp/data");
10270

103-
// Read back, with allocating:
71+
// Read back, automatically allocating:
10472
auto data = dataset.read<std::vector<int>>();
10573

106-
// Because `data` has the correct size, this will
107-
// not cause `data` to be reallocated:
74+
// Alternatively, if `data` has the correct
75+
// size, without reallocation:
10876
dataset.read(data);
10977
}
11078
```
11179
112-
**Note:** As of 2.8.0, one can use `highfive/highfive.hpp` to include
113-
everything HighFive. Prior to 2.8.0 one would include `highfive/H5File.hpp`.
114-
115-
**Note:** For advanced usecases the dataset can be created without immediately
116-
writing to it. This is common in MPI-IO related patterns, or when growing a
117-
dataset over the course of a simulation.
118-
119-
#### Write a 2 dimensional C double float array to a 2D HDF5 dataset
120-
121-
See [create_dataset_double.cpp](https://github.com/BlueBrain/HighFive/blob/master/src/examples/create_dataset_double.cpp)
122-
123-
#### Write and read a matrix of double float (boost::ublas) to a 2D HDF5 dataset
124-
125-
See [boost_ublas_double.cpp](https://github.com/BlueBrain/HighFive/blob/master/src/examples/boost_ublas_double.cpp)
126-
127-
#### Write and read a subset of a 2D double dataset
128-
129-
See [select_partial_dataset_cpp11.cpp](https://github.com/BlueBrain/HighFive/blob/master/src/examples/select_partial_dataset_cpp11.cpp)
130-
131-
#### Create, write and list HDF5 attributes
132-
133-
See [create_attribute_string_integer.cpp](https://github.com/BlueBrain/HighFive/blob/master/src/examples/create_attribute_string_integer.cpp)
134-
135-
#### And others
136-
137-
See [src/examples/](https://github.com/BlueBrain/HighFive/blob/master/src/examples/) subdirectory for more info.
138-
139-
140-
### H5Easy
141-
142-
For several 'standard' use cases the [highfive/H5Easy.hpp](include/highfive/H5Easy.hpp) interface is available. It allows:
143-
144-
* Reading/writing in a single line of:
145-
146-
- scalars (to/from an extendible DataSet),
147-
- strings,
148-
- vectors (of standard types),
149-
- [Eigen::Matrix](http://eigen.tuxfamily.org) (optional),
150-
- [xt::xarray](https://github.com/QuantStack/xtensor) and [xt::xtensor](https://github.com/QuantStack/xtensor)
151-
(optional).
152-
- [cv::Mat_](https://docs.opencv.org/master/df/dfc/classcv_1_1Mat__.html)
153-
(optional).
154-
155-
* Getting in a single line:
156-
157-
- the size of a DataSet,
158-
- the shape of a DataSet.
159-
160-
#### Example
161-
162-
```cpp
163-
#include <highfive/H5Easy.hpp>
164-
165-
int main() {
166-
H5Easy::File file("example.h5", H5Easy::File::Overwrite);
167-
168-
int A = ...;
169-
H5Easy::dump(file, "/path/to/A", A);
170-
171-
A = H5Easy::load<int>(file, "/path/to/A");
172-
}
173-
```
174-
175-
whereby the `int` type of this example can be replaced by any of the above
176-
types. See [easy_load_dump.cpp](src/examples/easy_load_dump.cpp) for more
177-
details.
178-
179-
**Note:** Classes such as `H5Easy::File` are just short for the regular
180-
`HighFive` classes (in this case `HighFive::File`). They can thus be used
181-
interchangeably.
182-
183-
184-
## CMake integration
185-
There's two common paths of integrating HighFive into a CMake based project.
186-
The first is to "vendor" HighFive, the second is to install HighFive as a
187-
normal C++ library. Since HighFive makes choices about how to integrate HDF5,
188-
sometimes following the third Bailout Approach is needed.
189-
190-
Regular HDF5 CMake variables can be used. Interesting variables include:
191-
192-
* `HDF5_USE_STATIC_LIBRARIES` to link statically against the HDF5 library.
193-
* `HDF5_PREFER_PARALLEL` to prefer pHDF5.
194-
* `HDF5_IS_PARALLEL` to check if HDF5 is parallel.
195-
196-
Please consult `tests/cmake_integration` for examples of how to write libraries
197-
or applications using HighFive.
198-
199-
### Vendoring HighFive
200-
201-
In this approach the HighFive sources are included in a subdirectory of the
202-
project (typically as a git submodule), for example in `third_party/HighFive`.
203-
204-
The projects `CMakeLists.txt` add the following lines
205-
```cmake
206-
add_subdirectory(third_party/HighFive)
207-
target_link_libraries(foo HighFive)
208-
```
209-
210-
**Note:** `add_subdirectory(third_party/HighFive)` will search and "link" HDF5
211-
but wont search or link any optional dependencies such as Boost.
212-
213-
### Regular Installation of HighFive
214-
215-
Alternatively, HighFive can be install and "found" like regular software.
216-
217-
The project's `CMakeLists.txt` should add the following:
218-
```cmake
219-
find_package(HighFive REQUIRED)
220-
target_link_libraries(foo HighFive)
221-
```
222-
223-
**Note:** `find_package(HighFive)` will search for HDF5. "Linking" to
224-
`HighFive` includes linking with HDF5. The two commands will not search for or
225-
"link" to optional dependencies such as Boost.
226-
227-
### Bailout Approach
228-
229-
To prevent HighFive from searching or "linking" to HDF5 the project's
230-
`CMakeLists.txt` should contain the following:
231-
232-
```cmake
233-
# Prevent HighFive CMake code from searching for HDF5:
234-
set(HIGHFIVE_FIND_HDF5 Off)
235-
236-
# Then "find" HighFive as usual:
237-
find_package(HighFive REQUIRED)
238-
# alternatively, when vendoring:
239-
# add_subdirectory(third_party/HighFive)
240-
241-
# Finally, use the target `HighFive::Include` which
242-
# doesn't add a dependency on HDF5.
243-
target_link_libraries(foo HighFive::Include)
244-
245-
# Proceed to find and link HDF5 as required.
246-
```
247-
248-
### Optional Dependencies
249-
250-
HighFive does not attempt to find or "link" to any optional dependencies, such
251-
as Boost, Eigen, etc. Any project using HighFive with any of the optional
252-
dependencies must include the respective header:
253-
```
254-
#include <highfive/boost.hpp>
255-
#include <highfive/eigen.hpp>
256-
```
257-
and add the required CMake code to find and link against the dependencies. For
258-
Boost the required lines might be
259-
```
260-
find_package(Boost REQUIRED)
261-
target_link_libraries(foo PUBLIC Boost::headers)
262-
```
263-
264-
# Questions?
265-
266-
Do you have questions on how to use HighFive? Would you like to share an interesting example or
267-
discuss HighFive features? Head over to the [Discussions](https://github.com/BlueBrain/HighFive/discussions)
268-
forum and join the community.
269-
270-
For bugs and issues please use [Issues](https://github.com/BlueBrain/HighFive/issues).
271-
27280
# Funding & Acknowledgment
273-
81+
27482
The development of this software was supported by funding to the Blue Brain Project, a research center of the École polytechnique fédérale de Lausanne (EPFL), from the Swiss government's ETH Board of the Swiss Federal Institutes of Technology.
27583
27684
HighFive releases are uploaded to Zenodo. If you wish to cite HighFive in a
27785
scientific publication you can use the DOIs for the
27886
[Zenodo records](https://zenodo.org/doi/10.5281/zenodo.10679422).
279-
280-
Copyright © 2015-2022 Blue Brain Project/EPFL
87+
88+
Copyright © 2015-2024 Blue Brain Project/EPFL
28189
28290
28391
### License

0 commit comments

Comments
 (0)