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:
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
env[‘CXX’] = spec[‘mpi’].mpicxx
can be used, but not sure exactly to set this?
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”)
spack compiler find.
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++?
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:
spec = self.spec
options = 
"-DGKLIB_PATH:PATH=%s/GKlib" % spec["metis"].prefix.include,
"-DMETIS_PATH:PATH=%s" % spec["metis"].prefix,
"-DCMAKE_C_COMPILER:STRING=%s" % spec["mpi"].mpicc,
"-DCMAKE_CXX_COMPILER:STRING=%s" % spec["mpi"].mpicxx,
not sure where mpic++ comes from
I am not sure how to help… Maybe @fsimonis has some idea, but this looks like something for the Spack Slack or Spack Discussions.
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.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.