Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is an attempt to introduce filters in vtkhdf backend, generated with AI assistance with GPT-sol-6.1. If ok, a next issue could introduce the same filters for h5py backend. The benchmark folder is just to reproduce the timings reported in this pr and can be removed. Closes #96.
Adds lossless HDF5 compression through the existing backend_args argument of write_mesh, write_point_data, and write_cell_data.
Evidence
Before: VTKHDF writers provided no compression configuration.
After: Mesh and scalar/vector point/cell data can be compressed and read transparently through io4dolfinx and a VTK reader.
Validation:
Benchmarks
Comparison: uncompressed → gzip level 4 + shuffle.
Each configuration uses one warm-up and five measured repetitions; tables report medians. The workload contains a triangular mesh, a smooth point-vector field, and a smooth cell-scalar field.
Measurements were taken on one Intel Core Ultra 7 255HX workstation using ext4, HDF5 1.14.6, h5py 3.16.0, and DOLFINx 0.11.0. MPI processes were bound to cores with one thread per process.
Write times include mesh and field writes plus a final fsync. Read times include mesh reconstruction and field reads using warm filesystem caches. Sizes are decimal MB.
512 cells
131,072 cells
1,179,648 cells
For this workload, compression substantially reduces medium/large file sizes and write times. Reads are generally slightly slower, while tiny files show little timing benefit.
These measurements compare the backend’s current I/O paths: compressed writes enable collective I/O and different HDF5 allocation behavior. They do not isolate gzip overhead, and compression ratios will differ for noisy fields.
Merge Danger
Door: Two-way
Blast Radius: VTKHDF
Compression is opt-in and preserves existing public signatures. The main behavior changes requiring care are collective filtered writes and disjoint topology-offset writes; both are covered by MPI round-trip and empty-rank tests.