Closed abdelghany0 closed 1 year ago
Hi @abdelghany0 ,
please try to set:
export CC=icx
export CXX=icpx
instead of the MPI variants. That should fix the problem you are encountering. The MPI variants are slightly different wrappers, probably not correctly recognized by cmake. By exporting the variables in your environment before running cmake, cmake will automatically pick those as C and C++ compilers.
Best, Alex
Hi Alex,
Setting export CC=icc
and export CXX=icx
solved this issue, but I have encountered another one regarding LibClang
:
-- -------- LibClang detection -------------
-- Could NOT find LibClang (missing: LIBCLANG_LOCATION)
I already installed it. sudo dnf install llvm clang:
Here is the whole output:
-- Installation directory will be /rhome/Ragab/questaal/triqs/triqs.build/install
-- The C compiler identification is Intel 2021.10.0.20230609
-- The CXX compiler identification is IntelLLVM 2023.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/intel/oneapi/compiler/2023.2.0/linux/bin/intel64/icc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/intel/oneapi/compiler/2023.2.0/linux/bin/icx - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- -------- Checking compiler C++ status-------------
-- Build type: Release
-- -------- triqs version and git hash detection -------------
-- Found Git: /usr/bin/git (found version "2.39.3")
-- Triqs version : 3.1.1
-- Git hash : ded0594e0c36b3020f4bb063c3bbe0df6cda2280
-- Hostname : dog05
-- Compiled by : root
-- =============== Configuring Dependency Cpp2Py ===============
-- -------- BUILD-TYPE: Release -------------
-- Installation directory will be /rhome/Ragab/questaal/triqs/triqs.build/install
-- -------- cpp2py version and git hash detection -------------
-- Cpp2py version : 2.0.0
-- Git hash : 971d306f06079016bf8155a5814b4cc6bb6a1476
-- -------- LibClang detection -------------
-- Could NOT find LibClang (missing: LIBCLANG_LOCATION)
-- LibClang location: LIBCLANG_LOCATION-NOTFOUND
-- LibClang additional flags: -isystem/opt/intel/oneapi/tbb/2021.10.0/env/../include -isystem/opt/intel/oneapi/mpi/2021.10.0//include -isystem/opt/intel/oneapi/mkl/2023.2.0/include -isystem/opt/intel/oneapi/ipp/2021.9.0/include -isystem/opt/intel/oneapi/ippcp/2021.8.0/include -isystem/opt/intel/oneapi/dpl/2022.2.0/linux/include -isystem/opt/intel/oneapi/dpcpp-ct/2023.2.0/include -isystem/opt/intel/oneapi/dnnl/2023.2.0/cpu_dpcpp_gpu_dpcpp/include -isystem/opt/intel/oneapi/dev-utilities/2021.10.0/include -isystem/opt/intel/oneapi/dal/2023.2.0/include -isystem/opt/intel/oneapi/compiler/2023.2.0/linux/lib/oclfpga/include -isystem/opt/intel/oneapi/ccl/2021.10.0/include/cpu_gpu_dpcpp -isystem/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12 -isystem/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/x86_64-redhat-linux -isystem/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/backward -isystem/usr/lib64/clang/15.0.7/include -isystem/usr/local/include -isystem/usr/include
-- -------- Python detection -------------
-- Python interpreter /usr/bin/python3
-- Python interpreter and modules are ok : version 3.6.8
-- PYTHON_INCLUDE_DIRS = /usr/include/python3.6m
ERRORThe Python herader files have not been found. Please check that you installed the Python headers and not only the interpreter.
-- PYTHON_NUMPY_INCLUDE_DIR = /usr/local/lib64/python3.6/site-packages/numpy/core/include
-- PYTHON_NUMPY_VERSION = 1.19.5
-- PYTHON_SITE_PKG = /usr/lib/python3.6/site-packages
-- PYTHON_LIBRARY = /usr/lib64/libpython3.so
-- PYTHON_EXTRA_LIBS =-lpthread -ldl -lutil
-- Python modules will be installed in /rhome/Ragab/questaal/triqs/triqs.build/install/lib/python3.6/site-packages
-- **************************************************************************************
-- ************************** WARNING ********************************
--
-- Can not find libclang
-- You can use cpp2py to compile a code, but c++2py, c++2rst, c++2cxx will not work
--
-- ************************** WARNING ********************************
-- **************************************************************************************
-- =============== End Cpp2Py Configuration ===============
CMake Error at deps/CMakeLists.txt:59 (message):
Failed to import mpi4py Python module.
-- Configuring incomplete, errors occurred!
See also "/rhome/Ragab/questaal/triqs/triqs.build/CMakeFiles/CMakeOutput.log".
You don't need necessarily libclang. The error here is:
CMake Error at deps/CMakeLists.txt:59 (message):
Failed to import mpi4py Python module.
cmake cannot fint mpi4py
. Please make sure to install it within your current python environment.
Hello Alex, The problem was resolved after installing mpi4py library. Thank you so much.
Ragab
Hello everyone,
I work under Rocky 8.8 Linux distribution. The default
gcc
compiler isgcc version 8.5.0
, which cannot be used to build triqs. On the other hand, I have installedIntel oneAPI HPC Toolkit
on the path "/opt/intel/oneapi
".Now I am trying to install triqs with intel compiler. I used:
CC=mpiicc FC=mpiifort CXX=mpiicpc cmake /rhome/Ragab/questaal/triqs/triqs.src -DCMAKE_INSTALL_PREFIX=/rhome/Ragab/questaal/triqs/triqs.build/install
But I got the following Error:
The first question is: how to force
cmake
to choose intel compiler instead of gcc?The second question: I have
hdf5
library installed on the path "/usr/local/HDF5
". How to link it with the installation of triqs?Thank you in advance!
Ragab.