Commit 715489e
feat: HDF5 1.10.5+ support and rename to hdf5-rt (#18)
* docs: add HDF5 1.10.5+ support implementation plan
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: add HDF5 version storage and detection
- Add HDF5_RUNTIME_VERSION global static to store detected version
- Add hdf5_version() and hdf5_version_at_least() accessors
- Change minimum version from 1.12.0 to 1.10.5
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: add H5O_info1_t type for HDF5 < 1.12
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: add pre-1.12 H5O functions (H5Oget_info1, H5Oopen_by_addr)
- H5Oget_info1 and H5Oget_info_by_name1 loaded conditionally
- H5Oopen_by_addr available in all versions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: change LocationToken to enum for pre-1.12 support
- LocationToken now has Address and Token variants
- H5O_get_info branches by HDF5 version
- H5O_open_by_token uses appropriate API based on token type
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: export version functions from sys module
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* ci: test multiple HDF5 versions (1.10.x, 1.12, 1.14)
- Add matrix for HDF5 version testing
- Ubuntu system HDF5 (1.10.x) tests compatibility
- Conda HDF5 1.12 and 1.14 test newer features
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: complete HDF5 1.10.x compatibility and CI matrix testing
- Add version-dependent wrappers for H5Sencode, H5Literate
- Fix H5Oget_info1/H5Oget_info_by_name1 signatures (no fields param)
- Add complete H5O_info1_t struct with hdr and meta_size fields
- Add convert_h5i_type for H5I_type_t enum differences between versions
- Skip test_references on HDF5 < 1.12 (requires H5R_ref_t)
- Update CI to explicitly test HDF5 1.10.x, 1.12.x, 1.14.x
- Add test script for local multi-version testing
Tested with HDF5 1.10.11, 1.12.3, 1.13.3, 1.14.5
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* refactor: rename crates to hdf5-rt and hdf5-rt-types
Rename for general use beyond tensor4all:
- tensor4all-hdf5-ffi → hdf5-rt
- tensor4all-hdf5-types → hdf5-rt-types
Also recover tests from hdf5-metno:
- test_plist.rs (39 tests, 2 ignored)
- test_datatypes.rs (7 tests)
- test_object_references.rs (8 tests)
- tests.rs (1 test with manual H5Type impl)
Test coverage improved from 70.45% to 82.27%
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: support HDF5 2.x in version test
Homebrew on macOS now provides HDF5 2.x.
Update test to accept both HDF5 1.x and 2.x major versions.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: add HDF5 2.x compatibility
- Add H5T_COMPLEX type class (new in HDF5 2.0)
- Update H5T_NCLASSES to 12 for HDF5 2.0
- Update version test to accept both HDF5 1.x and 2.x
Note: Our runtime-loading approach requires handling both versions
in the same binary, unlike upstream compile-time feature flags.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: leak HDF5 library handle to prevent cleanup issues
Root cause: When the OnceLock<Library> was dropped at process exit,
dlclose() was called on the HDF5 library. This triggered HDF5's
internal cleanup routines which caused 'infinite loop closing library'
and SIGSEGV on Linux, especially during parallel test execution.
Solution: Use Box::leak() to intentionally leak the library handle.
This prevents dlclose() from being called, keeping the HDF5 library
loaded until process termination. This is safe because:
1. We only load the library once per process
2. The OS will reclaim all memory on process exit
3. This is a common pattern for libraries with problematic cleanup
Also reverts the CI workaround (--test-threads=1) since the root
cause is now fixed.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* ci: use single-threaded tests on Linux to avoid SIGSEGV
Parallel test execution on Linux causes SIGSEGV in test_plist tests.
The root cause is still under investigation, but this workaround
allows CI to pass while we debug the issue.
macOS parallel tests work fine, so only Linux CI uses --test-threads=1.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* ci: simplify CI and disable test_plist temporarily
- Remove test-features job, use --all-features in main test job
- Temporarily disable test_plist.rs (SIGSEGV on Linux with conda HDF5)
- Add *.disabled to .gitignore
The test_plist tests work on macOS but crash on Linux.
Root cause investigation needed.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* ci: upgrade Julia to 1.11 to fix curl_multi_assign abort
Julia 1.10 + curl 8.10+ triggers a crash in Downloads.jl during
Pkg.instantiate() due to a NULL handle dereference in curl_multi_assign.
Julia 1.11 includes a fixed Downloads.jl that avoids this issue.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: re-enable test_plist and improve PropertyList error handling
- PropertyList::copy() now returns Result<Self> instead of silently
returning an invalid handle on failure
- get_shared_mesg_indexes() uses h5get! instead of h5get_d! to
propagate errors instead of silently defaulting to 0
- Re-enable test_plist.rs (41 tests) - SIGSEGV was caused by the
library cleanup issue fixed in 057fb0f, not by plist operations
- Replace conda with JLL/system HDF5 in Julia interop CI to avoid
curl_multi_assign crash in Pkg.instantiate()
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: CI fixes for test_plist SIGSEGV and Julia interop
- Use --test-threads=1 on Linux to avoid test_plist SIGSEGV in parallel
- Set LD_LIBRARY_PATH in test_interop.jl so Rust binary can dlopen
JLL libhdf5.so and its dependencies
- Add pkg-config fallback path for Ubuntu systems
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* ci: add gdb backtrace for test_plist SIGSEGV debugging
Add gdb step to capture exact backtrace of SIGSEGV in test_fapl_common
on x86_64 Linux. This will reveal the exact crash location.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: correct hbool_t type from c_uint (4 bytes) to u8 (1 byte)
HDF5's hbool_t is typedef'd as bool (_Bool), which is 1 byte on all
modern systems with <stdbool.h>. Our definition was c_uint (4 bytes),
causing struct layout mismatches in H5AC_cache_config_t and other
structs containing hbool_t fields.
This was the root cause of the SIGSEGV in test_plist on x86_64 Linux:
H5Pget_mdc_config wrote into H5AC_cache_config_t using 1-byte bool
offsets, but Rust read fields at 4-byte uint offsets, causing
decr_mode to contain an invalid enum discriminant.
Also removes the temporary GDB debugging CI step and continue-on-error.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: Julia interop CI - add JLL dependency paths and pin ubuntu
- Add get_jll_lib_paths() to collect all JLL dependency library paths
(Zlib_jll, libaec_jll, etc.) for LD_LIBRARY_PATH when running Rust binary
- Pin Julia interop job to ubuntu-22.04 to avoid libssl.so loading issues
on ubuntu-24.04 where system OpenSSL 3.x conflicts with JLL OpenSSL 1.1
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* ci: simplify Julia interop to JLL-only, fix attribute read API
- Remove system HDF5 variant from Julia interop CI (JLL is the standard path)
- Add get_jll_lib_paths() to include all JLL dependency dirs in LD_LIBRARY_PATH
- Fix read(attrs(file), key) -> read_attribute(file, key) for newer HDF5.jl
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent 42b9c68 commit 715489e
34 files changed
Lines changed: 2557 additions & 205 deletions
File tree
- .github/workflows
- docs/plans
- hdf5-types
- hdf5
- examples
- src
- hl
- plist
- references
- sys
- tests
- common
- scripts
- tests
- julia
- python
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
44 | 56 | | |
45 | 57 | | |
46 | 58 | | |
47 | 59 | | |
48 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
49 | 64 | | |
| 65 | + | |
50 | 66 | | |
51 | 67 | | |
52 | 68 | | |
53 | 69 | | |
54 | | - | |
| 70 | + | |
| 71 | + | |
55 | 72 | | |
56 | | - | |
57 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
58 | 76 | | |
59 | | - | |
60 | | - | |
| 77 | + | |
| 78 | + | |
61 | 79 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
92 | 88 | | |
93 | | - | |
| 89 | + | |
94 | 90 | | |
95 | 91 | | |
96 | 92 | | |
| |||
111 | 107 | | |
112 | 108 | | |
113 | 109 | | |
114 | | - | |
| 110 | + | |
115 | 111 | | |
116 | 112 | | |
117 | 113 | | |
| |||
120 | 116 | | |
121 | 117 | | |
122 | 118 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 119 | + | |
132 | 120 | | |
133 | | - | |
134 | 121 | | |
135 | 122 | | |
136 | 123 | | |
137 | 124 | | |
138 | | - | |
139 | 125 | | |
140 | 126 | | |
141 | 127 | | |
| |||
156 | 142 | | |
157 | 143 | | |
158 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
159 | 148 | | |
160 | 149 | | |
161 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
34 | 31 | | |
35 | 32 | | |
36 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
15 | 22 | | |
16 | 23 | | |
17 | | - | |
18 | 24 | | |
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
22 | 28 | | |
23 | | - | |
| 29 | + | |
24 | 30 | | |
25 | 31 | | |
26 | | - | |
27 | | - | |
28 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
29 | 44 | | |
30 | | - | |
| 45 | + | |
31 | 46 | | |
32 | | - | |
| 47 | + | |
| 48 | + | |
33 | 49 | | |
34 | 50 | | |
35 | 51 | | |
| |||
39 | 55 | | |
40 | 56 | | |
41 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
42 | 65 | | |
43 | 66 | | |
44 | 67 | | |
| |||
49 | 72 | | |
50 | 73 | | |
51 | 74 | | |
52 | | - | |
53 | | - | |
| 75 | + | |
0 commit comments