Skip to content

Commit 0063728

Browse files
Merge branch 'main' into schnellerhase/vtx-timeseries
2 parents 884111f + 4c25ace commit 0063728

79 files changed

Lines changed: 1965 additions & 1041 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-wheels.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ jobs:
201201
cmake -G Ninja -S dolfinx/cpp -B dolfinx-build-dir/ \
202202
-DPython3_EXECUTABLE=$(which python) \
203203
-DCMAKE_PREFIX_PATH=/usr/lib64/mpich \
204-
-DCMAKE_BUILD_TYPE=RelWithDebug \
204+
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
205205
-DDOLFINX_ENABLE_SUPERLU_DIST=ON \
206206
-DDOLFINX_ENABLE_SCOTCH=ON \
207207
-DDOLFINX_ENABLE_PARMETIS=OFF &&
@@ -240,7 +240,7 @@ jobs:
240240
-DDOLFINX_ENABLE_SCOTCH=ON \
241241
-DDOLFINX_ENABLE_PARMETIS=OFF \
242242
-DDOLFINX_ENABLE_SUPERLU_DIST=ON \
243-
-DCMAKE_BUILD_TYPE=RelWithDebug &&
243+
-DCMAKE_BUILD_TYPE=RelWithDebInfo &&
244244
cmake --build $GITHUB_WORKSPACE/dolfinx-build-dir/ &&
245245
sudo cmake --install dolfinx-build-dir/
246246
# As of 6/26 DOLFINx uses std::jthread which is only officially
@@ -271,7 +271,7 @@ jobs:
271271
wheel pack {dest_dir}/unpacked/* -d {dest_dir} &&
272272
pipx run abi3audit --verbose --strict --report {wheel}
273273
CIBW_TEST_REQUIRES: pytest-xdist
274-
CIBW_TEST_EXTRAS: test
274+
CIBW_TEST_GROUPS: test
275275
CIBW_TEST_COMMAND_LINUX: >
276276
. /etc/profile &&
277277
module load mpi/mpich-$(arch) &&
@@ -313,7 +313,7 @@ jobs:
313313
sudo git clean -fdx && cd ../ &&
314314
docker run -v $(pwd)/dolfinx:/dolfinx -v $(pwd)/simple:/shared \
315315
--env PIP_INDEX_URL=file:///shared --env PIP_EXTRA_INDEX_URL=https://pypi.org/simple python:3.13 \
316-
/bin/bash -l -c "pip install mpich fenics-dolfinx[test] && mpiexec -n 2 python -m pytest -m 'not adios2 and not petsc4py' /dolfinx/python/test/unit"
316+
/bin/bash -l -c "pip install --group /dolfinx/python/pyproject.toml:test mpich fenics-dolfinx && mpiexec -n 2 python -m pytest -m 'not adios2 and not petsc4py' /dolfinx/python/test/unit"
317317
318318
- name: Test in clean python image with pypi Intel MPI (x86_64 only)
319319
if: runner.os == 'Linux' && runner.arch == 'X64'
@@ -322,15 +322,15 @@ jobs:
322322
sudo git clean -fdx && cd ../ &&
323323
docker run -v $(pwd)/dolfinx:/dolfinx -v $(pwd)/simple:/shared \
324324
--env PIP_INDEX_URL=file:///shared --env PIP_EXTRA_INDEX_URL=https://pypi.org/simple python:3.14 \
325-
/bin/bash -l -c "pip install impi-rt fenics-dolfinx[test] && mpiexec -n 2 python -m pytest -m 'not adios2 and not petsc4py' /dolfinx/python/test/unit"
325+
/bin/bash -l -c "pip install --group /dolfinx/python/pyproject.toml:test impi-rt fenics-dolfinx && mpiexec -n 2 python -m pytest -m 'not adios2 and not petsc4py' /dolfinx/python/test/unit"
326326
327327
- name: Test in clean virtual environment with pypi OpenMPI (macOS)
328328
if: runner.os == 'macOS'
329329
run: |
330330
cd dolfinx && git clean -fdx && cd ../
331331
python -m venv venv-test
332332
source venv-test/bin/activate
333-
PIP_EXTRA_INDEX_URL="file://${GITHUB_WORKSPACE}/simple" pip install openmpi fenics-dolfinx[test]
333+
PIP_EXTRA_INDEX_URL="file://${GITHUB_WORKSPACE}/simple" pip install --group dolfinx/python/pyproject.toml:test openmpi fenics-dolfinx
334334
which mpiexec
335335
mpiexec -n 2 python -m pytest -m "not adios2 and not petsc4py" dolfinx/python/test/unit
336336

.github/workflows/ccpp.yml

Lines changed: 19 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ on:
1515
- main
1616
workflow_dispatch:
1717

18+
# Cancel superseded runs: a new commit on a pull request makes the
19+
# previous run's result irrelevant. Pushes to 'main' and 'release' are
20+
# left to finish, since they populate caches and publish artefacts.
21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.ref }}
23+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
24+
1825
jobs:
1926

2027
lint:
@@ -33,7 +40,7 @@ jobs:
3340
run: cat .github/workflows/fenicsx-refs.env >> $GITHUB_ENV
3441

3542
- name: Install linting tools
36-
run: pip install clang-format gersemi mypy ruff
43+
run: pip install --group python/pyproject.toml:lint
3744
- name: ruff .py files in C++ code
3845
run: |
3946
cd cpp/
@@ -56,13 +63,6 @@ jobs:
5663
find . -type f \( -name "*.cpp" -o -name "*.h" \) | xargs clang-format --dry-run --Werror
5764
- name: gersemi
5865
run: gersemi --check .
59-
- name: mypy checks (no installed)
60-
run: |
61-
cd python/
62-
MYPY_FLAGS="--ignore-missing-imports --disable-error-code no-any-unimported --disable-error-code unused-ignore --disable-error-code attr-defined --disable-error-code name-defined --disable-error-code no-any-return"
63-
mypy $MYPY_FLAGS dolfinx
64-
mypy $MYPY_FLAGS demo
65-
mypy $MYPY_FLAGS test
6666

6767

6868
ccpp-build:
@@ -96,8 +96,7 @@ jobs:
9696
- name: Install Python build dependencies
9797
working-directory: python
9898
run: |
99-
pip install scikit-build-core setuptools
100-
python -m scikit_build_core.build requires | python -c "import sys, json; print(' '.join(json.load(sys.stdin)))" | xargs pip install
99+
pip install --group pyproject.toml:build setuptools
101100
102101
- name: Install UFL
103102
run: |
@@ -151,28 +150,19 @@ jobs:
151150

152151
- name: Build Python interface
153152
run: >
154-
pip install 'python/[test,mypy]'
153+
pip install --group python/pyproject.toml:test 'python/[demo]'
155154
--check-build-dependencies
156155
--no-build-isolation
157156
--config-settings=cmake.build-type="Developer"
158157
159158
- name: Check Python configuration
160159
run: python -c "from mpi4py import MPI; import dolfinx; assert not dolfinx.has_petsc; assert not dolfinx.has_petsc4py; assert dolfinx.has_superlu_dist"
161160

162-
- name: Install gmsh and pyvista (and dependencies)
161+
- name: Install system dependencies for gmsh and pyvista
163162
run: |
164163
sudo apt-get install libglu1-mesa libgl1 libxrender1 libxcursor1 libxft2 libxinerama1
165164
sudo apt-get install libegl1
166-
pip install gmsh pyvista
167165
168-
- name: mypy checks (no petsc4py)
169-
run: |
170-
DISABLE_FLAGS="--disable-error-code import-not-found --disable-error-code no-any-unimported"
171-
mypy --config-file python/pyproject.toml -p dolfinx --exclude 'petsc\.py|io/utils\.py' $DISABLE_FLAGS
172-
cd python/
173-
DISABLE_FLAGS="$DISABLE_FLAGS --disable-error-code attr-defined --disable-error-code name-defined --disable-error-code unused-ignore"
174-
mypy demo $DISABLE_FLAGS
175-
mypy test $DISABLE_FLAGS
176166
177167
- name: Run demos (Python, serial)
178168
run: |
@@ -191,22 +181,16 @@ jobs:
191181
needs: [lint]
192182
strategy:
193183
matrix:
194-
petsc_arch: [linux-gnu-real32-32, linux-gnu-real64-32, linux-gnu-complex64-32, linux-gnu-complex128-32, linux-gnu-real64-64, linux-gnu-complex128-64]
195-
docker_image: ["ghcr.io/fenics/test-env:current-openmpi"]
196-
include:
197-
- docker_image: "ghcr.io/fenics/test-env:current-mpich"
198-
petsc_arch: linux-gnu-real64-32
199-
- docker_image: "ghcr.io/fenics/test-env:current-mpich"
200-
petsc_arch: linux-gnu-complex128-32
201-
container: ${{ matrix.docker_image }}
184+
petsc_arch: [linux-gnu-real64-32, linux-gnu-complex128-32, linux-gnu-real64-64]
185+
container: "ghcr.io/fenics/test-env:current"
202186
env:
203187
PETSC_ARCH: ${{ matrix.petsc_arch }}
204188
OMPI_ALLOW_RUN_AS_ROOT: 1
205189
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
206190
PRTE_MCA_rmaps_default_mapping_policy: :oversubscribe
207191
PYTEST_ADDOPTS: "-W error"
208192

209-
name: Build and test (${{ matrix.petsc_arch }}, ${{ matrix.docker_image }})
193+
name: Build and test (${{ matrix.petsc_arch }})
210194
steps:
211195
- uses: actions/checkout@v7
212196

@@ -216,8 +200,7 @@ jobs:
216200
- name: Install Python build dependencies
217201
working-directory: python
218202
run: |
219-
pip install scikit-build-core
220-
python -m scikit_build_core.build requires | python -c "import sys, json; print(' '.join(json.load(sys.stdin)))" | xargs pip install
203+
pip install --group pyproject.toml:build
221204
222205
- name: Install UFL
223206
run: |
@@ -273,7 +256,7 @@ jobs:
273256

274257
- name: Build Python interface
275258
run: >
276-
pip install 'python/[test,mypy]'
259+
pip install --group python/pyproject.toml:test 'python/'
277260
--check-build-dependencies
278261
--no-build-isolation
279262
--config-settings=cmake.build-type="Developer"
@@ -294,13 +277,6 @@ jobs:
294277
apt-get install libegl1 libxrender1
295278
pip install pyvista
296279
297-
- name: mypy checks (with petsc4py)
298-
run: |
299-
mypy --config-file python/pyproject.toml -p dolfinx --exclude superlu_dist.py
300-
cd python/
301-
mypy demo
302-
mypy test
303-
304280
- name: Run demos (Python, serial)
305281
run: |
306282
pip install pytest-xdist
@@ -316,7 +292,7 @@ jobs:
316292
build-and-publish-docs:
317293
runs-on: ubuntu-26.04
318294
needs: [lint]
319-
container: "ghcr.io/fenics/test-env:current-openmpi"
295+
container: "ghcr.io/fenics/test-env:current"
320296
env:
321297
PETSC_ARCH: linux-gnu-real64-32
322298
OMPI_ALLOW_RUN_AS_ROOT: 1
@@ -333,8 +309,7 @@ jobs:
333309
- name: Install Python build dependencies
334310
working-directory: python
335311
run: |
336-
pip install scikit-build-core setuptools
337-
python -m scikit_build_core.build requires | python -c "import sys, json; print(' '.join(json.load(sys.stdin)))" | xargs pip install
312+
pip install --group pyproject.toml:build setuptools
338313
339314
- name: Install FEniCS Python components
340315
run: |
@@ -350,7 +325,7 @@ jobs:
350325
351326
- name: Build Python interface
352327
run: >
353-
pip install 'python/[docs]'
328+
pip install --group python/pyproject.toml:docs 'python/'
354329
--check-build-dependencies
355330
--no-build-isolation
356331

.github/workflows/ci-spack.yml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ on:
1414
- main
1515
workflow_dispatch:
1616

17+
# Cancel superseded runs: a new commit on a pull request makes the
18+
# previous run's result irrelevant. Pushes to 'main' and 'release' are
19+
# left to finish, since they populate caches and publish artefacts.
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}
22+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
23+
1724
env:
1825
GITHUB_USER: ${{ github.actor }}
1926
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -34,6 +41,10 @@ jobs:
3441
runs-on: ubuntu-26.04
3542
container: ghcr.io/almalinux/almalinux:10
3643
strategy:
44+
# One compiler failing must not cancel the other: the legs share a
45+
# build cache, so a cancelled leg loses its diagnostics and its
46+
# pushed binaries.
47+
fail-fast: false
3748
matrix:
3849
compiler: ["gcc", "oneapi"]
3950

@@ -47,7 +58,9 @@ jobs:
4758
uses: spack/setup-spack@16b756799ede8b28951287f89bcd3fdb32ec1ca3 # v3.0.0
4859
with:
4960
spack_ref: v1.2.2
50-
packages_ref: v2026.06.0
61+
# spack-packages 'develop' at 2026-08-17. Bumping re-solves the
62+
# graph and can invalidate cached binaries; warm the cache first.
63+
packages_ref: 1ccf95574922e2a7f7ef0351bd67758ad4634b7a
5164

5265
- name: Checkout DOLFINx
5366
uses: actions/checkout@v7
@@ -62,13 +75,9 @@ jobs:
6275
spack -e py add mpi petsc+mpi+shared+mumps+superlu-dist slepc parmetis pkgconfig \
6376
hdf5+mpi boost pugixml spdlog
6477
spack -e py add python py-nanobind py-numpy py-mpi4py py-petsc4py py-slepc4py \
65-
py-scikit-build-core+pyproject py-setuptools py-cffi
78+
py-scikit-build-core@1+pyproject py-setuptools py-cffi
6679
spack -e py add py-pip cmake catch2 py-pytest py-pytest-xdist ninja
67-
# NOTE: freetype@2.13.3 works around a raster overflow bug in
68-
# freetype@2.14.2 (2026-07). Re-check and drop once a fixed
69-
# freetype (2.14.3+) lands in the spack-packages recipe.
70-
spack -e py add openblas
71-
spack -e py add py-gmsh ^gmsh~fltk~med~mmg+external ^opencascade~draw py-pyvista ^mesa~llvm ^freetype@2.13.3 \
80+
spack -e py add py-gmsh ^gmsh~fltk~med~mmg+external ^opencascade~draw py-pyvista ^mesa~llvm \
7281
py-networkx py-matplotlib py-pyamg py-numba ^llvm~clang~lldb~lld~offload~libomptarget~polly targets=x86 \
7382
py-scipy
7483
# gmsh's compiled library dlopens libGLU.so.1 and several X11
@@ -87,7 +96,7 @@ jobs:
8796
run: spack -e py add intel-oneapi-compilers
8897

8998
- name: Install Spack packages
90-
run: spack -e py install -j 4 --use-buildcache auto
99+
run: spack -e py install -j $(nproc) --use-buildcache auto
91100

92101
- name: Push packages to Spack cache and update index
93102
env:
@@ -146,12 +155,6 @@ jobs:
146155
- name: Build Python interface (editable install)
147156
run: |
148157
spack env activate py
149-
# The Spack recipe pinned by packages_ref above only goes up to
150-
# py-scikit-build-core@0.12.2, whose editable install support
151-
# predates the fix this project's build-system requirement now
152-
# depends on (see python/pyproject.toml) -- fetch a newer one
153-
# from PyPI for this step.
154-
pip install --upgrade "scikit-build-core>=1.0.0"
155158
pip install --check-build-dependencies --no-build-isolation --config-settings=cmake.build-type=Developer --config-settings=build-dir="build" -e 'dolfinx-src/python/'
156159
shell: spack-bash {0}
157160

@@ -164,7 +167,10 @@ jobs:
164167
run: |
165168
spack env activate py
166169
python -m pytest -n auto -m serial --durations=10 dolfinx-src/python/demo/test.py
167-
python -m pytest -m mpi --num-proc=2 dolfinx-src/python/demo/test.py
170+
# demo_navier-stokes.py deadlocks at np=2 in its MUMPS direct solve
171+
# (singular-system ICNTLs); it passes in the serial run above.
172+
# Deselected by name, not node id, whose path index follows glob order.
173+
python -m pytest -m mpi --num-proc=2 -k "not navier-stokes" dolfinx-src/python/demo/test.py
168174
shell: spack-bash {0}
169175

170176
- name: Run Python unit tests (serial and MPI)

0 commit comments

Comments
 (0)