Skip to content

Commit ce1f803

Browse files
committed
Merge branch 'main' into release
2 parents 8a9ba52 + 2773bcb commit ce1f803

File tree

10 files changed

+50
-56
lines changed

10 files changed

+50
-56
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ jobs:
122122

123123
build-complex:
124124
docker:
125-
- image: ghcr.io/fenics/test-env:latest-mpich
125+
- image: ghcr.io/fenics/test-env:nightly-mpich
126126
environment:
127127
DEBIAN_FRONTEND: "noninteractive"
128128
PETSC_ARCH: "linux-gnu-complex-32"

RELEASE.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ UFL still runs on the year-based release scheme.
3232

3333
1. Merge `main` into `release` resolving all conflicts in favour of `main`.
3434

35-
git merge -Xtheirs main
35+
git checkout release
36+
git merge --no-commit main
37+
git checkout --theirs main .
38+
git diff main
3639

3740
2. Update version numbers, e.g.
3841

@@ -50,7 +53,10 @@ UFL still runs on the year-based release scheme.
5053

5154
1. Merge `main` into `release` resolving all conflicts in favour of `main`.
5255

53-
git merge -Xtheirs main
56+
git checkout release
57+
git merge --no-commit main
58+
git checkout --theirs main .
59+
git diff main
5460

5561
2. Update the version number in `setup.cfg`, e.g. `2022.2.0`.
5662

@@ -62,15 +68,18 @@ UFL still runs on the year-based release scheme.
6268

6369
1. Merge `main` into `release` resolving all conflicts in favour of `main`.
6470

65-
git merge -Xtheirs main
71+
git checkout release
72+
git merge --no-commit main
73+
git checkout --theirs main .
74+
git diff main
6675

6776
2. Update the version number in `setup.cfg`, e.g. `0.5.0`.
6877

6978
3. Update the dependency versions for `fenics-basix` and `fenics-ufl` in `setup.cfg`.
7079

7180
4. If necessary, update the version number in `cmake/CMakeLists.txt`, e.g. `0.5.0`.
7281

73-
5. Update the version number macros in `ffcx/code_generation/ufcx.h`. Typically this
82+
5. Update the version number macros in `ffcx/codegeneration/ufcx.h`. Typically this
7483
should match the Python version number. Remember to change the
7584
`UFCX_VERSION_RELEASE` to `1`.
7685

@@ -82,7 +91,10 @@ UFL still runs on the year-based release scheme.
8291

8392
1. Merge `main` into `release` resolving all conflicts in favour of `main`.
8493

85-
git merge -Xtheirs main
94+
git checkout release
95+
git merge --no-commit main
96+
git checkout --theirs main .
97+
git diff main
8698

8799
2. In `cpp/CMakeLists.txt` change the version number near the top of the file,
88100
e.g. `0.5.0`.
@@ -92,7 +104,7 @@ UFL still runs on the year-based release scheme.
92104
there is no need to change anything here. However, if they don't match, you
93105
need to manually specify the appropriate UFCx version.
94106

95-
4. In `python/setup.cfg` change the `VERSION` variable to e.g. `0.5.0` and
107+
4. In `python/setup.py` change the `VERSION` variable to e.g. `0.5.0` and
96108
update the depedency versions for `fenics-ffcx` and `fenics-ufl`.
97109

98110
5. Commit and push.

cpp/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ------------------------------------------------------------------------------
22
# Top level CMakeLists.txt file for DOLFINx
3-
cmake_minimum_required(VERSION 3.16)
3+
cmake_minimum_required(VERSION 3.19)
44

55
# ------------------------------------------------------------------------------
66
# Set project name and version number
@@ -189,7 +189,7 @@ if(BASIX_PY_DIR)
189189
endif()
190190
endif()
191191

192-
find_package(Basix REQUIRED CONFIG HINTS ${BASIX_PY_DIR})
192+
find_package(Basix 0.6 REQUIRED CONFIG HINTS ${BASIX_PY_DIR})
193193
set_package_properties(
194194
basix PROPERTIES
195195
TYPE REQUIRED

cpp/cmake/modules/FindUFCx.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,6 @@ mark_as_advanced(UFCX_VERSION UFCX_INCLUDE_DIRS UFCX_SIGNATURE)
7272
find_package_handle_standard_args(
7373
UFCx
7474
REQUIRED_VARS UFCX_INCLUDE_DIRS UFCX_SIGNATURE UFCX_VERSION
75-
VERSION_VAR UFCX_VERSION REASON_FAILURE_MESSAGE "UFCx could not be found."
75+
VERSION_VAR UFCX_VERSION HANDLE_VERSION_RANGE REASON_FAILURE_MESSAGE
76+
"UFCx could not be found."
7677
)

cpp/cmake/scripts/generate-cmakefiles.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#
1313
# python cmake/scripts/generate-cmakefiles from dolfinx/cpp
1414
#
15-
cmake_minimum_required(VERSION 3.16)
15+
cmake_minimum_required(VERSION 3.19)
1616
1717
set(PROJECT_NAME {project_name})
1818
project(${{PROJECT_NAME}} LANGUAGES C CXX)
@@ -118,7 +118,7 @@
118118
#
119119
# python cmake/scripts/generate-cmakefiles from dolfinx/cpp
120120
#
121-
cmake_minimum_required(VERSION 3.16)
121+
cmake_minimum_required(VERSION 3.19)
122122
123123
set(PROJECT_NAME {project_name})
124124
project(${{PROJECT_NAME}} LANGUAGES C CXX)

cpp/dolfinx/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ include(CMakePackageConfigHelpers)
182182
write_basic_package_version_file(
183183
${CMAKE_BINARY_DIR}/dolfinx/DOLFINXConfigVersion.cmake
184184
VERSION ${DOLFINX_VERSION}
185-
COMPATIBILITY ExactVersion
185+
COMPATIBILITY AnyNewerVersion
186186
)
187187

188188
configure_package_config_file(

cpp/dolfinx/mesh/Mesh.cpp

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,11 @@ mesh::create_submesh(const Mesh& mesh, int dim,
322322
// NOTE: Unclear what this return for prisms
323323
const std::size_t num_entity_dofs = layout.num_entity_closure_dofs(dim);
324324

325-
std::vector<std::int32_t> geometry_indices(num_entity_dofs
326-
* submesh_to_mesh_map.size());
325+
std::vector<std::int32_t> geometry_indices;
326+
geometry_indices.reserve(num_entity_dofs * submesh_to_mesh_map.size());
327+
std::vector<std::int32_t> submesh_x_dofmap_offsets;
328+
submesh_x_dofmap_offsets.reserve(submesh_to_mesh_map.size() + 1);
329+
submesh_x_dofmap_offsets.push_back(0);
327330
{
328331
const graph::AdjacencyList<std::int32_t>& xdofs = geometry.dofmap();
329332
const int tdim = topology.dim();
@@ -354,8 +357,9 @@ mesh::create_submesh(const Mesh& mesh, int dim,
354357
= closure_dofs[dim][local_entity];
355358

356359
auto xc = xdofs.links(cell);
357-
for (std::size_t j = 0; j < num_entity_dofs; ++j)
358-
geometry_indices[i * num_entity_dofs + j] = xc[entity_dofs[j]];
360+
for (std::int32_t entity_dof : entity_dofs)
361+
geometry_indices.push_back(xc[entity_dof]);
362+
submesh_x_dofmap_offsets.push_back(geometry_indices.size());
359363
}
360364
}
361365

@@ -413,26 +417,18 @@ mesh::create_submesh(const Mesh& mesh, int dim,
413417
mesh_to_submesh_x_dof_map[submesh_to_mesh_x_dof_map[i]] = i;
414418

415419
// Create submesh geometry dofmap
416-
std::vector<std::int32_t> entity_x_dofs;
417420
std::vector<std::int32_t> submesh_x_dofmap_vec;
418421
submesh_x_dofmap_vec.reserve(geometry_indices.size());
419-
std::vector<std::int32_t> submesh_x_dofmap_offsets(1, 0);
420-
submesh_x_dofmap_offsets.reserve(submesh_to_mesh_map.size() + 1);
421-
for (std::size_t i = 0; i < submesh_to_mesh_map.size(); ++i)
422-
{
423-
// Get the mesh geometry dofs for ith entity in entities
424-
auto it = std::next(geometry_indices.begin(), i * num_entity_dofs);
425-
entity_x_dofs.assign(it, std::next(it, num_entity_dofs));
422+
std::transform(geometry_indices.cbegin(), geometry_indices.cend(),
423+
std::back_inserter(submesh_x_dofmap_vec),
424+
[&mesh_to_submesh_x_dof_map](auto x_dof)
425+
{
426+
std::int32_t x_dof_submesh
427+
= mesh_to_submesh_x_dof_map[x_dof];
428+
assert(x_dof_submesh != -1);
429+
return x_dof_submesh;
430+
});
426431

427-
// For each mesh dof of the entity, get the submesh dof
428-
for (std::int32_t x_dof : entity_x_dofs)
429-
{
430-
std::int32_t x_dof_submesh = mesh_to_submesh_x_dof_map[x_dof];
431-
assert(x_dof_submesh != -1);
432-
submesh_x_dofmap_vec.push_back(x_dof_submesh);
433-
}
434-
submesh_x_dofmap_offsets.push_back(submesh_x_dofmap_vec.size());
435-
}
436432
graph::AdjacencyList<std::int32_t> submesh_x_dofmap(
437433
std::move(submesh_x_dofmap_vec), std::move(submesh_x_dofmap_offsets));
438434

docker/Dockerfile.oneapi

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ARG HDF5_SERIES=1.12
1010
ARG HDF5_PATCH=2
1111
ARG PETSC_VERSION=3.17.5
1212
ARG SLEPC_VERSION=3.17.2
13-
ARG PYBIND11_VERSION=2.10.1
13+
ARG PYBIND11_VERSION=2.10.2
1414
ARG KAHIP_VERSION=3.14
1515

1616
WORKDIR /tmp
@@ -20,6 +20,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
2020
apt-get -qq update && \
2121
apt-get -yq --with-new-pkgs -o Dpkg::Options::="--force-confold" upgrade && \
2222
apt-get -y install \
23+
bzip2 \
2324
cmake \
2425
gnupg \
2526
libboost-dev \
@@ -36,12 +37,10 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
3637
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
3738

3839
# Install oneAPI libraries
39-
RUN wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB && \
40-
apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB && \
41-
echo "deb https://apt.repos.intel.com/oneapi all main" | tee /etc/apt/sources.list.d/oneAPI.list && \
40+
RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \
41+
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | tee /etc/apt/sources.list.d/oneAPI.list && \
4242
apt-get update && \
43-
apt-get install -y intel-oneapi-common-vars intel-oneapi-compiler-dpcpp-cpp \
44-
intel-oneapi-mkl-devel intel-oneapi-mpi-devel intel-oneapi-python && \
43+
apt-get install -y libstdc++-11-dev intel-oneapi-compiler-dpcpp-cpp intel-oneapi-mkl-devel intel-oneapi-mpi-devel intel-oneapi-python && \
4544
apt-get clean && \
4645
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
4746

@@ -100,7 +99,6 @@ RUN . /opt/intel/oneapi/setvars.sh && \
10099
--with-64-bit-indices=no \
101100
--with-fortran-bindings=no \
102101
--with-shared-libraries \
103-
--download-hypre \
104102
--download-superlu_dist \
105103
--with-scalar-type=real && \
106104
make PETSC_DIR=/usr/local/petsc PETSC_ARCH=linux-gnu-real-32 ${MAKEFLAGS} all && \
@@ -110,7 +108,6 @@ RUN . /opt/intel/oneapi/setvars.sh && \
110108
--with-64-bit-indices=no \
111109
--with-fortran-bindings=no \
112110
--with-shared-libraries \
113-
--download-hypre \
114111
--download-superlu_dist \
115112
--with-scalar-type=complex && \
116113
make PETSC_DIR=/usr/local/petsc PETSC_ARCH=linux-gnu-complex-32 ${MAKEFLAGS} all && \
@@ -120,7 +117,6 @@ RUN . /opt/intel/oneapi/setvars.sh && \
120117
--with-64-bit-indices=yes \
121118
--with-fortran-bindings=no \
122119
--with-shared-libraries \
123-
--download-hypre \
124120
--download-superlu_dist \
125121
--with-scalar-type=real && \
126122
make PETSC_DIR=/usr/local/petsc PETSC_ARCH=linux-gnu-real-64 ${MAKEFLAGS} all && \
@@ -130,7 +126,6 @@ RUN . /opt/intel/oneapi/setvars.sh && \
130126
--with-64-bit-indices=yes \
131127
--with-fortran-bindings=no \
132128
--with-shared-libraries \
133-
--download-hypre \
134129
--download-superlu_dist \
135130
--with-scalar-type=complex && \
136131
make PETSC_DIR=/usr/local/petsc PETSC_ARCH=linux-gnu-complex-64 ${MAKEFLAGS} all && \

python/test/unit/common/test_timer.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,14 @@
66
#
77
# SPDX-License-Identifier: LGPL-3.0-or-later
88

9-
import random
109
from time import sleep
1110

1211
from dolfinx import common
1312

14-
# Seed random generator for determinism
15-
random.seed(0)
16-
17-
18-
def get_random_task_name():
19-
"""Get pseudo-random string"""
20-
return hex(random.randint(0, 1e32))
21-
2213

2314
def test_context_manager_named():
2415
"""Test that named Timer works as context manager"""
25-
task = get_random_task_name()
16+
task = "test_context_manager_named_str"
2617

2718
# Execute task in the context manager
2819
t = common.Timer(task)

python/test/unit/fem/test_function_space.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from dolfinx.mesh import create_mesh, create_unit_cube
1313
from ufl import (Cell, FiniteElement, Mesh, TestFunction, TrialFunction,
1414
VectorElement, grad, triangle)
15-
from ufl.log import UFLException
1615

1716
from mpi4py import MPI
1817

@@ -221,7 +220,7 @@ def test_argument_equality(mesh, V, V2, W, W2):
221220
def test_cell_mismatch(mesh):
222221
"""Test that cell mismatch raises early enough from UFL"""
223222
element = FiniteElement("P", triangle, 1)
224-
with pytest.raises(UFLException):
223+
with pytest.raises(BaseException):
225224
FunctionSpace(mesh, element)
226225

227226

0 commit comments

Comments
 (0)