I am trying to install Precice on our local HPC facility using Spack. The system is HPE so need to use HPE MPI (MPT-2.25)
Other details are as follows:
Please describe your system, and especially:
Precice Version 2.5
Linux: Red Hat Enterprise Linux 8.4
Building using Spack
Gcc 8.2.0, Boost 1.80, MPI: HPE MPT-2.25)
The build continues to Parmetis@4.0.3 where I get this error
1 error found in build log:
12 – The CXX compiler identification is unknown
13 – Detecting C compiler ABI info
14 – Detecting C compiler ABI info - done
15 – Check for working C compiler: /opt/hpe/hpc/mpt/mpt-2.25/bin/mpicc - skipped
16 – Detecting C compile features
17 – Detecting C compile features - done
18 CMake Error at CMakeLists.txt:2 (project):
19 The CMAKE_CXX_COMPILER:
20
21 /opt/hpe/hpc/mpt/mpt-2.25/bin/mpic++
22
23 is not a full path to an existing compiler tool.
I think the error is clear it is trying to use “mpic++” but MPT only provides “mpicxx”. So just wondering if it is possible to pass CMAKE_CXX_COMPILER to Spack to use mpicxx instead of mpic++ for Parmetis build or if there is any other Spack-specific method to control this?
I also read in Spack documentation that in install() function something like
You can tell Spack to discover compilers in your system. This could be a good starting point: Basic Usage — Spack 0.20.0.dev0 documentation (see “Compiler environment variables and additional RPATHs”)
Hi,
Thanks for your reply. The problem is not the compiler, the compiler (Gcc 8.2.0) is already found and is added to the compilers.yaml. It is that MPT (which provides MPI libs and wrappers for HPE systems) does not provide mpic++ (only mpicxx). But to build the dependency Parmetis, Spack is looking for mpic++ which does not exist (I also can’t create an alias as I don’t have write permissions).
So my question is if there is a way of telling Spack to build the Parmetis dependency with mpicxx rather than mpic++?
Thanks
Sina
But wouldn’t setting the compiler to, e.g., /usr/bin/mpicxx (or whatever path) work?
I think that using these compiler wrappers is equivalent to setting compiler + MPI library.
no setting that in compilers.yaml will build everything else with mpicxx but when it comes to Parmetis it is still looking for mpic++ for some reason.
Even in …/parmetis/package.py the CMAKE_CXX_COMPILER shows as mpicxx:
In case anybody else is interested in this, I managed to build this eventually.
mpic++ were leaked into the environment from spack/var/spack/repos/builtin/packages/openmpi/package.py, I edited the file and changed mpic++ to mpicxx and it was built successfully.