Skip to content

feat: Improve linear solvers testing - #4108

Open
victorapm wants to merge 8 commits into
developfrom
feature/paludettomag1/hypredrive-testing
Open

feat: Improve linear solvers testing#4108
victorapm wants to merge 8 commits into
developfrom
feature/paludettomag1/hypredrive-testing

Conversation

@victorapm

@victorapm victorapm commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

This PR adds hypre/hypredrive tests to the regression suite. It adds _mgr smoke decks covering 25 of the 27 implemented MGR strategies (mostly derived from existing decks by switching their direct solver to gmres+MGR), of which 23 are registered in ATS. Baselines for these tests are generated by ENABLE_HYPREDRV=OFF builds, so on a hypredrive-enabled build the same tests double as an equivalence check between the hypredrive and legacy hypre paths.

Some additional details:

  1. Add a rank-0 warning when hypredrive silently falls back to the legacy hypre-only path, an ats_run_force_legacy CMake target (GEOS_HYPREDRV_FORCE_LEGACY=1 re-run against the same
    baselines), and unit tests asserting numerical parity of both the pure hypre and hypredrive paths.
  2. scripts/compareLinearSolverIterations.py asserts iteration-count parity, so a quality regression with a still-correct answer cannot pass silently.
  3. CI plumbing (--enable-hypredrv, a GEOS_REQUIRE_HYPREDRV configure-time guard, and a hypredrive+legacy double pass in the integrated-tests job).
  4. Improvements to developer documentation.

Building these tests surfaced and fixed several real bugs:

  1. HypredriveSolver ran hypre preconditioner setup without the FPE guard the legacy path has always used, crashing a few test problems.
  2. The generated ILU YAML omitted the local-reordering setting, silently configuring a different preconditioner than the legacy path.
  3. Contact solvers assigned their MGR strategy after the base class had already downgraded mgr to amg, making MGR unreachable for the whole contact family. This needs further work in an upcoming PR.
  4. SinglePhaseReservoirHybridFVM had an inverted areWellsShut conditional, applying weak Jacobi relaxation to active well blocks.
  5. Both compositional hybrid-FVM recipes were structurally invalid (True-IMPES restriction with face dofs in the C-space, segfaulting in hypre) and are rewritten as cell-block condensation reductions, backed by new MGRFRelaxationType::ilu support and an explicitly configured ILU F-solver (setILUFSolverAtLevel) so both paths use identical F-relaxation.
  6. The TPL bump also moves the rockylinux9-clang22 image from clang 20.1.8 to 22.1.3 which has added -Wc2y-extensions and leads to issues in the BLT's bundled google-benchmark. This was fixed by avoiding the c2y flag in BLT.

Known limitations

  1. Three strategies are not covered in CI: singlePhasePoromechanicsConformingFractures and thermalSinglePhasePoromechanicsReservoirFVM have working decks included but unregistered, pending
    cross-path tolerance calibration; immiscibleMultiphaseFVM has no deck yet.
  2. Two tests are deferred to a follow-up PR, disabled rather than diagnosed:
    - ALM_TFrac_mgr_smoke is commented out. Its recipe hits the 200-iteration cap on the first few solves and settles to ~50 afterwards. This happens on both solver paths, but the two end
    with different non-converged counts (3 vs 4), which trips the parity check. Tuning belongs in mgrStrategies/AugmentedLagrangianContactMechanics.hpp.
    - ThermoPoroElastic_consolidation_mgr_smoke_fim (1, 2, 1) partition is dropped, keeping (1, 1, 1) so the strategy retains coverage. On two ranks the two paths take a different number
    of nonlinear iterations (890 vs 1224 solves, 41% apart in total linear iterations). The answers still agree and the restart run compares clean.

Depends on GEOS-DEV/thirdPartyLibs#357

@victorapm victorapm self-assigned this Aug 1, 2026
@victorapm victorapm added ci: run CUDA builds Allows to triggers (costly) CUDA jobs ci: run integrated tests Allows to run the integrated tests in GEOS CI ci: run code coverage enables running of the code coverage CI jobs labels Aug 2, 2026
@victorapm victorapm changed the title [WIP] Improve linear solvers testing feat: Improve linear solvers testing Aug 2, 2026
@victorapm
victorapm marked this pull request as ready for review August 2, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci: run code coverage enables running of the code coverage CI jobs ci: run CUDA builds Allows to triggers (costly) CUDA jobs ci: run integrated tests Allows to run the integrated tests in GEOS CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant