Skip to content

Move to our Spack package fork. - #3981

Merged
jhale merged 54 commits into
mainfrom
jhale/spack-to-fenics-package-repo
Nov 13, 2025
Merged

Move to our Spack package fork.#3981
jhale merged 54 commits into
mainfrom
jhale/spack-to-fenics-package-repo

Conversation

@jhale

@jhale jhale commented Nov 11, 2025

Copy link
Copy Markdown
Member

This moves to our own Spack package repo which is a fork of the builtin repo.

In the near future, we should probably implement our own package repo as an overlay to the builtin repo. This would allow us to roll out, and test, Spack releases of FEniCS before merging them onto the builtin repo. Additionally, we would not need to manually bump our own builtin repo branch.

During this process, I discovered that +hypre for PETSc is causing PETSc to concretise to an old version. Inspecting the package.py, it is not clear why this happens. For now, ^petsc~hypre is set.

@jhale

jhale commented Nov 11, 2025

Copy link
Copy Markdown
Member Author

PETSc is failing to build due to an old version of Hypre (which is in the cache). However, the Spack package file for PETSc precludes this. Unclear.

@jhale

jhale commented Nov 13, 2025

Copy link
Copy Markdown
Member Author

Wildly different pressure norm for the monolithic direct solve.

----------------------------- Captured stdout call -----------------------------
(A) Norm of velocity coefficient vector (high-level nested, iterative): 17.47837016420078
(A) Norm of pressure coefficient vector (high-level nested, iterative): 311.4425379648746
(A) Norm of velocity coefficient vector (low-level nested, iterative): 17.47837016420078
(A) Norm of pressure coefficient vector (low-level nested, iterative): 311.4425379648746
(B) Norm of velocity coefficient vector (blocked, iterative): 17.478370164287277
(B) Norm of pressure coefficient vector (blocked, iterative): 311.44253796470696
(C) Norm of velocity coefficient vector (blocked, direct): 17.478367449917705
(C) Norm of pressure coefficient vector (blocked, direct): 311.44253044039357
(D) Norm of velocity coefficient vector (monolithic, direct): 17.468884396369752
(D) Norm of pressure coefficient vector (monolithic, direct): 1193.2978766802526
----------------------------- Captured stderr call -----------------------------
Traceback (most recent call last):
  File "/__w/dolfinx/dolfinx/dolfinx-src/python/demo/demo_stokes.py", line 672, in <module>
    np.testing.assert_allclose(norm_u_4, norm_u_0, rtol=1e-4)
  File "/opt/view/lib/python3.12/site-packages/numpy/testing/_private/utils.py", line 1715, in assert_allclose
    assert_array_compare(compare, actual, desired, err_msg=str(err_msg),
  File "/opt/view/lib/python3.12/site-packages/numpy/testing/_private/utils.py", line 921, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Not equal to tolerance rtol=0.0001, atol=0

Mismatched elements: 1 / 1 (100%)
Max absolute difference among violations: 0.00948577
Max relative difference among violations: 0.00054271
 ACTUAL: array(17.468884)
 DESIRED: array(17.47837)

@jhale

jhale commented Nov 13, 2025

Copy link
Copy Markdown
Member Author

hdf5+hl fix pushed upstream spack/spack-packages#2402

@jhale

jhale commented Nov 13, 2025

Copy link
Copy Markdown
Member Author

Above issue fixed - note that SuperLU is probably unsuitable for a problem with a nullspace.

@jhale
jhale added this pull request to the merge queue Nov 13, 2025
Merged via the queue into main with commit f32e51e Nov 13, 2025
19 checks passed
@jhale
jhale deleted the jhale/spack-to-fenics-package-repo branch November 13, 2025 22:00
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