summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSajid Ali <30510036+s-sajid-ali@users.noreply.github.com>2020-07-09 16:14:49 -0500
committerGregory Becker <becker33@llnl.gov>2020-07-23 13:48:47 -0700
commit5e5cc991470475d77c2ad6dda2a7cc288e00bafe (patch)
tree4f00709086ee688590b2a2f07de447a0642b8796 /lib
parent1741279f16ffaae130142d08244c695c98e843a4 (diff)
downloadspack-5e5cc991470475d77c2ad6dda2a7cc288e00bafe.tar.gz
spack-5e5cc991470475d77c2ad6dda2a7cc288e00bafe.tar.bz2
spack-5e5cc991470475d77c2ad6dda2a7cc288e00bafe.tar.xz
spack-5e5cc991470475d77c2ad6dda2a7cc288e00bafe.zip
clear mpicc and friends before each build (#17450)
* clear mpi env vars
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/build_environment.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index 1b8aae31dc..7ef2126766 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -174,6 +174,14 @@ def clean_environment():
for v in build_system_vars:
env.unset(v)
+ # Unset mpi environment vars. These flags should only be set by
+ # mpi providers for packages with mpi dependencies
+ mpi_vars = [
+ 'MPICC', 'MPICXX', 'MPIFC', 'MPIF77', 'MPIF90'
+ ]
+ for v in mpi_vars:
+ env.unset(v)
+
build_lang = spack.config.get('config:build_language')
if build_lang:
# Override language-related variables. This can be used to force