Skip to content

Commit

Permalink
Configure PETSc with --with-strict-petscerrorcode
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjward committed Jan 9, 2025
1 parent 39742a6 commit fe9024a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ jobs:
rm -rf firedrake_venv
- name: Build Firedrake
run: |
unset PETSC_DIR PETSC_ARCH SLEPC_DIR
cd ..
# Linting should ignore unquoted shell variable $COMPLEX
# shellcheck disable=SC2086
./firedrake/scripts/firedrake-install \
$COMPLEX \
--honour-petsc-dir \
--mpicc="$MPICH_DIR"/mpicc \
--mpicxx="$MPICH_DIR"/mpicxx \
--mpif90="$MPICH_DIR"/mpif90 \
Expand All @@ -87,13 +87,15 @@ jobs:
|| (cat firedrake-install.log && /bin/false)
- name: Install test dependencies
run: |
unset PETSC_DIR PETSC_ARCH SLEPC_DIR
. ../firedrake_venv/bin/activate
python "$(which firedrake-clean)"
python -m pip install \
pytest-xdist pytest-timeout ipympl
python -m pip list
- name: Test Firedrake
run: |
unset PETSC_DIR PETSC_ARCH SLEPC_DIR
. ../firedrake_venv/bin/activate
echo OMP_NUM_THREADS is "$OMP_NUM_THREADS"
echo OPENBLAS_NUM_THREADS is "$OPENBLAS_NUM_THREADS"
Expand All @@ -119,6 +121,7 @@ jobs:
- name: Test pyadjoint
if: ${{ matrix.scalar-type == 'real' }}
run: |
unset PETSC_DIR PETSC_ARCH SLEPC_DIR
. ../firedrake_venv/bin/activate
cd ../firedrake_venv/src/pyadjoint
python -m pytest \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pip-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
--with-shared-libraries=1 \
--with-mpi-dir=/opt/homebrew \
--with-zlib \
--with-strict-petscerrorcode \
--download-bison \
--download-hdf5 \
--download-hwloc \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pyop2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
--with-debugging=1 \
--with-shared-libraries=1 \
--with-c2html=0 \
--with-strict-petscerrorcode \
--with-fortran-bindings=0
make
Expand Down
3 changes: 3 additions & 0 deletions docker/Dockerfile.env
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ RUN bash -c 'cd petsc; \
--download-scalapack \
--download-suitesparse \
--download-superlu_dist \
--with-strict-petscerrorcode \
PETSC_ARCH=packages; \
mv packages/include/petscconf.h packages/include/old_petscconf.nope; \
rm -rf /home/firedrake/petsc/**/externalpackages; \
Expand Down Expand Up @@ -105,6 +106,7 @@ RUN bash -c 'export PACKAGES=/home/firedrake/petsc/packages; \
--with-scalapack-dir=$PACKAGES \
--with-suitesparse-dir=$PACKAGES \
--with-superlu_dist-dir=$PACKAGES \
--with-strict-petscerrorcode \
PETSC_ARCH=default; \
make PETSC_DIR=/home/firedrake/petsc PETSC_ARCH=default all;'

Expand Down Expand Up @@ -144,6 +146,7 @@ RUN bash -c 'export PACKAGES=/home/firedrake/petsc/packages; \
--with-scalapack-dir=$PACKAGES \
--with-suitesparse-dir=$PACKAGES \
--with-superlu_dist-dir=$PACKAGES \
--with-strict-petscerrorcode \
PETSC_ARCH=complex; \
make PETSC_DIR=/home/firedrake/petsc PETSC_ARCH=complex all;'

Expand Down
1 change: 1 addition & 0 deletions scripts/firedrake-install
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,7 @@ def get_petsc_options(minimal=False):
"--with-debugging=0",
"--with-shared-libraries=1",
"--with-c2html=0",
"--with-strict-petscerrorcode",
# Parser generator
"--download-bison"}
for pkg in get_minimal_petsc_packages():
Expand Down

0 comments on commit fe9024a

Please sign in to comment.