diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0eb616c24d..37ab645582 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 \ @@ -87,6 +87,7 @@ 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 \ @@ -94,6 +95,7 @@ jobs: 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" @@ -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 \ diff --git a/scripts/firedrake-install b/scripts/firedrake-install index 17a8d7fdbc..41bdc21b8f 100755 --- a/scripts/firedrake-install +++ b/scripts/firedrake-install @@ -792,6 +792,10 @@ def get_petsc_options(minimal=False): # on macOS with parallel solvers. Its necessity is unclear, so a # review in the future may be required. petsc_options.add("--LDFLAGS=-Wl,-ld_classic,-dead_strip_dylibs") + if Version(clt["version"]) >= Version("16"): + # Should revisit this flag when the the issue https://gitlab.com/petsc/petsc/-/issues/1692 + # is resolved. + petsc_options.add("--with-cxx-dialect=17") elif options.get("with_blas") is not None: petsc_options.add("--with-blaslapack-dir={}".format(options["with_blas"])) if osname == "Darwin":