Skip to content

Commit fb4de34

Browse files
committed
Merge branch 'master' into pbrubeck/zany-point-evaluation
2 parents 06a98b9 + abd9e35 commit fb4de34

File tree

22 files changed

+327
-312
lines changed

22 files changed

+327
-312
lines changed

.github/workflows/build.yml

Lines changed: 54 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
FIREDRAKE_CI: 1
4040
PYOP2_CI_TESTS: 1
4141
PYOP2_SPMD_STRICT: 1
42-
EXTRA_PYTEST_ARGS: --splitting-algorithm least_duration --timeout=600 --timeout-method=thread -o faulthandler_timeout=660 firedrake-repo/tests/firedrake
42+
EXTRA_PYTEST_ARGS: --splitting-algorithm least_duration --timeout=600 --timeout-method=thread -o faulthandler_timeout=660
43+
PYTEST_MPI_MAX_NPROCS: 8
4344
steps:
4445
- name: Fix HOME
4546
# For unknown reasons GitHub actions overwrite HOME to /github/home
@@ -68,7 +69,7 @@ jobs:
6869
cd petsc
6970
python3 ../firedrake-repo/scripts/firedrake-configure \
7071
--arch ${{ matrix.arch }} --show-petsc-configure-options | \
71-
xargs -L1 ./configure --with-make-np=12 --download-slepc
72+
xargs -L1 ./configure --with-make-np=8 --download-slepc
7273
make PETSC_DIR=/__w/firedrake/firedrake/petsc PETSC_ARCH=arch-firedrake-${{ matrix.arch }}
7374
make check
7475
echo "PETSC_DIR=/__w/firedrake/firedrake/petsc" >> "$GITHUB_ENV"
@@ -98,63 +99,85 @@ jobs:
9899
firedrake-check
99100
timeout-minutes: 5
100101

101-
- name: Run tests (nprocs = 1)
102+
- name: Run TSFC tests
102103
# Run even if earlier tests failed
103-
if: ${{ success() || steps.install.conclusion == 'success' }}
104+
if: success() || steps.install.conclusion == 'success'
105+
run: |
106+
. venv/bin/activate
107+
: # Use pytest-xdist here so we can have a single collated output (not possible
108+
: # for parallel tests)
109+
firedrake-run-split-tests 1 1 -n 8 "$EXTRA_PYTEST_ARGS" firedrake-repo/tests/tsfc
110+
timeout-minutes: 60
111+
112+
- name: Run PyOP2 tests
113+
if: success() || steps.install.conclusion == 'success'
114+
run: |
115+
. venv/bin/activate
116+
: # Use pytest-xdist here so we can have a single collated output (not possible
117+
: # for parallel tests)
118+
firedrake-run-split-tests 1 1 -n 8 "$EXTRA_PYTEST_ARGS" firedrake-repo/tests/pyop2
119+
firedrake-run-split-tests 2 4 "$EXTRA_PYTEST_ARGS" firedrake-repo/tests/pyop2
120+
firedrake-run-split-tests 3 2 "$EXTRA_PYTEST_ARGS" firedrake-repo/tests/pyop2
121+
firedrake-run-split-tests 4 2 "$EXTRA_PYTEST_ARGS" firedrake-repo/tests/pyop2
122+
timeout-minutes: 15
123+
124+
125+
- name: Run Firedrake tests (nprocs = 1)
126+
if: success() || steps.install.conclusion == 'success'
104127
run: |
105128
. venv/bin/activate
106129
: # Use pytest-xdist here so we can have a single collated output (not possible
107130
: # for parallel tests)
108-
firedrake-run-split-tests 1 1 "-n 12 $EXTRA_PYTEST_ARGS"
131+
firedrake-run-split-tests 1 1 -n 8 "$EXTRA_PYTEST_ARGS" firedrake-repo/tests/firedrake
109132
timeout-minutes: 60
110133

111134
- name: Run tests (nprocs = 2)
112-
if: ${{ success() || steps.install.conclusion == 'success' }}
135+
if: success() || steps.install.conclusion == 'success'
113136
run: |
114137
. venv/bin/activate
115-
firedrake-run-split-tests 2 6 "$EXTRA_PYTEST_ARGS"
138+
firedrake-run-split-tests 2 4 "$EXTRA_PYTEST_ARGS" firedrake-repo/tests/firedrake
116139
timeout-minutes: 30
117140

118141
- name: Run tests (nprocs = 3)
119-
if: ${{ success() || steps.install.conclusion == 'success' }}
142+
if: success() || steps.install.conclusion == 'success'
120143
run: |
121144
. venv/bin/activate
122-
firedrake-run-split-tests 3 4 "$EXTRA_PYTEST_ARGS"
145+
firedrake-run-split-tests 3 2 "$EXTRA_PYTEST_ARGS" firedrake-repo/tests/firedrake
123146
timeout-minutes: 60
124147

125148
- name: Run tests (nprocs = 4)
126-
if: ${{ success() || steps.install.conclusion == 'success' }}
149+
if: success() || steps.install.conclusion == 'success'
127150
run: |
128151
. venv/bin/activate
129-
firedrake-run-split-tests 4 3 "$EXTRA_PYTEST_ARGS"
152+
firedrake-run-split-tests 4 2 "$EXTRA_PYTEST_ARGS" firedrake-repo/tests/firedrake
130153
timeout-minutes: 15
131154

132155
- name: Run tests (nprocs = 5)
133-
if: ${{ success() || steps.install.conclusion == 'success' }}
156+
if: success() || steps.install.conclusion == 'success'
134157
run: |
135158
. venv/bin/activate
136-
firedrake-run-split-tests 5 2 "$EXTRA_PYTEST_ARGS"
159+
firedrake-run-split-tests 5 1 "$EXTRA_PYTEST_ARGS" firedrake-repo/tests/firedrake
137160
timeout-minutes: 15
138161

139162
- name: Run tests (nprocs = 6)
140-
if: ${{ success() || steps.install.conclusion == 'success' }}
163+
if: success() || steps.install.conclusion == 'success'
141164
run: |
142165
. venv/bin/activate
143-
firedrake-run-split-tests 6 2 "$EXTRA_PYTEST_ARGS"
166+
firedrake-run-split-tests 6 1 "$EXTRA_PYTEST_ARGS" firedrake-repo/tests/firedrake
144167
timeout-minutes: 15
145168

146169
- name: Run tests (nprocs = 7)
147-
if: ${{ success() || steps.install.conclusion == 'success' }}
170+
if: success() || steps.install.conclusion == 'success'
148171
run: |
149172
. venv/bin/activate
150-
firedrake-run-split-tests 7 1 "$EXTRA_PYTEST_ARGS"
173+
firedrake-run-split-tests 7 1 "$EXTRA_PYTEST_ARGS" firedrake-repo/tests/firedrake
151174
timeout-minutes: 15
152175

153176
- name: Run tests (nprocs = 8)
154-
if: ${{ success() || steps.install.conclusion == 'success' }}
177+
if: success() || steps.install.conclusion == 'success'
155178
run: |
156179
. venv/bin/activate
157-
firedrake-run-split-tests 8 1 "$EXTRA_PYTEST_ARGS"
180+
firedrake-run-split-tests 8 1 "$EXTRA_PYTEST_ARGS" firedrake-repo/tests/firedrake
158181
timeout-minutes: 15
159182

160183
- name: Run Gusto smoke tests
@@ -164,12 +187,21 @@ jobs:
164187
. venv/bin/activate
165188
git clone --depth 1 https://github.com/firedrakeproject/gusto.git gusto-repo
166189
pip install --verbose ./gusto-repo
167-
python -m pytest -n 12 --verbose \
190+
python -m pytest -n 8 --verbose \
168191
gusto-repo/integration-tests/balance/test_saturated_balance.py \
169192
gusto-repo/integration-tests/equations/test_thermal_sw.py \
170193
gusto-repo/integration-tests/transport/test_embedded_dg_advection.py
171194
timeout-minutes: 10
172195

196+
- name: Run Thetis smoke tests
197+
if: (success() || steps.install.conclusion == 'success') && matrix.arch == 'default'
198+
run: |
199+
. venv/bin/activate
200+
git clone --depth 1 https://github.com/thetisproject/thetis.git thetis-repo
201+
pip install --verbose ./thetis-repo
202+
python -m pytest -n 8 --verbose thetis-repo/test_adjoint/test_swe_adjoint.py
203+
timeout-minutes: 10
204+
173205
- name: Run spyro smoke tests
174206
if: (success() || steps.install.conclusion == 'success') && matrix.arch == 'default'
175207
run: |
@@ -251,7 +283,7 @@ jobs:
251283
- name: Setup Python
252284
uses: actions/setup-python@v5
253285
with:
254-
python-version: '3.12'
286+
python-version: "3.12"
255287
- name: Install deps
256288
run: pip install requests packaging
257289
- name: Zenodo API canary
@@ -260,5 +292,5 @@ jobs:
260292
uses: actions/upload-artifact@v4
261293
if: failure()
262294
with:
263-
name: "zenodo-canary"
295+
name: zenodo-canary
264296
path: firedrake-install.log

.github/workflows/pyop2.yml

Lines changed: 0 additions & 92 deletions
This file was deleted.

docker/Dockerfile.vanilla

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ RUN git clone --depth 1 --branch $(python3 /opt/firedrake-configure --show-petsc
4444
&& cd /opt/petsc \
4545
&& python3 /opt/firedrake-configure --arch $ARCH --show-petsc-configure-options | \
4646
sed "s/$/ --COPTFLAGS='-O3 -mtune=generic' --CXXOPTFLAGS='-O3 -mtune=generic' --FOPTFLAGS='-O3 -mtune=generic'/" | \
47-
xargs -L1 ./configure --with-make-np=12 --download-slepc \
47+
xargs -L1 ./configure --with-make-np=8 --download-slepc \
4848
&& make \
4949
&& make check \
5050
&& rm -rf ./**/externalpackages \

docs/source/aims_25.rst

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
:orphan: true
2+
3+
.. title:: Finite Element Course at AIMS Rwanda
4+
5+
Finite Element Course at AIMS Rwanda
6+
------------------------------------
7+
8+
The Firedrake Team will be delivering a finite element course, with practical
9+
examples in Firedrake (of course!) at the `African Institute for Mathematical
10+
Sciences Rwanda <https://aims.ac.rw>`__ from 8 to 12 April 2025.
11+
12+
Course programme
13+
----------------
14+
15+
The course will draw heavily on the materials for a `finite element course
16+
taught at Imperial College London <https://finite-element.github.io>`__ and the
17+
`Firedrake manual
18+
<https://www.firedrakeproject.org/documentation.html#manual>`__.
19+
20+
The materials most relevant for each section are linked below, but further
21+
reading is available on the links above.
22+
23+
.. list-table::
24+
25+
* -
26+
- **Tuesday**
27+
- **Wednesday**
28+
- **Thursday**
29+
- **Friday**
30+
- **Saturday**
31+
* - **Early AM**
32+
- `Function spaces and inner products <https://wp.doc.ic.ac.uk/spo/wp-content/uploads/sites/31/2013/11/notes.pdf>`__
33+
- `The Ciarlet finite element <https://finite-element.github.io/L2_fespaces.html>`__
34+
- `Nonlinear problems <https://finite-element.github.io/8_nonlinear_problems.html>`__
35+
- Devito: inverse tomography
36+
- Software for adjoints: differentiable programming
37+
* - **Late AM**
38+
- `Our first finite element problem <https://finite-element.github.io/L1_introduction.html>`__
39+
- Firedrake practical 3: `vector-valued problems <https://colab.research.google.com/github/firedrakeproject/notebooks/blob/aims/03-elasticity.ipynb>`__
40+
- Firedrake practical 5: `The Burgers equation <https://colab.research.google.com/github/firedrakeproject/notebooks/blob/aims/04-burgers.ipynb>`__
41+
- Adjoints part 1: `derivation <https://www.firedrakeproject.org/adjoint.html>`__
42+
- Adjoint practical 2: the tape
43+
* - **Early PM**
44+
- Firedrake practical 1: `Helmholtz Equation <https://colab.research.google.com/github/firedrakeproject/notebooks/blob/aims/01-spd-helmholtz.ipynb>`__
45+
- `Systems with more than one variable <https://finite-element.github.io/9_mixed_problems.html>`__
46+
- An introduction to solvers and preconditioners
47+
- Devito: inverse tomography
48+
- `Deep learning introduction <https://github.com/NBoulle/physics-driven-ml/raw/main/tutorials/intro_deep_learning.pdf>`__, `practical <https://colab.research.google.com/github/NBoulle/physics-driven-ml/blob/main/tutorials/Tutorial_1_ex.ipynb>`__
49+
* - **Late PM**
50+
- Firedrake practical 2: `Dirichlet boundary conditions <https://colab.research.google.com/github/firedrakeproject/notebooks/blob/aims/02-poisson.ipynb>`__
51+
- Firedrake practical 4: `mixed Poisson <https://colab.research.google.com/github/firedrakeproject/notebooks/blob/aims/05-mixed-poisson.ipynb>`__
52+
- Firedrake practical 6: `solvers <https://colab.research.google.com/github/firedrakeproject/notebooks/blob/aims/08-composable-solvers.ipynb>`__
53+
- Adjoint practical 1: Burgers again
54+
- `Scientific machine learning <https://github.com/NBoulle/physics-driven-ml/raw/main/tutorials/sciml_intro.pdf>`__, `practical <https://colab.research.google.com/github/NBoulle/physics-driven-ml/blob/main/tutorials/Tutorial_2_ex.ipynb>`__
55+
56+
57+
58+
Course lecturers
59+
----------------
60+
61+
* `David Ham <https://profiles.imperial.ac.uk/david.ham>`__, Department of Mathematics, Imperial College London
62+
* `Nicolas Boullé <https://profiles.imperial.ac.uk/n.boulle>`__, Department of Mathematics, Imperial College London
63+
* `Jack Betteridge <https://www.devitocodes.com/about/#jack-betteridge-research-scientist>`__, Devito Codes and Department of Mathematics, Imperial College London
64+
65+

docs/source/events.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ Totnes to write up demos based on users' use-cases for Firedrake and its
1616
downstream applications. For more details see `the website
1717
<https://ccp-dcm.github.io/exeter_hackathon.html>`__.
1818

19+
Finite Element Course at AIMS Rwanda
20+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21+
22+
The Firedrake team will be presenting a short course on the Finite Element
23+
Method at the African Institute for Mathematical Sciences in Kigali between 8
24+
and 12 April 2025. For more information see :doc:`the course page <aims_25>`.
25+
1926
Firedrake USA'25
2027
~~~~~~~~~~~~~~~~
2128

docs/source/visualisation.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Creating output files
1818
Output for visualisation purposes is managed with a
1919
:class:`~.vtk_output.VTKFile` object. To create one, first import the
2020
class from `firedrake.output, then we just need to pass the name of the
21-
output file on disk. The file Firedrake creates is in PVD_ and
21+
output file on disk. The file Firedrake creates is in PVD and
2222
therefore the requested file name must end in ``.pvd``.
2323

2424
.. code-block:: python3
@@ -67,7 +67,7 @@ and call :meth:`~.vtk_output.VTKFile.write` inside.
6767
t += dt
6868
6969
70-
The PVD_ data format supports specifying the timestep value for
70+
The PVD data format supports specifying the timestep value for
7171
time-dependent data. We do not have to provide it to
7272
:meth:`~.vtk_output.VTKFile.write`, by default an integer counter is
7373
used that is incremented by 1 each time
@@ -329,7 +329,6 @@ matplotlib.
329329

330330
.. _Paraview: http://www.paraview.org
331331
.. _VTK: http://www.vtk.org
332-
.. _PVD: http://www.paraview.org/Wiki/ParaView/Data_formats#PVD_File_Format
333332
.. _matplotlib: http://matplotlib.org
334333
.. _Arbitrary: https://www.kitware.com/modeling-arbitrary-order-lagrange-finite-elements-in-the-visualization-toolkit/
335334
__ Arbitrary_

0 commit comments

Comments
 (0)