Skip to content

Commit 1925928

Browse files
committed
PMGPC: use native matrix-free (adjoint) interpolation
2 parents 5b8577c + f21dad9 commit 1925928

File tree

87 files changed

+1970
-1414
lines changed

Some content is hidden

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

87 files changed

+1970
-1414
lines changed

.github/workflows/core.yml

Lines changed: 95 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ on:
2727
description: Whether to upload an sdist to PyPI
2828
type: boolean
2929
default: false
30-
upload_testpypi:
31-
description: Whether to upload an sdist to TestPyPI
32-
type: boolean
33-
default: false
3430

3531
workflow_dispatch:
3632
inputs:
@@ -58,10 +54,6 @@ on:
5854
description: Whether to upload an sdist to PyPI
5955
type: boolean
6056
default: false
61-
upload_testpypi:
62-
description: Whether to upload an sdist to TestPyPI
63-
type: boolean
64-
default: false
6557

6658
concurrency:
6759
# Cancel running jobs if new commits are pushed
@@ -84,7 +76,6 @@ jobs:
8476
image: ubuntu:latest
8577
outputs:
8678
sdist_conclusion: ${{ steps.report_sdist.outputs.conclusion }}
87-
docs_conclusion: ${{ steps.report_docs.outputs.conclusion }}
8879
env:
8980
OMPI_ALLOW_RUN_AS_ROOT: 1
9081
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
@@ -95,7 +86,7 @@ jobs:
9586
PYOP2_SPMD_STRICT: 1
9687
# NOTE: One should occasionally update test_durations.json by running
9788
# 'make test_durations' inside a 'firedrake:latest' Docker image.
98-
EXTRA_PYTEST_ARGS: --splitting-algorithm least_duration --timeout=600 --timeout-method=thread -o faulthandler_timeout=660 --durations-path=./firedrake-repo/tests/test_durations.json
89+
EXTRA_PYTEST_ARGS: --splitting-algorithm least_duration --timeout=600 --timeout-method=thread -o faulthandler_timeout=660 --durations-path=./firedrake-repo/tests/test_durations.json --durations=50
9990
PYTEST_MPI_MAX_NPROCS: 8
10091
steps:
10192
- name: Fix HOME
@@ -108,18 +99,6 @@ jobs:
10899
# Make sure the current directory is empty
109100
run: find . -delete
110101

111-
# Check that the Dockerfile is using the latest Ubuntu version.
112-
# The version is hardcoded into the Dockerfile so that the OS
113-
# for each release is fixed.
114-
- name: Check Dockerfile Ubuntu version
115-
run: |
116-
latest_version=$(grep "VERSION_ID=" /etc/os-release | cut -d '"' -f 2)
117-
docker_version=$(grep FROM docker/Dockerfile.vanilla | cut -d ':' -f 2)
118-
if [[ "$docker_version" != "$latest_version" ]]; then
119-
echo "Ubuntu version ${docker_version} in Dockerfile is out of date with latest version ${latest_version}"
120-
exit 1
121-
fi
122-
123102
# Use a different mirror to fetch apt packages from to get around
124103
# temporary outage.
125104
# (https://askubuntu.com/questions/1549622/problem-with-archive-ubuntu-com-most-of-the-servers-are-not-responding)
@@ -141,6 +120,20 @@ jobs:
141120
- name: Validate single source of truth
142121
run: ./firedrake-repo/scripts/check-config
143122

123+
# Check that the Dockerfile is using the latest Ubuntu version.
124+
# The version is hardcoded into the Dockerfile so that the OS
125+
# for each release is fixed.
126+
- name: Check Dockerfile Ubuntu version
127+
run: |
128+
latest_version=$(grep "VERSION_ID=" /etc/os-release | cut -d '"' -f 2)
129+
docker_version=$(grep FROM firedrake-repo/docker/Dockerfile.vanilla | cut -d ':' -f 2)
130+
echo "Latest version: $latest_version"
131+
echo "Docker version: $docker_version"
132+
if [[ "$docker_version" != "$latest_version" ]]; then
133+
echo "Ubuntu version ${docker_version} in Dockerfile is out of date with latest version ${latest_version}"
134+
exit 1
135+
fi
136+
144137
# Raise an error if any 'TODO RELEASE' comments remain
145138
- name: Check no 'TODO RELEASE' comments (release only)
146139
if: inputs.target_branch == 'release'
@@ -219,7 +212,7 @@ jobs:
219212
pip install --verbose $EXTRA_PIP_FLAGS \
220213
--no-binary h5py \
221214
--extra-index-url https://download.pytorch.org/whl/cpu \
222-
"$(echo ./firedrake-repo/dist/firedrake-*.tar.gz)[ci,docs]"
215+
"$(echo ./firedrake-repo/dist/firedrake-*.tar.gz)[ci]"
223216
224217
firedrake-clean
225218
pip list
@@ -381,67 +374,6 @@ jobs:
381374
name: firedrake-logs-${{ matrix.arch }}
382375
path: pytest_*.log
383376

384-
- name: Install system dependencies (3)
385-
if: (success() || steps.install.conclusion == 'success') && matrix.arch == 'default'
386-
run: apt-get -y install inkscape texlive-full
387-
388-
- name: Check bibtex
389-
if: (success() || steps.install.conclusion == 'success') && matrix.arch == 'default'
390-
run: |
391-
. venv/bin/activate
392-
make -C firedrake-repo/docs validate-bibtex
393-
394-
- name: Check documentation links
395-
if: (success() || steps.install.conclusion == 'success') && matrix.arch == 'default'
396-
run: |
397-
. venv/bin/activate
398-
make -C firedrake-repo/docs linkcheck
399-
400-
- name: Build documentation
401-
if: (success() || steps.install.conclusion == 'success') && matrix.arch == 'default'
402-
id: build_docs
403-
run: |
404-
. venv/bin/activate
405-
cd firedrake-repo/docs
406-
make SPHINXOPTS="-t ${{ inputs.target_branch }}" html
407-
make latex
408-
make latexpdf
409-
# : Copy manual to HTML tree
410-
cp build/latex/Firedrake.pdf build/html/_static/manual.pdf
411-
412-
- name: Upload documentation
413-
uses: actions/upload-pages-artifact@v3
414-
id: upload_docs
415-
if: (success() || steps.build_docs.conclusion == 'success') && matrix.arch == 'default'
416-
with:
417-
name: github-pages
418-
path: firedrake-repo/docs/build/html
419-
retention-days: 1
420-
421-
- name: Report docs build status
422-
id: report_docs
423-
if: success() || steps.upload_docs.conclusion == 'success'
424-
run: echo "conclusion=success" >> "$GITHUB_OUTPUT"
425-
426-
# Some files are automatically generated when we install or build the
427-
# docs (e.g. AUTHORS.rst). These files are committed to the repository
428-
# so uncommitted changes at this point reflect changes in the automatically
429-
# generated files that ought to be committed.
430-
- name: Check no untracked files
431-
if: always()
432-
working-directory: firedrake-repo
433-
run: |
434-
if [ -z "$( git status --porcelain )" ]; then
435-
exit 0
436-
else
437-
echo Error: there are untracked files in the repository
438-
echo The output from 'git status' is:
439-
git status
440-
echo The output from 'git diff' is:
441-
git diff
442-
exit 1
443-
fi
444-
445377
- name: Post-run cleanup
446378
if: always()
447379
run: find . -delete
@@ -555,16 +487,93 @@ jobs:
555487
- name: Lint codebase
556488
run: make lint GITHUB_ACTIONS_FORMATTING=1
557489

490+
build_docs:
491+
name: Build documentation
492+
runs-on: [self-hosted, Linux]
493+
container:
494+
image: firedrakeproject/firedrake-vanilla-default:dev-${{ inputs.target_branch }}
495+
outputs:
496+
conclusion: ${{ steps.report_docs.outputs.conclusion }}
497+
steps:
498+
- name: Install system dependencies
499+
run: |
500+
apt-get update
501+
apt-get -y install inkscape texlive-full
502+
503+
- uses: actions/checkout@v5
504+
with:
505+
path: firedrake-repo
506+
ref: ${{ inputs.source_ref }}
507+
508+
- name: Install Firedrake
509+
id: install
510+
run: |
511+
CC=mpicc CXX=mpicxx \
512+
pip install --verbose --no-build-isolation './firedrake-repo[docs]'
513+
firedrake-clean
514+
pip list
515+
516+
- name: Check bibtex
517+
run: make -C firedrake-repo/docs validate-bibtex
518+
519+
- name: Check documentation links
520+
if: success() || steps.install.conclusion == 'success'
521+
run: make -C firedrake-repo/docs linkcheck
522+
523+
- name: Build documentation
524+
if: success() || steps.install.conclusion == 'success'
525+
id: build_docs
526+
working-directory: firedrake-repo/docs
527+
run: |
528+
make SPHINXOPTS="-t ${{ inputs.target_branch }}" html
529+
make latex
530+
make latexpdf
531+
# : Copy manual to HTML tree
532+
cp build/latex/Firedrake.pdf build/html/_static/manual.pdf
533+
534+
- name: Upload documentation
535+
uses: actions/upload-pages-artifact@v3
536+
id: upload_docs
537+
if: success() || steps.build_docs.conclusion == 'success'
538+
with:
539+
name: github-pages
540+
path: firedrake-repo/docs/build/html
541+
retention-days: 1
542+
543+
# Some files are automatically generated when we install or build the
544+
# docs (e.g. AUTHORS.rst). These files are committed to the repository
545+
# so uncommitted changes at this point reflect changes in the automatically
546+
# generated files that ought to be committed.
547+
- name: Check no untracked files
548+
if: always()
549+
working-directory: firedrake-repo
550+
run: |
551+
if [ -z "$( git status --porcelain )" ]; then
552+
exit 0
553+
else
554+
echo Error: there are untracked files in the repository
555+
echo The output from 'git status' is:
556+
git status
557+
echo The output from 'git diff' is:
558+
git diff
559+
exit 1
560+
fi
561+
562+
- name: Report docs build status
563+
id: report_docs
564+
if: success() || steps.upload_docs.conclusion == 'success'
565+
run: echo "conclusion=success" >> "$GITHUB_OUTPUT"
566+
558567
deploy_website:
559568
name: Deploy GitHub pages (optional)
560-
needs: test_linux
569+
needs: build_docs
561570
# Only deploy the website for main here, the release branch is managed
562571
# by https://github.com/firedrakeproject/firedrakeproject.github.io
563572
if: |
564573
always() &&
565574
inputs.deploy_website &&
566575
inputs.target_branch == 'main' &&
567-
needs.test_linux.outputs.docs_conclusion == 'success'
576+
needs.build_docs.outputs.conclusion == 'success'
568577
permissions:
569578
pages: write
570579
id-token: write
@@ -596,26 +605,3 @@ jobs:
596605
uses: pypa/gh-action-pypi-publish@release/v1
597606
with:
598607
password: ${{ secrets.PYPI_API_TOKEN }}
599-
600-
upload_testpypi:
601-
name: Upload to TestPyPI (optional)
602-
needs: test_linux
603-
if: |
604-
always() &&
605-
inputs.upload_testpypi &&
606-
inputs.target_branch == 'release' &&
607-
needs.test_linux.outputs.sdist_conclusion == 'success'
608-
runs-on: ubuntu-latest
609-
environment:
610-
name: testpypi
611-
permissions:
612-
id-token: write
613-
steps:
614-
- uses: actions/download-artifact@v4
615-
with:
616-
name: dist
617-
path: dist
618-
- name: Push to TestPyPI
619-
uses: pypa/gh-action-pypi-publish@release/v1
620-
with:
621-
repository-url: https://test.pypi.org/legacy/

.github/workflows/docker.yml

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ jobs:
8383
needs: docker_merge_vanilla
8484
uses: ./.github/workflows/docker_build.yml
8585
# Only build the 'firedrake' container for 'linux/amd64' because
86-
# VTK (https://gitlab.kitware.com/vtk/vtk/-/issues/18772) and
87-
# netgen-mesher do not have ARM wheels so many Firedrake apps cannot
86+
# netgen-mesher does not have ARM wheels so many Firedrake apps cannot
8887
# be installed.
8988
with:
9089
os: Linux
@@ -103,26 +102,3 @@ jobs:
103102
tag: ${{ inputs.tag }}
104103
tag_latest: ${{ ! inputs.build_dev }}
105104
secrets: inherit
106-
107-
# Firedrake with Jupyter notebooks
108-
docker_build_jupyter:
109-
if: ${{ ! inputs.build_dev }}
110-
needs: docker_merge_firedrake
111-
uses: ./.github/workflows/docker_build.yml
112-
with:
113-
os: Linux
114-
platform: linux/amd64
115-
target: firedrake-jupyter
116-
tag: ${{ inputs.tag }}
117-
dockerfile: docker/Dockerfile.jupyter
118-
secrets: inherit
119-
120-
docker_merge_jupyter:
121-
if: ${{ ! inputs.build_dev }}
122-
uses: ./.github/workflows/docker_merge.yml
123-
needs: docker_build_jupyter
124-
with:
125-
target: firedrake-jupyter
126-
tag: ${{ inputs.tag }}
127-
tag_latest: ${{ ! inputs.build_dev }}
128-
secrets: inherit

0 commit comments

Comments
 (0)