Update package.py (#19513)

On Cori(Cray-XC40), I need to pass the entire path for the compilers, this is what is saved in c_compiler, cpp_compiler, f_compiler. Therefore, when for the MPI wrappers only the binary name is provided I run into the same issue. There is no drawback of passing the entire path, this is set by the user through the compiler path anyways.
This commit is contained in:
adityakavalur 2020-10-27 14:24:09 -04:00 committed by GitHub
parent 7313cf5ea5
commit 9f89a7e9f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -480,9 +480,9 @@ def create_host_config(self, spec, prefix, py_site_pkgs_dir=None):
# etc make return the spack compiler wrappers
# which can trip up mpi detection in CMake 3.14
if spec['mpi'].mpicc == spack_cc:
mpicc_path = "cc"
mpicxx_path = "CC"
mpifc_path = "ftn"
mpicc_path = c_compiler
mpicxx_path = cpp_compiler
mpifc_path = f_compiler
cfg.write(cmake_cache_entry("ENABLE_MPI", "ON"))
cfg.write(cmake_cache_entry("MPI_C_COMPILER", mpicc_path))
cfg.write(cmake_cache_entry("MPI_CXX_COMPILER", mpicxx_path))