Fix GPU wheels build, distribute via GitHub Releases, and expand test coverage#233
Merged
jameslehoux merged 24 commits intoworkingfrom Apr 1, 2026
Merged
Conversation
Add initial draft of OpenImpala paper detailing its framework and advancements.
Added multiple references to the bibliography file including articles on OpenImpala, statistical effective diffusivity estimation, AMReX framework, and Python Battery Mathematical Modelling.
Updated the software architecture section to reflect recent changes and improvements in the OpenImpala framework, including its transition to a Python library and enhancements in computational capabilities.
- Enhance profiling notebook with AMReX TinyProfiler breakdown (solver setup vs linear solve vs flux computation) and NVIDIA Nsight Systems GPU kernel profiling for Colab T4 runtimes - Add CI benchmark workflow that runs on PRs touching solver code, tests against analytical solutions (uniform block tau=(N-1)/N), and posts timing results as PR comments for regression tracking https://claude.ai/code/session_01RKnn97qiD7sbCeABHH3eQk
The GPU wheel uploads fail because setuptools_scm generates local version identifiers (e.g. 4.0.2.dev0+ga780d0e87) which PyPI rejects. Root cause: no v4.x tag exists in the repo (latest is v3.1.0). Add [tool.setuptools_scm] with local_scheme="no-local-version" to produce PyPI-compatible versions even on non-tagged commits, and set fallback_version for builds outside a git repo. https://claude.ai/code/session_01RKnn97qiD7sbCeABHH3eQk
The CIBW_BEFORE_BUILD sed command that renames the package to openimpala-cuda dirties the git working tree. setuptools_scm's guess-next-dev scheme then produces X.Y.Z+1.dev0 instead of the tagged version. Fix by setting SETUPTOOLS_SCM_PRETEND_VERSION from the release tag in both CPU and GPU wheel workflows. https://claude.ai/code/session_01RKnn97qiD7sbCeABHH3eQk
- Fix LaTeX math rendering: wrap $3\times$ and $3\times 3$ properly - Correct HYPRE CUDA description: "device execution policy" not "device memory interface" to match actual implementation - Remove overstated PuMA Python API claim (PuMA now has bindings) - Tone down Python facade claim to "core solver capabilities" - Enumerate new features explicitly in the v4 summary paragraph - Expand test section with benchmark names (Reuss/Voigt bounds) - Consistent em-dash spacing throughout - Minor prose tightening https://claude.ai/code/session_01RKnn97qiD7sbCeABHH3eQk
When triggered manually (workflow_dispatch), GITHUB_REF_NAME is a branch name not a tag. Fall back to git describe --tags --abbrev=0 to find the most recent tag in that case. https://claude.ai/code/session_01RKnn97qiD7sbCeABHH3eQk
PyPI returns 400 Bad Request on GPU wheel upload. Enable verbose logging to surface the actual rejection reason. Disable sigstore attestations as a potential cause — the publish action generates these by default and they may be rejected by PyPI. https://claude.ai/code/session_01RKnn97qiD7sbCeABHH3eQk
REVStudy.cpp had zero test coverage. Add tSyntheticREVStudy that: - Tests empty-sizes early exit path - Runs a single-sample REV study on a uniform 16^3 domain - Validates CSV output creation, header format, and data row count - Checks D_eff tensor: diagonal ≈ 1.0, off-diagonal ≈ 0.0 - Broadcasts pass/fail across MPI ranks https://claude.ai/code/session_01RKnn97qiD7sbCeABHH3eQk
Updated acknowledgements.
Add integration tests exercising uncovered code paths: - tDiffusion_microstructure: SSA, profiles, PSD parameterization - tDiffusion_tortuosity: flow-through method with conductivity physics - tDiffusion_rev: REV convergence study path - tRawReader_uint16le/int16le/float32le: additional data type variants - Raw binary test data files and generation script https://claude.ai/code/session_01RKnn97qiD7sbCeABHH3eQk
GPU wheels are ~318 MB each due to CUDA fatbinaries, exceeding PyPI's
100 MB file size limit. Upload to GitHub Releases (2 GB limit) as an
interim solution while awaiting a PyPI size limit increase.
Users can install via:
pip install openimpala-cuda --find-links \
https://github.com/BASE-Laboratory/OpenImpala/releases/latest/download/
https://claude.ai/code/session_01RKnn97qiD7sbCeABHH3eQk
GPU wheels exceed PyPI's 100 MB limit (~318 MB due to CUDA fatbinaries), so they are now distributed via GitHub Releases. Updated all install instructions to use --find-links for openimpala-cuda: - README.md - docs/getting-started.md, docs/index.rst, docs/user-guide/gpu.md - paper.md - All 7 tutorial notebooks + profiling notebook https://claude.ai/code/session_01RKnn97qiD7sbCeABHH3eQk
added 2 commits
March 31, 2026 21:42
Move the percolation check before solver construction in tortuosity() so non-percolating phases fail fast with a clear PercolationError before expensive HYPRE matrix assembly. The error message now explains why the solver cannot converge. Also add oi.estimate_memory(shape, num_ranks) utility that returns per-rank memory estimates based on the ~80 bytes/voxel rule of thumb. https://claude.ai/code/session_01RKnn97qiD7sbCeABHH3eQk
Add notebooks/visualization_yt.ipynb demonstrating how to use yt to visualize OpenImpala results directly in Jupyter: - Loading AMReX plotfiles with yt.load() - 2D SlicePlot of the solution field and phase map - 1D ProfilePlot of average potential along the flow direction - Extracting data to NumPy arrays for custom matplotlib plots - Tips for large datasets (lazy loading, sub-regions) Also add a [viz] optional dependency group for yt in pyproject.toml. https://claude.ai/code/session_01RKnn97qiD7sbCeABHH3eQk
Code Coverage ReportGenerated by CI — coverage data from gcovr |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
bef2aac to
1ddcb10
Compare
added 2 commits
April 1, 2026 08:40
Adds sphere_packing_vv.py which generates random overlapping sphere packings at varying porosities and validates that OpenImpala's effective diffusivity results fall within the Hashin-Shtrikman upper bound for isotropic binary composites. Updates the V&V README with documentation. Ref: #83 https://claude.ai/code/session_01RKnn97qiD7sbCeABHH3eQk
The input file used 'tortuosity' but Diffusion.cpp only accepts 'homogenization' or 'flow_through'. Changed to 'flow_through' which is the correct method for single-direction tortuosity solves. https://claude.ai/code/session_01RKnn97qiD7sbCeABHH3eQk
added 2 commits
April 1, 2026 08:40
Adds berea_sandstone_vv.py which downloads a 400^3 micro-CT image of Berea sandstone from Digital Rocks Portal and validates computed porosity, tortuosity, and formation factor against published experimental ranges from multiple independent measurements. Falls back to a synthetic structure if the download fails (offline CI). Ref: #83 https://claude.ai/code/session_01RKnn97qiD7sbCeABHH3eQk
gcov can report extremely large hit counts on certain lines due to GCC bug #68080. This causes gcovr to abort with SuspiciousHits error. Add --gcov-ignore-parse-errors=suspicious_hits.warn_once_per_file to downgrade the error to a warning. https://claude.ai/code/session_01RKnn97qiD7sbCeABHH3eQk
1ddcb10 to
a6df125
Compare
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
4.0.3.dev0instead of the tagged version becausecibuildwheel'ssedrename dirtied the git tree. Fixed by settingSETUPTOOLS_SCM_PRETEND_VERSIONfrom the git tag in both CPU and GPU workflows.softprops/action-gh-releaseto upload wheels as release assets. Users install with:--find-linksinstall command.Test plan
pypi-wheels-gpu.ymlviaworkflow_dispatchand verify wheels build with correct versionpip install openimpala-cuda --find-links <release-url>works from a clean environmentctestto confirm new test variants (tSyntheticREVStudy, tDiffusion_, tRawReader_) pass