Skip to content
Snippets Groups Projects
Commit a0195371 authored by Adam J. Stewart's avatar Adam J. Stewart Committed by Todd Gamblin
Browse files

Unset PETSC_DIR during installation (#2768)

* Set PETSC_DIR during installation

* Move env var unsets to setup_environment

* Fix unset var name and number of args
parent b7fdc03b
Branches
Tags
No related merge requests found
......@@ -218,6 +218,16 @@ def install(self, spec, prefix):
'-pc_type', 'hypre',
'-pc_hypre_type', 'boomeramg')
def setup_environment(self, spack_env, run_env):
# configure fails if these env vars are set outside of Spack
spack_env.unset('PETSC_DIR')
spack_env.unset('PETSC_ARCH')
# Set PETSC_DIR in the module file
run_env.set('PETSC_DIR', self.prefix)
run_env.unset('PETSC_ARCH')
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
# set up PETSC_DIR for everyone using PETSc package
# Set up PETSC_DIR for everyone using PETSc package
spack_env.set('PETSC_DIR', self.prefix)
spack_env.unset('PETSC_ARCH')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment