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:
parent
7313cf5ea5
commit
9f89a7e9f7
1 changed files with 3 additions and 3 deletions
|
@ -480,9 +480,9 @@ def create_host_config(self, spec, prefix, py_site_pkgs_dir=None):
|
||||||
# etc make return the spack compiler wrappers
|
# etc make return the spack compiler wrappers
|
||||||
# which can trip up mpi detection in CMake 3.14
|
# which can trip up mpi detection in CMake 3.14
|
||||||
if spec['mpi'].mpicc == spack_cc:
|
if spec['mpi'].mpicc == spack_cc:
|
||||||
mpicc_path = "cc"
|
mpicc_path = c_compiler
|
||||||
mpicxx_path = "CC"
|
mpicxx_path = cpp_compiler
|
||||||
mpifc_path = "ftn"
|
mpifc_path = f_compiler
|
||||||
cfg.write(cmake_cache_entry("ENABLE_MPI", "ON"))
|
cfg.write(cmake_cache_entry("ENABLE_MPI", "ON"))
|
||||||
cfg.write(cmake_cache_entry("MPI_C_COMPILER", mpicc_path))
|
cfg.write(cmake_cache_entry("MPI_C_COMPILER", mpicc_path))
|
||||||
cfg.write(cmake_cache_entry("MPI_CXX_COMPILER", mpicxx_path))
|
cfg.write(cmake_cache_entry("MPI_CXX_COMPILER", mpicxx_path))
|
||||||
|
|
Loading…
Reference in a new issue