Skip to content

Commit 4e8ca5b

Browse files
committed
Merge main
2 parents 5c191d7 + ef4c1bf commit 4e8ca5b

17 files changed

Lines changed: 53445 additions & 53428 deletions

.github/workflows/core.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,6 @@ jobs:
190190
: # Empty the pip cache to ensure that everything is compiled from scratch
191191
pip cache purge
192192
193-
: # Fix for petsc4py+slepc4py build
194-
echo 'setuptools<81' > constraints.txt
195-
export PIP_CONSTRAINT=constraints.txt
196-
197193
if [ ${{ inputs.target_branch }} = 'release' ]; then
198194
EXTRA_BUILD_ARGS=''
199195
EXTRA_PIP_FLAGS=''
@@ -448,10 +444,6 @@ jobs:
448444
: # Empty the pip cache to ensure that everything is compiled from scratch
449445
pip cache purge
450446
451-
: # Fix for petsc4py+slepc4py build
452-
echo 'setuptools<81' > constraints.txt
453-
export PIP_CONSTRAINT=constraints.txt
454-
455447
if [ ${{ inputs.target_branch }} = 'release' ]; then
456448
EXTRA_PIP_FLAGS=''
457449
else

do.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
sed -i 's|http://archive.ubuntu.com/ubuntu|http://www.mirrorservice.org/sites/archive.ubuntu.com/ubuntu/|g' /etc/apt/sources.list.d/ubuntu.sources
2+
apt-get update
3+
apt-get -y install git python3 gnupg2 curl ca-certificates
4+
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/3bf863cc.pub | apt-key add -
5+
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64 /" > /etc/apt/sources.list.d/cuda.list
6+
apt-get update
7+
apt-get -y install $(python3 ./firedrake-configure --arch default --gpu-arch cuda --show-system-packages)
8+
apt-get -y install fonts-dejavu graphviz graphviz-dev parallel poppler-utils python3-venv
9+
10+
cd /opt
11+
git clone --depth 1 https://gitlab.com/petsc/petsc.git
12+
cd petsc
13+
export LIBRARY_PATH=/usr/local/cuda/lib64/stubs
14+
python3 ../firedrake-repo/scripts/firedrake-configure --arch default --gpu-arch cuda --show-petsc-configure-options | xargs -L1 ./configure --with-make-np=8 --download-slepc
15+
make PETSC_DIR=/opt/petsc PETSC_ARCH=arch-firedrake-default-cuda
16+
make PETSC_DIR=/opt/petsc PETSC_ARCH=arch-firedrake-default-cuda check
17+
export PETSC_DIR="/opt/petsc"
18+
export PETSC_ARCH="arch-firedrake-default-cuda"
19+
export SLEPC_DIR="/opt/petsc/arch-firedrake-default-cuda"
20+
21+
cd /opt
22+
export $(python3 ./firedrake-configure --arch default --gpu-arch cuda --show-env)
23+
python3 -m venv venv
24+
. venv/bin/activate
25+
pip cache purge
26+
pip install "$PETSC_DIR"/src/binding/petsc4py
27+
pip install -r ./firedrake/requirements-build.txt
28+
pip install --no-build-isolation --no-deps "$PETSC_DIR"/"$PETSC_ARCH"/externalpackages/git.slepc/src/binding/slepc4py
29+
pip install --no-deps git+https://github.com/NGSolve/ngsPETSc.git netgen-mesher netgen-occt
30+
pip install --verbose --no-build-isolation --no-binary h5py './firedrake-repo[check]'
31+

docker/Dockerfile.vanilla

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@
3636
# Extra arguments to pass to PETSc's `configure` script
3737
#
3838
# Example usage for a specific firedrake release with complex scalars:
39-
# $ docker build \
39+
# $ docker build . \
4040
# --file=Dockerfile.vanilla \
4141
# --tag=firedrake:2025.4.2-complex \
4242
# --build-arg ARCH=complex \
4343
# --build-arg BRANCH=2025.4.2
4444
#
4545
# Example usage for building from firedrake main with real scalars, ml installed with PETSc, and valgrind installed with apt:
46-
# $ docker build \
46+
# $ docker build . \
4747
# --file=Dockerfile.vanilla \
4848
# --tag=firedrake:main-latest \
4949
# --build-arg ARCH=default \
@@ -136,28 +136,28 @@ ENV MPICC=mpicc
136136
ENV CFLAGS="-O3 -mtune=generic" CPPFLAGS="-O3 -mtune=generic"
137137

138138
# Install Firedrake
139-
# - petsc4py and slepc4py are installed from source in PETSc repo.
140-
# - slepc4py is installed without build isolation so it links against
141-
# the correct petsc4py version.
139+
# - If installing 'main' then petsc4py and slepc4py are installed from source,
140+
# otherwise they are installed from PyPI. This mirrors our CI.
142141
# - Firedrake main branch requires main/master branch of some upstream
143142
# packages. These are installed in editable mode.
144143
# The order these are installed is important, e.g. FIAT must be installed
145144
# before UFL otherwise `pip install fiat` will reinstall pypi ufl.
146145

147-
# Fix for petsc4py+slepc4py build to be removed after #4873 is resolved.
148-
RUN echo 'setuptools<81' > /opt/constraints.txt
149-
ENV PIP_CONSTRAINT=/opt/constraints.txt
150-
151146
RUN git clone --branch ${BRANCH} \
152147
https://github.com/firedrakeproject/firedrake.git /opt/firedrake \
153-
&& pip cache purge \
154-
&& pip install --verbose ${PETSC_DIR}/src/binding/petsc4py \
155-
&& pip install --verbose -r /opt/firedrake/requirements-build.txt \
156-
&& pip install --verbose --no-build-isolation \
157-
${SLEPC_DIR}/externalpackages/git.slepc/src/binding/slepc4py \
158-
&& pip install --verbose --no-binary h5py --no-build-isolation \
159-
--editable '/opt/firedrake[docker]' || exit; \
160-
if [ ${BRANCH} == "main" ]; then \
148+
&& pip cache purge || exit; \
149+
if [ ${BRANCH} == "main" ]; then \
150+
pip install --verbose ${PETSC_DIR}/src/binding/petsc4py \
151+
&& pip install --verbose -r /opt/firedrake/requirements-build.txt \
152+
&& pip install --verbose --no-build-isolation \
153+
${SLEPC_DIR}/externalpackages/git.slepc/src/binding/slepc4py \
154+
&& pip install --verbose --no-binary h5py --no-build-isolation \
155+
--editable '/opt/firedrake[docker]' || exit; \
156+
else \
157+
pip install --verbose --no-binary h5py \
158+
--editable '/opt/firedrake[docker]' || exit; \
159+
fi; \
160+
if [ ${BRANCH} == "main" ]; then \
161161
for pkg in \
162162
"git+https://github.com/dolfin-adjoint/pyadjoint.git#egg=pyadjoint-ad" \
163163
"git+https://github.com/firedrakeproject/fiat.git#egg=firedrake-fiat" \

docs/notebooks/11-extract-adjoint-solutions.ipynb

Lines changed: 52863 additions & 53148 deletions
Large diffs are not rendered by default.

docs/source/install.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,6 @@ install Firedrake. To do this perform the following steps:
240240
so that it can be detected by mpi4py. See `here <https://mpi4py.readthedocs.io/en/stable/install.html#linux>`__
241241
for more information.
242242

243-
#. Set ``PIP_CONSTRAINT`` to work around
244-
`an issue with setuptools <https://gitlab.com/petsc/petsc/-/merge_requests/9016>`__::
245-
246-
$ echo 'setuptools<81' > constraints.txt
247-
$ export PIP_CONSTRAINT=constraints.txt
248-
249243
#. Install Firedrake::
250244

251245
$ pip install --no-binary h5py 'firedrake[check]'

docs/source/mesh-coordinates.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ functions over to the new mesh. To move `f` over to ``mesh``, use:
118118

119119
.. code-block:: python3
120120
121-
g = Function(functionspaceimpl.WithGeometry.create(f.function_space(), mesh),
121+
g = Function(functionspaceimpl.WithGeometry(f.function_space(), mesh),
122122
val=f.topological)
123123
124124
This creates a :py:class:`~.Function` `g` which shares data with `f`,

docs/source/tutorial_mar_26.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ also be possible to join the tutorial using the cloud. Installing `Paraview <htt
2626
Registration
2727
------------
2828

29-
Registration of £25 covers tea, coffee, and biscuits. `Registration is now open on the Oxford online store <https://www.oxforduniversitystores.co.uk/product-catalogue/mathematical-institute/events/solving-partial-differential-equations-with-firedrake>`__.
30-
29+
Registration of £25 covered tea, coffee, and biscuits. Registration closed on 6 March 2026.
3130

3231
Where and when
3332
--------------
@@ -62,7 +61,7 @@ Thu Mar 19 (room L4)
6261
+-------------+-------------------------------------+
6362
| Time | Session |
6463
+=============+=====================================+
65-
| 09:00-10:45 | Surface integrals. Nonlinearity |
64+
| 09:00-10:45 | Boundaries. Nonlinearity |
6665
+-------------+-------------------------------------+
6766
| 10:45-11:15 | Coffee break |
6867
+-------------+-------------------------------------+

firedrake/checkpointing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,7 +1246,7 @@ def load_mesh(self, name=DEFAULT_MESH_NAME, reorder=None, distribution_parameter
12461246
radial_coord_name = self.get_attr(path, PREFIX + "_radial_coordinates")
12471247
radial_coordinates = self._load_function_topology(tmesh, radial_coord_element, radial_coord_name)
12481248
tV_radial_coord = impl.FunctionSpace(tmesh, radial_coord_element)
1249-
V_radial_coord = impl.WithGeometry.create(tV_radial_coord, mesh)
1249+
V_radial_coord = impl.WithGeometry(tV_radial_coord, mesh)
12501250
radial_coord_function_name = self.get_attr(path, PREFIX + "_radial_coordinate_function")
12511251
mesh.radial_coordinates = Function(V_radial_coord, val=radial_coordinates, name=radial_coord_function_name)
12521252
# The followings are conceptually redundant, but needed.
@@ -1416,7 +1416,7 @@ def _load_function_space(self, mesh, name):
14161416
element = self._load_ufl_element(path, PREFIX + "_ufl_element")
14171417
tV = self._load_function_space_topology(tmesh, element)
14181418
# Construct function space
1419-
V = impl.WithGeometry.create(tV, mesh)
1419+
V = impl.WithGeometry(tV, mesh)
14201420
else:
14211421
raise RuntimeError(f"""
14221422
FunctionSpace ({name}) not found in either of the following path in {self.filename}:

0 commit comments

Comments
 (0)