]> https://gitweb.dealii.org/ - candi.git/commitdiff
Correctly unset PETSc environment variables.
authorDavid Wells <drwells@email.unc.edu>
Tue, 28 Mar 2023 20:30:47 +0000 (16:30 -0400)
committerTimo Heister <timo.heister@gmail.com>
Mon, 17 Apr 2023 19:56:12 +0000 (15:56 -0400)
candi.sh
deal.II-toolchain/packages/petsc.package

index 749a3a824b5236a4f7b18b66bcb3a9ae75be160b..b798c4e2731057830d295eaeb58da89069c63692 100755 (executable)
--- a/candi.sh
+++ b/candi.sh
@@ -160,6 +160,11 @@ WARN="\033[1;35m"
 INFO="\033[1;34m"
 BOLD="\033[1m"
 
+################################################################################
+# Ensure that no PETSc environment variables are set.
+unset PETSC_DIR
+unset PETSC_ARCH
+
 ################################################################################
 # Define candi helper functions
 
index 310ae0be32529679b343e5e8181613e8a1e236d7..56191eca4008bb2302028faa1630103acdcdd5ba 100644 (file)
@@ -120,9 +120,13 @@ package_specific_setup () {
     cd ${BUILDDIR}
     cp -rf ${UNPACK_PATH}/${EXTRACTSTO}/* .
 
-    # make sure no other invalid PETSC_DIR is set:
+    # Make sure we don't pick up any environment copies of PETSc variables. This
+    # duplicates the same unset commands in candi.sh to ensure that, should this
+    # function run as a shell script (i.e., not with the source command), they
+    # are not reset by .bash_profile or some other shell initialization script.
     unset PETSC_DIR
-    
+    unset PETSC_ARCH
+
     ${PYTHON_INTERPRETER} ./configure --prefix=${INSTALL_PATH} ${CONFOPTS} COPTFLAGS="${OPTFLAGS}" CXXOPTFLAGS="${OPTFLAGS}" FOPTFLAGS="${OPTFLAGS}"
     quit_if_fail "petsc ./configure failed"
     

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.