Repository navigation
Introduce standalone SkalaXC with ABI-isolated CPU, CUDA, MPI, and language bindings - #129
Jens (JensWehner) wants to merge 51 commits into
Conversation
ef41033 to
5277ab5
Compare
5277ab5 to
1486d30
Compare
9e86ed9 to
7f4310f
Compare
7f4310f to
d62c9b6
Compare
Match both backends on the unpruned 75x302 FINE grid without changing parity tolerances. Validate GPU-side gradients on a 4 GiB device. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Offload saved backward tensors instead of reducing quadrature accuracy. Dense neural GPU gradients fit a 4 GiB device with 1198 MiB peak Torch allocation; preserve all parity tolerances. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Run CPU MPI coverage on hosted Ubuntu and both CUDA families on the active small GPU pool. The pool's A10 driver supports CUDA 13; retain all compiler variants, runtime checks, and package tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Avoid unavailable MANA RDMA via Open MPI self/TCP transport. Show formatter diffs in CI to diagnose changes introduced by PR merge commits. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Retain main's postponed annotations and remove the now-redundant quoted union so the PR merge result passes Ruff. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pass the existing CUDA MPI oversubscription setting to host MPI configuration as well. Validated broadcast and reduction with three ranks on two declared slots. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Aaron Kaplan (@esoteric-ephemera), Jan Hermann (@jhrmnn), shall we go ahead and merge this? We can iterate on main afterwards. |
|
[agent] Important CI gap — the new Python binding test suite is not executed Reviewed revision: None of the checked-in workflows invokes Suggested fix:
Further validation:
|
|
[agent] P2 — New root test package breaks combined pytest collection Reviewed revision: Root tests and Reproduction on the reviewed checkout: This fails with There is also a related collection prerequisite: the root parity test unconditionally imports Suggested fix:
Further validation:
|
|
[agent] P2 — Native tests use the absent submodule path after GauXC FetchContent fallback Reviewed revision: When the submodule is absent, dependency acquisition falls back to the pinned GauXC FetchContent checkout. However, the tests still use This is a static path-flow finding; a complete fallback build was not executed locally. Current native CI initializes submodules and therefore does not exercise the fallback. Suggested fix:
Further validation:
|
|
[agent] P2 — MPI Python package variants do not declare their mpi4py dependency Reviewed revision: The split recipe advertises This is a declared-dependency/build-contract finding; a full clean MPI package build was not run locally. Current package CI explicitly selects Suggested fix:
Further validation:
|
|
[agent] P1 — Fortran handle arrays bypass ownership safeguards Reviewed revision: The assignment-rejection procedures and finalizers are scalar and non-elemental. They do not cover whole-array operands: array assignment falls back to intrinsic assignment, copying the Evidence: a standalone GNU Fortran 15 reproduction of these procedure shapes produced zero defined-assignment calls, aliased pointers after whole-array assignment, and zero finalizer calls after array deallocation. This validates the language behavior, not an end-to-end SkalaXC use-after-free execution. Existing assignment tests cover scalar handles. Suggested fix:
Further validation:
|
|
[agent] P2 — CUDA task tiles need a launch-dimension cap as well as a memory cap Reviewed revision: Task count is used as CUDA grid dimension Y or Z. The driver passes remaining tasks to GauXC's memory-based buffer generation, which has no corresponding task-count cap. A sufficiently large tile can therefore fit in memory but exceed the device's launch limit and fail with an invalid launch configuration. Evidence: the available A100 reports Y/Z limits of 65,535; focused in-memory CUDA launches accepted 65,535 and rejected 65,536. Inspection of the pinned GauXC tiling implementation showed a memory-based stopping condition without this task cap. A complete large-molecule SkalaXC reproduction was not run, so the finding is conditional on a tile reaching that size. Suggested fix:
Further validation:
|
|
[agent] P2 — C example can read an oversized HDF5 dataset past its density allocation Reviewed revision: The example allocates density buffers using Evidence: a focused HDF5 runtime reproduction read eight dataset elements into a logical four-element output followed by four allocated guard slots. The read returned success and overwrote all four guards; no actual out-of-allocation write was needed to demonstrate the capacity mismatch. Suggested fix:
Further validation:
|
Aaron Kaplan (esoteric-ephemera)
left a comment
There was a problem hiding this comment.
It's a bit hard to review when the diff is so huge, but can we address a few cycles of agentic review and then merge? Would want to make sure basic functionality is integrated + tested
Preserve GPU-first documentation and D3 scanner fixes alongside SkalaXC setup instructions. All 150 class tests pass; local CuPy reports an unraisable allocator teardown warning. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Exercise installed Python bindings and stubs across native backend variants; fix mixed pytest collection, resolved GauXC test paths, MPI package dependencies, elemental Fortran ownership, CUDA launch-sized task tiles, and checked HDF5 density reads. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use the declared OpenBLAS provider at build and runtime instead of accidentally linking transitive MKL. Preserve scanner energy/gradient accuracy assertions and orbital-gradient convergence while allowing float32 energy noise. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Test LDA/PBE gradients and TPSS energy/potentials across both batch modes, matching the documented native TensorExpr limitation. Include and explicitly select the binding pytest configuration in conda tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Disable pytest-randomly for multi-rank launches after CUDA13 CI showed different per-rank seeds entering incompatible collectives. Retain randomized serial coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fail collective-test hangs promptly instead of consuming the six-hour job limit. Retry CUDA12 MPI after its runner exhausted disk space during compilation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Sebastian Ehlert (@awvwgk) feel free to close this one then, thanks for splitting it up into individual ones and improving the conda handling + documentation upgrade. Looks much better. |
|
Continuing this in #155 |
Summary
This PR introduces SkalaXC, a standalone C++17 shared library for evaluating Skala exchange-correlation functionals. It reuses GauXC’s lower-level numerical infrastructure while keeping GauXC, LibTorch, Eigen, and other implementation dependencies behind a stable, ABI-isolated public boundary.
The change also replaces the previous GauXC integration examples and Python export tooling with maintained C++, C, Fortran, and Python SkalaXC interfaces, dedicated packaging, and comprehensive CI coverage.
Standalone SkalaXC library
Public APIs and ABI isolation
Host, MPI, and CUDA execution
CUDA and host-compiler compatibility
Packaging and dependency management
Testing and CI
Documentation and examples
Legacy cleanup