Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/indentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:

runs-on: ubuntu-latest
container:
# Formatting is pinned to clang-format 16.0.6 independently of deal.II.
image: dealii/dealii:v9.7.1-noble
options: --user root --env OMPI_ALLOW_RUN_AS_ROOT=1 --env OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1

Expand Down
55 changes: 19 additions & 36 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,25 @@ on:
branches: [ master ]

jobs:
debug:

runs-on: ubuntu-latest

container:
image: dealii/dealii:v9.7.1-noble
options: --user root --env OMPI_ALLOW_RUN_AS_ROOT=1 --env OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1

steps:
- uses: actions/checkout@v2
- name: Test debug
run: |
rm -rf build_linux_debug
mkdir build_linux_debug
cd build_linux_debug
cmake .. -GNinja -DCMAKE_CXX_FLAGS=-Werror -DCMAKE_BUILD_TYPE=Debug
ninja
ctest -N
ctest --output-on-failure

release:

debug-and-release:
runs-on: ubuntu-latest

container:
image: dealii/dealii:v9.7.1-noble
options: --user root --env OMPI_ALLOW_RUN_AS_ROOT=1 --env OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1

steps:
- uses: actions/checkout@v2
- name: Test release
- uses: actions/checkout@v4
- name: Build deal.II 9.8.0 CI environment
run: docker build -f docker/Dockerfile.ci -t pi-bem-ci:9.8.0 .
- name: Test Debug and Release without compiler warnings
run: |
rm -rf build_linux_release
mkdir build_linux_release
cd build_linux_release
cmake .. -GNinja -DCMAKE_CXX_FLAGS=-Werror -DCMAKE_BUILD_TYPE=Release
ninja
ctest -N
ctest --output-on-failure
docker run --rm \
-e OMPI_ALLOW_RUN_AS_ROOT=1 -e OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 \
-v "$PWD:/workspace" -w /workspace pi-bem-ci:9.8.0 bash -lc '
set -e
cmake -S . -B build-docker/9.8.0-ci -GNinja \
-DCMAKE_BUILD_TYPE=DebugRelease -DCMAKE_CXX_FLAGS=-Werror \
-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=mold \
-DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=mold
cmake --build build-docker/9.8.0-ci -j 2
test -x build-docker/9.8.0-ci/bem_fma_3d
test -x build-docker/9.8.0-ci/bem_fma_3d.g
cd build-docker/9.8.0-ci
ctest --output-on-failure
'
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ENDIF()
CMAKE_MINIMUM_REQUIRED(VERSION 3.13.4)


FIND_PACKAGE(deal.II 9.7.1 REQUIRED
FIND_PACKAGE(deal.II 9.8.0 REQUIRED
HINTS ${deal.II_DIR} ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR}
)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Just follow the [instructions](https://github.com/dealii/dealii/wiki/deal.II-in-
We provide the possibility of using Docker as a tool to provide a fully operational environment for our library. To use such tool you need to install Docker following the [instructions](https://docs.docker.com/engine/installation/) provided by its authors. Then you can execute the following command line instruction

```
docker run -v `pwd`:/pwd_to_your_own_directory/ -i -t dealii/dealii:v9.7.1-noble bash
docker run -v `pwd`:/pwd_to_your_own_directory/ -i -t dealii/dealii:v9.8.0-resolute-r1-arm64 bash
```

to retrieve the environment. In such a shell you can easily compile the pi-BEM library following its own instructions.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.7.1
9.8.0
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM dealii/dealii:v9.7.1-noble
FROM dealii/dealii:v9.8.0-resolute-r1-arm64

# pi-BEM master image
RUN git clone https://github.com/mathLab/pi-BEM/ &&\
Expand Down
20 changes: 20 additions & 0 deletions docker/Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Bootstrap the exact 9.8.0 release for hosted CI while the versioned
# docker-files PR 90 image is available locally but not yet in Docker Hub.
FROM ubuntu:26.04

ARG DEAL_II_PACKAGE_VERSION=9.8.0-1~ubuntu26.04.1~ppa2
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates software-properties-common \
&& add-apt-repository -y ppa:ginggs/deal.ii-9.8.0-backports \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
libdeal.ii-dev=${DEAL_II_PACKAGE_VERSION} \
build-essential cmake ninja-build git numdiff \
&& rm -rf /var/lib/apt/lists/*
# Linking Debug deal.II consumers with the default linker dominates test time.
RUN apt-get update \
&& apt-get install -y --no-install-recommends mold \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /workspace
42 changes: 32 additions & 10 deletions docs/complex-robin.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Multiple potentials, complex problems and Robin conditions

## Build and run with deal.II 9.7.1
## Build and run with deal.II 9.8.0

From the repository root, build both configurations in the supplied container:

```sh
docker run --rm -v "$PWD:/workspace" -w /workspace \
dealii/dealii:v9.7.1-noble bash -lc '
cmake -S . -B build-docker/9.7.1 -GNinja \
dealii/dealii:v9.8.0-resolute-r1-arm64 bash -lc '
cmake -S . -B build-docker/9.8.0 -GNinja \
-DCMAKE_BUILD_TYPE=DebugRelease -DCMAKE_CXX_FLAGS=-Werror &&
cmake --build build-docker/9.7.1 -j 4 &&
cd build-docker/9.7.1 && ctest --output-on-failure
cmake --build build-docker/9.8.0 -j 4 &&
cd build-docker/9.8.0 && ctest --output-on-failure
'
```

Expand All @@ -24,13 +24,13 @@ The sphere examples use paths relative to `samples/`. Keep each run's output
separate, and copy both the parameter file and its grid directory:

```sh
mkdir -p build-docker/9.7.1/example-complex
cp -R samples/grids build-docker/9.7.1/example-complex/
mkdir -p build-docker/9.8.0/example-complex
cp -R samples/grids build-docker/9.8.0/example-complex/
cp samples/ref_params_sphere_complex_DR_direct.prm \
build-docker/9.7.1/example-complex/parameters_bem_3.prm
build-docker/9.8.0/example-complex/parameters_bem_3.prm
docker run --rm -v "$PWD:/workspace" \
-w /workspace/build-docker/9.7.1/example-complex \
dealii/dealii:v9.7.1-noble bash -lc '
-w /workspace/build-docker/9.8.0/example-complex \
dealii/dealii:v9.8.0-resolute-r1-arm64 bash -lc '
mpirun -np 2 ../bem_fma_3d 2
'
```
Expand All @@ -42,6 +42,28 @@ The samples cover real/complex potentials, DN (Dirichlet/Neumann), DR
`Direct` assembles integral matrices and uses an iterative solver; it does not
mean a dense direct factorization. FMA is supported in 3D only.

## Hosted CI environment

Local validation uses `dealii/dealii:v9.8.0-resolute-r1-arm64`, built from
the frozen recipes in [docker-files PR 90](https://github.com/dealii/docker-files/pull/90).
Until that image is published, hosted CI builds `docker/Dockerfile.ci` with the
exact deal.II 9.8.0 backports package on Ubuntu 26.04. This supports hosted AMD64
runners without depending on a tag that currently exists only locally.
The CI environment uses mold to link the large Debug libraries efficiently.
The formatting job retains clang-format 16.0.6 from its existing image.

To reproduce the hosted environment locally, build it and substitute
`pi-bem-ci:9.8.0` for the image in the commands above:

```sh
docker build -f docker/Dockerfile.ci -t pi-bem-ci:9.8.0 .
```

The deal.II 9.8 update replaces the removed three-argument Trilinos vector
`reinit(source,false,true)` with assignment into the already initialized
ghost layout. The assignment imports both locally owned and ghost values;
it must participate collectively on the vector communicator.

## Components and boundary-function slots

`Potential components` counts real-valued storage components. Each complex
Expand Down
2 changes: 1 addition & 1 deletion include/constrained_matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ void
ConstrainedOperator<VEC, MATRIX>::vmult(VEC &dst, const VEC &src) const
{
VEC loc_src(constr_cpu_set);
loc_src.reinit(src, false, true);
loc_src = src;

matrix.vmult(dst, src);

Expand Down
4 changes: 2 additions & 2 deletions include/constrained_matrix_complex.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ ConstrainedComplexOperator<VEC, MATRIX>::vmult(VEC &dst, const VEC &src) const
auto offset = matrix.this_cpu_set.size();
// store localized constrained values
VEC loc_src(constr_cpu_set_complex);
loc_src.reinit(src, false, true);
loc_src = src;

// split into real, imag
c_src = 0;
Expand Down Expand Up @@ -258,7 +258,7 @@ BlockConstrainedComplexOperator<VEC, MATRIX>::vmult(VEC &dst,
localized_src.reinit(parallel_partitioning, mpi_communicator);
for (unsigned int i = 0; i < src.n_blocks(); ++i)
{
localized_src.block(i).reinit(src.block(i), false, true);
localized_src.block(i) = src.block(i);
}

matrix.vmult(dst.block(0), dst.block(1), src.block(0), src.block(1));
Expand Down
2 changes: 1 addition & 1 deletion include/true_constrained_matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ ConstrainedOperator<VEC, MATRIX>::constraint_vmult(VEC &dst,
const VEC &src) const
{
VEC loc_src(src.locally_owned_elements(), constr_cpu_set, mpi_communicator);
loc_src.reinit(src, false, true);
loc_src = src;

for (unsigned int i = 0; i < dst.size(); ++i)
{
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
# Open the supported deal.II environment in the current checkout.
exec docker run --rm -it -v "$PWD:/app" -w /app dealii/dealii:v9.7.1-noble bash
exec docker run --rm -it -v "$PWD:/app" -w /app dealii/dealii:v9.8.0-resolute-r1-arm64 bash
2 changes: 1 addition & 1 deletion scripts/dr.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
# Run a shell command in the supported deal.II environment.
exec docker run --user "$(id -u):$(id -g)" -it --rm \
-v "$PWD:/app" -w /app dealii/dealii:v9.7.1-noble /bin/sh -c "$*"
-v "$PWD:/app" -w /app dealii/dealii:v9.8.0-resolute-r1-arm64 /bin/sh -c "$*"
4 changes: 2 additions & 2 deletions scripts/run_docker.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
# Run the same warning-free Debug/Release checks used for releases.
exec docker run --rm -v "$PWD:/app" -w /app dealii/dealii:v9.7.1-noble \
bash -lc 'set -e; cmake -S . -B build-docker/9.7.1 -GNinja -DCMAKE_BUILD_TYPE=DebugRelease -DCMAKE_CXX_FLAGS=-Werror; cmake --build build-docker/9.7.1 -j 4; cd build-docker/9.7.1; ctest --output-on-failure'
exec docker run --rm -v "$PWD:/workspace" -w /workspace dealii/dealii:v9.8.0-resolute-r1-arm64 \
bash -lc 'set -e; cmake -S . -B build-docker/9.8.0 -GNinja -DCMAKE_BUILD_TYPE=DebugRelease -DCMAKE_CXX_FLAGS=-Werror; cmake --build build-docker/9.8.0 -j 4; cd build-docker/9.8.0; ctest --output-on-failure'
6 changes: 3 additions & 3 deletions source/bem_problem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2990,9 +2990,9 @@ BEMProblem<dim>::compute_gradients(
// We need the solution to be stored on a parallel vector with ghost
// elements. We let Trilinos take care of it.
TrilinosWrappers::MPI::Vector phi(ghosted_set);
phi.reinit(glob_phi, false, true);
phi = glob_phi;
TrilinosWrappers::MPI::Vector dphi_dn(ghosted_set);
dphi_dn.reinit(glob_dphi_dn, false, true);
dphi_dn = glob_dphi_dn;

// We reinit the gradient solution
get_vector_gradients_solution().reinit(vector_this_cpu_set, mpi_communicator);
Expand Down Expand Up @@ -3143,7 +3143,7 @@ BEMProblem<dim>::compute_surface_gradients(
{
Teuchos::TimeMonitor LocalTimer(*SurfaceGradientTime);
TrilinosWrappers::MPI::Vector phi(ghosted_set);
phi.reinit(tmp_rhs, false, true);
phi = tmp_rhs;

get_vector_surface_gradients_solution().reinit(vector_this_cpu_set,
mpi_communicator);
Expand Down
Loading