Context
numpy 2 support landed in #301 (#247). CI is green, but it runs on the conda-petsc env (petsc4py 3.24.5) and does not exercise the custom hierarchical-FMG / triangle-splitting suite (test_1015/1016/1017, level_2/tier_b).
Gap
The custom-MG code targets petsc4py 3.25 (the custom amr build). It uses PETSc.KSP.DMActive.OPERATOR (custom_mg.py:433), a 3.25 enum absent from conda petsc4py 3.24.5:
AttributeError: type object 'petsc4py.PETSc.KSP' has no attribute 'DMActive'
So the suite cannot be validated in the conda dev env — it needs petsc4py 3.25. The only env with 3.25 is the custom amr build, whose petsc4py is currently compiled against numpy 1.26 and is ABI-broken under numpy 2.5 (numpy.dtype size changed).
The suite passes under amr-dev on numpy 1.26 (petsc4py 3.25) — this is purely a numpy-2 verification gap, not a known break.
To close
Rebuild the custom PETSc 3.25 / petsc4py against numpy 2 (petsc-local-build), then run test_1015/1016/1017 in amr-dev under numpy 2 (planned on the cluster, where the custom PETSc + numpy 2 coexist).
Optional hardening (separate)
If the custom-MG path should also run on conda petsc4py, guard custom_mg.py:433 with a fallback: PETSc.KSP.DMActive.OPERATOR (3.25) → ksp.setDMActive(False) (older signature).
Context
numpy 2 support landed in #301 (#247). CI is green, but it runs on the conda-petsc env (petsc4py 3.24.5) and does not exercise the custom hierarchical-FMG / triangle-splitting suite (
test_1015/1016/1017, level_2/tier_b).Gap
The custom-MG code targets petsc4py 3.25 (the custom
amrbuild). It usesPETSc.KSP.DMActive.OPERATOR(custom_mg.py:433), a 3.25 enum absent from conda petsc4py 3.24.5:So the suite cannot be validated in the conda
devenv — it needs petsc4py 3.25. The only env with 3.25 is the customamrbuild, whose petsc4py is currently compiled against numpy 1.26 and is ABI-broken under numpy 2.5 (numpy.dtype size changed).The suite passes under
amr-devon numpy 1.26 (petsc4py 3.25) — this is purely a numpy-2 verification gap, not a known break.To close
Rebuild the custom PETSc 3.25 / petsc4py against numpy 2 (
petsc-local-build), then runtest_1015/1016/1017inamr-devunder numpy 2 (planned on the cluster, where the custom PETSc + numpy 2 coexist).Optional hardening (separate)
If the custom-MG path should also run on conda petsc4py, guard
custom_mg.py:433with a fallback:PETSc.KSP.DMActive.OPERATOR(3.25) →ksp.setDMActive(False)(older signature).