Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
b91da5d
Add SuperLU_dist to Spack package
jhale Jan 30, 2026
391c2c6
Add comment
jhale Jan 30, 2026
b97d38f
Fix and add strict check
jhale Jan 30, 2026
7b92c4b
Formatting
jhale Jan 30, 2026
72dbbba
Remove complexity
jhale Jan 30, 2026
738b029
Reduce slightly mad number of combos
jhale Jan 30, 2026
2fa9285
Fix typo.
jhale Feb 9, 2026
f3d0f3f
Simplify and add superlu-dist variant test on main
jhale Feb 9, 2026
1efbf04
Fix.
jhale Feb 9, 2026
243317d
Fix
jhale Feb 9, 2026
03ae8f9
Tidy.
jhale Feb 9, 2026
ebcbe7c
More tweaks.
jhale Feb 9, 2026
d1ed073
Build with MUMPS and install test Python with right Python version.
jhale Feb 9, 2026
b780a2f
More pytest-xdist
jhale Feb 9, 2026
e0c9f86
Try running petsc4py and adios2 tests
jhale Feb 9, 2026
eec80da
UFCx is unlicense
jhale Feb 9, 2026
c6419f9
Short version
jhale Feb 9, 2026
9b4ea77
Black
jhale Feb 9, 2026
17f55cf
Fix
jhale Feb 9, 2026
b772eb3
Make sure compiler variant applies to base target - let Spack decide …
jhale Feb 9, 2026
842fbea
The way compiler is being added to spec is problematic.
jhale Feb 9, 2026
7d77bf4
Use spec directly - gives more control.
jhale Feb 10, 2026
f64fc8b
Fix.
jhale Feb 10, 2026
b53196f
Fix
jhale Feb 10, 2026
e4678f9
Fixes
jhale Feb 10, 2026
b4ef2e3
Fix python version
jhale Feb 10, 2026
9df431b
Remove more variant
jhale Feb 10, 2026
5e09b6a
Put variant on dep.
jhale Feb 10, 2026
3c2c1c1
Bind compiler from py wrapper to C++ library
jhale Feb 10, 2026
b7a97c8
Black
jhale Feb 10, 2026
ae7ca99
Fix
jhale Feb 10, 2026
b9f9947
Black fixes
jhale Feb 10, 2026
2dd4f2b
Try specifying a proper MPI
jhale Feb 10, 2026
81ce9f4
Try and use unify to get C++ to propagate down leafs.
jhale Feb 10, 2026
ed5711f
Back out, didn't work.
jhale Feb 10, 2026
c820020
Fixes, should pass (eep)
jhale Feb 10, 2026
f68cfd7
Try tests + try tighter spec of %clang@18
jhale Feb 10, 2026
5ca5d61
Fix.
jhale Feb 10, 2026
01168bf
Load cmake
jhale Feb 10, 2026
6ea98f1
Try with just cmake
jhale Feb 10, 2026
599e16e
Fix.
jhale Feb 10, 2026
75000d6
Fix cmake version to load
jhale Feb 10, 2026
7d23564
Try this
jhale Feb 10, 2026
4c687ac
Don't allow duplicates (might be too strong)
jhale Feb 10, 2026
4f43b51
Fix.
jhale Feb 10, 2026
49c9ba9
Load first cmake
jhale Feb 10, 2026
0764e90
Merge remote-tracking branch 'origin/main' into jhale/superlu-dist
jhale Feb 11, 2026
bf9f267
Add Spacks pyproject
jhale Feb 11, 2026
07d567f
black
jhale Feb 11, 2026
a775f0f
isort
jhale Feb 11, 2026
cb6c2f8
Try and fix just fenics-dolfinx
jhale Feb 12, 2026
221c5a4
Don't use mpilander!
jhale Feb 12, 2026
be326d7
Split lines
jhale Feb 12, 2026
b8758f0
Fixes
jhale Feb 12, 2026
40d9782
fix
jhale Feb 12, 2026
8b2acff
Fix.
jhale Feb 12, 2026
7a1c551
Remove cache
jhale Feb 12, 2026
9fa37e2
Try not pushing clang down
jhale Feb 12, 2026
58e3270
Also try tests with clang
jhale Feb 12, 2026
1b02da2
Why does it try gcc10!?
jhale Feb 12, 2026
0e2da05
try x86-v3
jhale Feb 12, 2026
9e894e6
Try getting it working on just gcc
jhale Feb 13, 2026
ba4f8e3
Fix quotes
jhale Feb 13, 2026
4ed4f85
OK, don't install clang
jhale Feb 13, 2026
ed282b4
Fix
jhale Feb 13, 2026
4d32383
Try Spack's buildcache
jhale Feb 13, 2026
3c4f689
Fix syntax
jhale Feb 13, 2026
a7a58cb
Fix - doesn't work with really old HDF5 version
jhale Feb 13, 2026
8b4ec98
Add catch2
jhale Feb 13, 2026
d9dd1d1
The deps on basix is only transitive
jhale Feb 13, 2026
dde5356
Backtrack
jhale Feb 13, 2026
955239c
Try this.
jhale Feb 14, 2026
2d13222
Is it necessary if unifying the concretiser?
jhale Feb 14, 2026
c5892e9
try this
jhale Feb 14, 2026
7e807df
Fix.
jhale Feb 14, 2026
c4f3507
Fix.
jhale Feb 14, 2026
02b76ac
Composite seems undesirable for debugging
jhale Feb 14, 2026
2e2bea7
OK, fine.
jhale Feb 14, 2026
d72bda4
Explicitly load fenics-dolfinx
jhale Feb 14, 2026
4db65d7
Constrain to Ubuntu 24.04 cache packages
jhale Feb 14, 2026
f4cb54e
Fix ubuntu for cache
jhale Feb 14, 2026
c364045
Propogate compilers down DAG
jhale Feb 14, 2026
edf3136
Fix
jhale Feb 14, 2026
d3bbf58
Fix.
jhale Feb 14, 2026
a876453
Doesn't work as ffcx is not in build-env
jhale Feb 14, 2026
22c0343
openmpi cache looks fuller
jhale Feb 14, 2026
8aec60a
Trick doesn't work, split into file and source
jhale Feb 15, 2026
c52e0e9
Reenable
jhale Feb 15, 2026
7dd2486
Use gcc for FFCx tests, skip ref count UFL test
jhale Feb 16, 2026
ecfd057
Try forcing Python to be built with GCC.
jhale Feb 16, 2026
d768cc5
0.8 tests ok but very very slow
jhale Feb 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 14 additions & 28 deletions .github/actions/test-package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,24 @@ inputs:
description: 'Spack spec syntax'
required: true
type: string
python-version:
description: 'Python version'
required: false
type: string
default: '3.13'
runs:
using: "composite"
steps:
- name: Install dependencies
shell: sh
run: |
apt-get -y update
apt-get install -y bzip2 curl file git gzip make patch tar unzip xz-utils

- uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version }}
apt-get install -y file bzip2 ca-certificates g++ gcc gfortran git gzip lsb-release patch python3 tar unzip xz-utils zstd

- name: Set up spack
uses: spack/setup-spack@v2
uses: spack/setup-spack@v3
with:
ref: develop
color: true
path: spack

- name: Install gcc-13 (default)
shell: sh
if: contains(inputs.spec, 'gcc@13') || (! contains(inputs.spec, 'clang') && ! contains(inputs.spec, 'gcc'))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we need these checks. There is something colliding for the clang runs. I'll try to figure out compilers in #23 to generalise.

run: apt-get install -y g++ gcc gfortran build-essential
spack_ref: develop

- name: Install clang-18
shell: sh
if: contains(inputs.spec, 'clang@18')
run: apt-get install -y clang-18 gfortran
run: apt-get install -y clang-18

- name: Add repos
shell: spack-bash {0}
Expand All @@ -47,12 +31,12 @@ runs:
spack config get repos
spack repo list

- name: add cache
- name: Add cache
shell: spack-bash {0}
run: |
spack mirror add e4s-25.11 https://cache.e4s.io/25.11
spack buildcache keys --install --trust
spack config add "packages:all:target:[x86_64_v3]"
spack mirror add develop https://binaries.spack.io/develop
spack config add "packages:all:require:['os=ubuntu24.04','target=x86_64_v3']"
spack buildcache keys --install --trust

- name: Compiler find
shell: spack-bash {0}
Expand All @@ -62,14 +46,16 @@ runs:
shell: spack-bash {0}
run: spack env create -d ./env

- name: Add spec
- name: Add specs
shell: spack-bash {0}
run: spack -e ./env add ${{ inputs.spec }}

- name: Concretize
shell: spack-bash {0}
run: spack -e ./env concretize -j 4

run: |
spack -e ./env config add concretizer:unify:true
spack -e ./env concretize -j 4

- name: Install
shell: spack-bash {0}
run: >
Expand All @@ -81,5 +67,5 @@ runs:
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.spec }}-${{ inputs.python-version }}-log
name: ${{ inputs.spec }}-log
path: log.xml
153 changes: 95 additions & 58 deletions .github/workflows/spack-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,22 @@ on:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 2 * * MON" # weekly, mondays 2am
- cron: "0 2 * * MON" # weekly, Mondays 0200

jobs:
style-check:
name: ✨
runs-on: ubuntu-latest

steps:
- uses: actions/setup-python@v6
with:
python-version: '3.13'
- uses: actions/checkout@v5
with:
fetch-depth: 2
- uses: actions/checkout@v5
- name: Fetch Spack CI scripts
uses: actions/checkout@v5
with:
repository: spack/spack
ref: develop
Expand All @@ -41,15 +43,15 @@ jobs:
fail-fast: false
matrix:
version: ["main", "0.10", "0.9", "0.8"]
variant: ["build_type=Developer"]
compiler: ["gcc@13", "clang@18"]
spec: ["build_type=Developer %gcc@13", "build_type=Developer %clang@18"]

steps:
- uses: actions/checkout@v5
with:
path: spack-fenics
- uses: ./spack-fenics/.github/actions/test-package
with:
spec: fenics-basix@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
spec: fenics-basix@${{ matrix.version }} ${{ matrix.spec }}

fenics-dolfinx:
needs: style-check
Expand All @@ -58,20 +60,39 @@ jobs:
strategy:
fail-fast: false
matrix:
# NOTE: clang sometimes likes stub or Intel MPI. Force MPI implementations.
version: ["main", "0.10", "0.9", "0.8"]
variant: ["build_type=Developer", "partitioners=kahip,parmetis,scotch", "+petsc +slepc +adios2"]
Comment thread
schnellerhase marked this conversation as resolved.
compiler: ["gcc@13", "clang@18"]
exclude:
# kahip does not support clang
- variant: "partitioners=kahip,parmetis,scotch"
compiler: "clang@18"
main_spec: ["build_type=Developer %%c,cxx=clang@18 ^mpich", "build_type=Developer partitioners=kahip,parmetis,scotch +petsc +slepc +adios2 %%gcc@13 ^openmpi"]
env:
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
PRTE_MCA_rmaps_default_mapping_policy: :oversubscribe # Newer OpenMPI
OMPI_MCA_rmaps_base_oversubscribe: true # Older OpenMPI

steps:
- uses: actions/checkout@v5
with:
path: spack-fenics
- uses: ./spack-fenics/.github/actions/test-package
with:
spec: fenics-dolfinx@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
spec: fenics-dolfinx@${{ matrix.version }} ${{ matrix.main_spec }} py-fenics-ffcx catch2 cmake
# FFCx compilation of poisson.py fails in ffcx/codegeneration/C/finite_element.py
- name: Run tests (skip 0.8)
shell: spack-bash {0}
if: ${{ matrix.version != '0.8' }}
run: |
spack env activate ./env
spack load --first catch2 cmake fenics-dolfinx py-fenics-ffcx
spack stage fenics-dolfinx@${{ matrix.version }} ${{ matrix.main_spec }}
spack cd fenics-dolfinx@${{ matrix.version }} ${{ matrix.main_spec }}
spack build-env --dump fenics-dolfinx-build-env.sh fenics-dolfinx
source fenics-dolfinx-build-env.sh
cmake -B build/test/ -S cpp/test/ -DCMAKE_BUILD_TYPE=Developer
cmake --build build/test
cd build/test
ctest -V --output-on-failure -R unittests_np_1
ctest -V --output-on-failure -R unittests_np_3


fenics-ufcx:
needs: style-check
Expand All @@ -81,14 +102,15 @@ jobs:
fail-fast: false
matrix:
version: ["main", "0.10", "0.9", "0.8"]
compiler: ["gcc@13", "clang@18"]
spec: ["%gcc@13"]

steps:
- uses: actions/checkout@v5
with:
path: spack-fenics
- uses: ./spack-fenics/.github/actions/test-package
with:
spec: fenics-ufcx@${{ matrix.version }} %${{ matrix.compiler }}
spec: fenics-ufcx@${{ matrix.version }} ${{ matrix.spec }}

py-fenics-basix:
needs: style-check
Expand All @@ -98,35 +120,35 @@ jobs:
fail-fast: false
matrix:
version: ["main", "0.10", "0.9", "0.8"]
variant: ["", "+ufl"]
compiler: ["gcc@13", "clang@18"]
# Make sure fenics-basix and py-fenics-basix build with same compiler/ABI.
spec: ["+ufl %gcc@13 ^fenics-basix%gcc@13", "+ufl %clang@18 ^fenics-basix%clang@18"]

steps:
- uses: actions/checkout@v5
with:
path: spack-fenics
- uses: ./spack-fenics/.github/actions/test-package
with:
spec: py-fenics-basix@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
# workaround for https://github.com/spack/spack/issues/29447
- name: Run tests (> 0.8)
if: ${{ matrix.version != '0.8' && contains(matrix.variant, '+ufl') }}
spec: py-fenics-basix@${{ matrix.version }} ${{ matrix.spec }}
- name: Run tests
if: ${{ matrix.version != '0.8' }}
shell: spack-bash {0}
run: |
spack env activate ./env
spack install --add py-pytest py-sympy
spack stage py-fenics-basix@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
spack cd py-fenics-basix@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
pytest test/
# 0.8 holds one broken test case
- name: Run tests (0.8)
if: ${{ matrix.version == '0.8' && contains(matrix.variant, '+ufl') }}
spack install --add py-pytest py-sympy py-pytest-xdist
spack stage py-fenics-basix@${{ matrix.version }} ${{ matrix.spec }}
spack cd py-fenics-basix@${{ matrix.version }} ${{ matrix.spec }}
python -m pytest -n auto test/
# NOTE: 0.8 has test_all_elements_included broken
- name: Run tests
if: ${{ matrix.version == '0.8' }}
shell: spack-bash {0}
run: |
spack env activate ./env
spack install --add py-pytest py-sympy
spack stage py-fenics-basix@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
spack cd py-fenics-basix@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
pytest test/ -k "not test_all_elements_included"
spack install --add py-pytest py-sympy py-pytest-xdist
spack stage py-fenics-basix@${{ matrix.version }} ${{ matrix.spec }}
spack cd py-fenics-basix@${{ matrix.version }} ${{ matrix.spec }}
python -m pytest -n auto -k "not test_all_elements_included" test/

py-fenics-dolfinx:
needs: style-check
Expand All @@ -136,37 +158,51 @@ jobs:
fail-fast: false
matrix:
version: ["main", "0.10", "0.9", "0.8"]
variant: ["build_type=Developer", "+petsc4py +slepc4py"]
compiler: ["gcc@13", "clang@18"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.13"]
# NOTE: Overspecification of %%clang@18 to fix ABI issues (std::string related?).
# NOTE: clang sometimes likes stub or Intel MPI.
spec: ["build_type=Developer +petsc4py +slepc4py %%gcc@13 ^petsc+mumps ^fenics-dolfinx+adios2 ^mpich",
"build_type=Developer %%clang@18 ^openmpi"]
# Test new superlu-dist variant
include:
- version: "main"
spec: "build_type=Developer %%clang@18 ^mpich ^fenics-dolfinx+superlu-dist"
python-version: "3.12"
env:
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
PRTE_MCA_rmaps_default_mapping_policy: :oversubscribe # Newer OpenMPI
OMPI_MCA_rmaps_base_oversubscribe: true # Older OpenMPI

steps:
- uses: actions/checkout@v5
with:
path: spack-fenics
- uses: ./spack-fenics/.github/actions/test-package
with:
spec: py-fenics-dolfinx@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
python-version: ${{ matrix.python-version }}
# workaround for https://github.com/spack/spack/issues/29447
# pytest@8.4 required for collision of [tool.pytest] and [tool.pytest.ini_options] since @9.0 (at least for dolfinx @:0.9)
- name: Run tests
if: ${{ matrix.version == '0.8' || matrix.version == '0.9'}}
spec: py-fenics-dolfinx@${{ matrix.version }} ${{ matrix.spec }} ^python@${{ matrix.python-version }}
# pytest@8.4 required for collision of [tool.pytest] and [tool.pytest.ini_options] since @9.0
- name: Run tests (0.9)
if: ${{ matrix.version == '0.9'}}
shell: spack-bash {0}
run: |
spack env activate ./env
spack install --add py-pytest@8.4 py-scipy
spack stage py-fenics-dolfinx@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
spack cd py-fenics-dolfinx@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
pytest python/test/unit -m "not petsc4py and not adios2" -k "not test_cffi_expression and not test_cube_distance"
- name: Run tests
spack install --add py-pytest@8.4 py-scipy py-pytest-xdist ^python@${{ matrix.python-version }}
spack stage py-fenics-dolfinx@${{ matrix.version }} ${{ matrix.spec }} ^python@${{ matrix.python-version }}
spack cd py-fenics-dolfinx@${{ matrix.version }} ${{ matrix.spec }} ^python@${{ matrix.python-version }}
python -m pytest -n auto -m "not petsc4py and not adios2" -k "not test_cffi_expression and not test_cube_distance" python/test/unit
mpiexec -n 3 python -m pytest -m "not petsc4py and not adios2" -k "not test_cffi_expression and not test_cube_distance" python/test/unit
# NOTE: 0.8 tests run very slow - skip?
- name: Run tests (not 0.8 and not 0.9)
if: ${{ matrix.version != '0.8' && matrix.version != '0.9'}}
shell: spack-bash {0}
run: |
spack env activate ./env
spack install --add py-pytest@8.4 py-scipy
spack stage py-fenics-dolfinx@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
spack cd py-fenics-dolfinx@${{ matrix.version }} ${{ matrix.variant }} %${{ matrix.compiler }}
pytest python/test/unit -m "not petsc4py and not adios2" -k "not test_cffi_expression"
spack install --add py-pytest py-scipy py-pytest-xdist ^python@${{ matrix.python-version }}
spack stage py-fenics-dolfinx@${{ matrix.version }} ${{ matrix.spec }} ^python@${{ matrix.python-version }}
spack cd py-fenics-dolfinx@${{ matrix.version }} ${{ matrix.spec }} ^python@${{ matrix.python-version }}
python -m pytest -n auto -m "not petsc4py and not adios2" -k "not test_cffi_expression and not test_symmetry_interior_facet_assembly[mesh1]" python/test/unit
mpiexec -n 3 python -m pytest -m "not petsc4py and not adios2" -k "not test_cffi_expression and not test_symmetry_interior_facet_assembly[mesh1]" python/test/unit

py-fenics-ffcx:
needs: style-check
Expand All @@ -176,25 +212,25 @@ jobs:
fail-fast: false
matrix:
version: ["main", "0.10", "0.9", "0.8"]

steps:
- uses: actions/checkout@v5
with:
path: spack-fenics
# NOTE: Python built with GCC, otherwise cffi can try for an odd compiler.
- uses: ./spack-fenics/.github/actions/test-package
with:
spec: py-fenics-ffcx@${{ matrix.version }}
# workaround for https://github.com/spack/spack/issues/29447
# we do not run numba based tests here due to disk-space constraints
# 0.8 broken
spec: py-fenics-ffcx@${{ matrix.version }} ^python %%gcc@13
# NOTE: ffcx version 0.8 currently broken
- name: Run tests
if: ${{ matrix.version != '0.8' }}
shell: spack-bash {0}
run: |
spack env activate ./env
spack install --add py-pytest py-sympy
spack install --add py-pytest py-sympy py-pytest-xdist
spack stage py-fenics-ffcx@${{ matrix.version }}
spack cd py-fenics-ffcx@${{ matrix.version }}
pytest test/
python -m pytest -n auto test/

py-fenics-ufl:
needs: style-check
Expand All @@ -204,19 +240,20 @@ jobs:
fail-fast: false
matrix:
version: ["main", "2025.2", "2025.1", "2024.2", "2024.1"]

steps:
- uses: actions/checkout@v5
with:
path: spack-fenics
- uses: ./spack-fenics/.github/actions/test-package
with:
spec: py-fenics-ufl@${{ matrix.version }}
# workaround for https://github.com/spack/spack/issues/29447
# NOTE: Reference counting changed in Python 3.14, leading to test failure.
- name: Run tests
shell: spack-bash {0}
run: |
spack env activate ./env
spack install --add py-pytest
spack install --add py-pytest py-pytest-xdist
spack stage py-fenics-ufl@${{ matrix.version }}
spack cd py-fenics-ufl@${{ matrix.version }}
pytest test/
python -m pytest -n auto -k "not test_strip_form_arguments_strips_data_refs" test/
Loading