Skip to content

chore(deps): raise conda-petsc floor to >=3.25 (FMG/rotation API consistency)#304

Merged
lmoresi merged 2 commits into
developmentfrom
chore/conda-petsc-3.25-floor
Jul 3, 2026
Merged

chore(deps): raise conda-petsc floor to >=3.25 (FMG/rotation API consistency)#304
lmoresi merged 2 commits into
developmentfrom
chore/conda-petsc-3.25-floor

Conversation

@lmoresi

@lmoresi lmoresi commented Jul 3, 2026

Copy link
Copy Markdown
Member

Why

The conda-petsc environments (default/dev/runtime + mpich/openmpi) pinned petsc/petsc4py >=3.21, resolving to 3.24.x. The custom hierarchical FMG uses a petsc4py 3.25 API — PETSc.KSP.DMActive (custom_mg.py:433) — so test_1015/1016/1017 fail on the conda env with AttributeError, even though they pass on the custom amr build (petsc4py 3.25). The conda dev env was inconsistent with both the code and the custom build.

Change

Raise the conda-petsc floor to >=3.25,<4 (petsc 3.25.3 + petsc4py 3.25.3 numpy-2 builds are on conda-forge). Now petsc ↔ petsc4py agree at 3.25, DMActive is present, and the conda dev env matches the custom amr build.

Validation

Re-solved dev (petsc4py 3.25.3, numpy 2.5.0): the custom-MG / SBR / rotated-free-slip / FMG-lockout suite passes — test_1015/1016/1017/1018/1020, 29 passed. This confirms the custom hierarchical FMG is numpy-2 clean and closes the local-validation gap tracked in #303.

Follow-on for #247's min-PETSc note: the effective floor for full functionality (custom FMG) is 3.25, not 3.21.

Underworld development team with AI support from Claude Code

…istency)

The conda-petsc environments (default/dev/runtime + mpich/openmpi variants)
pinned petsc/petsc4py >=3.21, which resolved to 3.24.x. The custom hierarchical
FMG uses a petsc4py 3.25 API (PETSc.KSP.DMActive, custom_mg.py:433), so
test_1015/1016/1017 could not run on the conda env (AttributeError) even though
they pass on the custom amr build (petsc4py 3.25). This left the conda dev env
inconsistent with the code and with the custom build.

Raise the conda-petsc floor to >=3.25,<4 (petsc 3.25.3 + petsc4py 3.25.3 numpy-2
builds are on conda-forge). Now petsc and petsc4py agree at 3.25, the DMActive
API is present, and the conda dev env matches the custom amr build.

Validated on the re-solved dev env (petsc4py 3.25.3, numpy 2.5.0): the full
custom-MG / SBR / rotated-free-slip / FMG-lockout suite passes
(test_1015/1016/1017/1018/1020 — 29 passed). This also confirms the custom
hierarchical FMG is numpy-2 clean (closes the local-validation gap in #303).

Underworld development team with AI support from Claude Code

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the pixi conda-forge PETSc feature definitions to require PETSc/petsc4py 3.25+, aligning the conda environments with the petsc4py API usage in custom_mg.py (notably PETSc.KSP.DMActive), and preventing conda-env test failures caused by resolving to petsc4py 3.24.x.

Changes:

  • Raise petsc minimum version in conda-petsc features from >=3.21,<4 to >=3.25,<4.
  • Raise petsc4py minimum version in conda-petsc features from >=3.21,<4 to >=3.25,<4.
  • Apply the same floor consistently across default, mpich, and openmpi conda-petsc feature variants.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lmoresi

lmoresi commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

Thanks @copilot-pull-request-reviewer — the summary is accurate. To add the validation context behind it:

  • The 3.25 requirement is real, not conservative: custom_mg.py:433 uses PETSc.KSP.DMActive.OPERATOR (a petsc4py 3.25 enum) to call KSPSetDMActive(OPERATOR, False) — absent in 3.24.x, so the conda env raised AttributeError and couldn't run the custom-FMG suite at all.
  • conda-forge ships petsc/petsc4py 3.25.3 with numpy-2 builds, so the floor resolves cleanly (verified: pixi lock upgraded petsc 3.24.5→3.25.3, petsc4py 3.24.4→3.25.3).
  • Post-bump the re-solved dev env (petsc4py 3.25.3 + numpy 2.5.0) runs the full custom-MG / SBR / rotated-free-slip / FMG-lockout suite green (test_1015/1016/1017/1018/1020 — 29 passed), which also confirms the custom hierarchical FMG is numpy-2 clean.

No source changes — config-only floor bump, so the API contract now matches the code.

… sqlite-3.32.3)

The petsc 3.25 bump perturbed the linux-64 conda solve into pulling
sqlite-3.32.3, whose bundled libsqlite lacks sqlite3_deserialize, so python's
_sqlite3 failed to load (undefined symbol) and any sqlite-importing test module
(test_1004) errored at collection. Floor sqlite to >=3.46; re-locked to
sqlite 3.51+ on all platforms.

Underworld development team with AI support from Claude Code
@lmoresi lmoresi merged commit 9bd6c8e into development Jul 3, 2026
1 check passed
@lmoresi lmoresi deleted the chore/conda-petsc-3.25-floor branch July 3, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants