Skip to content

Commit e5a56eb

Browse files
authored
Merge pull request #4861 from firedrakeproject/pbrubeck/merge-release
Merge release
2 parents f177a6a + 2ace9ad commit e5a56eb

File tree

6 files changed

+17
-25
lines changed

6 files changed

+17
-25
lines changed

.github/workflows/core.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,8 @@ jobs:
177177
python3 -m venv venv
178178
. venv/bin/activate
179179
180-
: # Force a rebuild of petsc4py as the cached one will not link to the fresh
181-
: # install of PETSc.
182-
pip cache remove petsc4py
183-
pip cache remove slepc4py
180+
: # Empty the pip cache to ensure that everything is compiled from scratch
181+
pip cache purge
184182
185183
if [ ${{ inputs.target_branch }} = 'release' ]; then
186184
EXTRA_BUILD_ARGS=''
@@ -433,14 +431,8 @@ jobs:
433431
python3 -m venv venv
434432
. venv/bin/activate
435433
436-
: # Force a rebuild of petsc4py as the cached one will not link to the fresh
437-
: # install of PETSc. A similar trick may be needed for compiled dependencies
438-
: # like h5py or mpi4py if changing HDF5/MPI libraries.
439-
pip cache remove petsc4py
440-
441-
: # Hotfix for petsc4py build, see https://gitlab.com/petsc/petsc/-/issues/1759
442-
echo 'Cython<3.1' > constraints.txt
443-
export PIP_CONSTRAINT=constraints.txt
434+
: # Empty the pip cache to ensure that everything is compiled from scratch
435+
pip cache purge
444436
445437
if [ ${{ inputs.target_branch }} = 'release' ]; then
446438
EXTRA_PIP_FLAGS=''

demos/patch/hcurl_riesz_star.py.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Here, we demonstrate how to do this in the latter case.
1010
We start by importing firedrake and setting up a :func:`.MeshHierarchy` and the
1111
exact solution and forcing data. Crucially, the meshes must have an overlapping
1212
parallel domain decomposition that supports the vertex star patches. This is set
13-
via the `distribution_parameters` kwarg of the :func:`.Mesh` constructor. ::
13+
via the ``distribution_parameters`` kwarg of the :func:`.Mesh` constructor. ::
1414

1515
from firedrake import *
1616

demos/patch/hdiv_riesz_star.py.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Here, we demonstrate how to do this in the former case.
1010
We start by importing firedrake and setting up a :func:`.MeshHierarchy` and the
1111
exact solution and forcing data. Crucially, the meshes must have an overlapping
1212
parallel domain decomposition that supports the vertex star patches. This is set
13-
via the `distribution_parameters` kwarg of the :func:`.Mesh` constructor. ::
13+
via the ``distribution_parameters`` kwarg of the :func:`.Mesh` constructor. ::
1414

1515
from firedrake import *
1616

demos/patch/poisson_mg_patches.py.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ get a convergent method. We refer the reader to other demos.
2323
We start by importing firedrake and setting up a :func:`.MeshHierarchy` and the
2424
exact solution and forcing data. Crucially, the meshes must have an overlapping
2525
parallel domain decomposition that supports the vertex star patches. This is set
26-
via the `distribution_parameters` kwarg of the :func:`.Mesh` constructor. ::
26+
via the ``distribution_parameters`` kwarg of the :func:`.Mesh` constructor. ::
2727

2828
from firedrake import *
2929

demos/patch/stokes_vanka_patches.py.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ operators are extracted from the globally assembled stiffness matrix.
2121
We start by importing firedrake and setting up a :func:`.MeshHierarchy` and the
2222
exact solution and forcing data. Crucially, the meshes must have an overlapping
2323
parallel domain decomposition that supports the Vanka patches. This is set
24-
via the `distribution_parameters` kwarg of the :func:`.Mesh` constructor. ::
24+
via the ``distribution_parameters`` kwarg of the :func:`.Mesh` constructor. ::
2525

2626
from firedrake import *
2727

pyop2/types/mat.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,16 +1159,16 @@ def mult(self, mat, x, y):
11591159
# Row matrix
11601160
out = v.dot(x)
11611161
if y.comm.rank == 0:
1162-
y.array[0] = out
1162+
y.array[...] = out
11631163
else:
11641164
y.array[...]
11651165
else:
11661166
# Column matrix
11671167
if x.sizes[1] == 1:
11681168
v.copy(y)
1169-
a = np.zeros(1, dtype=dtypes.ScalarType)
1169+
a = np.zeros((), dtype=dtypes.ScalarType)
11701170
if x.comm.rank == 0:
1171-
a[0] = x.array_r
1171+
a[...] = x.array_r
11721172
else:
11731173
x.array_r
11741174
with mpi.temp_internal_comm(x.comm) as comm:
@@ -1183,9 +1183,9 @@ def multTranspose(self, mat, x, y):
11831183
# Row matrix
11841184
if x.sizes[1] == 1:
11851185
v.copy(y)
1186-
a = np.zeros(1, dtype=dtypes.ScalarType)
1186+
a = np.zeros((), dtype=dtypes.ScalarType)
11871187
if x.comm.rank == 0:
1188-
a[0] = x.array_r
1188+
a[...] = x.array_r
11891189
else:
11901190
x.array_r
11911191
with mpi.temp_internal_comm(x.comm) as comm:
@@ -1197,7 +1197,7 @@ def multTranspose(self, mat, x, y):
11971197
# Column matrix
11981198
out = v.dot(x)
11991199
if y.comm.rank == 0:
1200-
y.array[0] = out
1200+
y.array[...] = out
12011201
else:
12021202
y.array[...]
12031203

@@ -1208,9 +1208,9 @@ def multTransposeAdd(self, mat, x, y, z):
12081208
# Row matrix
12091209
if x.sizes[1] == 1:
12101210
v.copy(z)
1211-
a = np.zeros(1, dtype=dtypes.ScalarType)
1211+
a = np.zeros((), dtype=dtypes.ScalarType)
12121212
if x.comm.rank == 0:
1213-
a[0] = x.array_r
1213+
a[...] = x.array_r
12141214
else:
12151215
x.array_r
12161216
with mpi.temp_internal_comm(x.comm) as comm:
@@ -1235,7 +1235,7 @@ def multTransposeAdd(self, mat, x, y, z):
12351235
out = v.dot(x)
12361236
y = y.array_r
12371237
if z.comm.rank == 0:
1238-
z.array[0] = out + y[0]
1238+
z.array[...] = out + y
12391239
else:
12401240
z.array[...]
12411241

0 commit comments

Comments
 (0)