diff options
author | Sajid Ali <30510036+s-sajid-ali@users.noreply.github.com> | 2020-07-09 16:14:49 -0500 |
---|---|---|
committer | Gregory Becker <becker33@llnl.gov> | 2020-07-23 13:48:47 -0700 |
commit | 5e5cc991470475d77c2ad6dda2a7cc288e00bafe (patch) | |
tree | 4f00709086ee688590b2a2f07de447a0642b8796 | |
parent | 1741279f16ffaae130142d08244c695c98e843a4 (diff) | |
download | spack-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
-rw-r--r-- | lib/spack/spack/build_environment.py | 8 |
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 |