iRASPA / RASPA3

This software is a general purpose classical simulation package.
Other
46 stars 6 forks source link

fatal error: 'mdspan' file not found #19

Closed b-mazur closed 1 month ago

b-mazur commented 1 month ago

Hello,

I'm trying to compile RASPA3 on our server, however, I've encountered some problems which I can't solve. Here is cmake command and output:

> cmake -B build \
> -G Ninja \
> -DCMAKE_INSTALL_PREFIX=/lustre/pd01/hpc-kuchta-1716987452/software/RASPA3/build \
> -DCMAKE_C_COMPILER=$(micromamba run -n raspa_env which clang) \
> -DCMAKE_CXX_COMPILER=$(micromamba run -n raspa_env which clang++) \
> -DCMAKE_PREFIX_PATH=/home/bamaz/software/micromamba/envs/raspa_env \
> -DCMAKE_LIBRARY_PATH=/home/bamaz/software/micromamba/envs/raspa_env/lib \
> -DCMAKE_INCLUDE_PATH=/home/bamaz/software/micromamba/envs/raspa_env/include \
> -DOpenMP_CXX_FLAGS="-fopenmp" \
> -DOpenMP_CXX_LIB_NAMES="omp" \
> -DOpenMP_CXX_LIBRARIES="/home/bamaz/software/micromamba/envs/raspa_env/lib/libomp.so" \
> -DOpenMP_omp_LIBRARY="/home/bamaz/software/micromamba/envs/raspa_env/lib/libomp.so" \
> -DOpenMP_CXX_INCLUDE_DIR="/home/bamaz/software/micromamba/envs/raspa_env/include" \
> -DHDF5_LIBRARIES=/home/bamaz/software/micromamba/envs/raspa_env/lib/libhdf5.so \
> -DHDF5_INCLUDE_DIRS=/home/bamaz/software/micromamba/envs/raspa_env/include \
> -DCMAKE_CXX_COMPILER_LAUNCHER=$(micromamba run -n raspa_env which clang-scan-deps)
-- The CXX compiler identification is Clang 19.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/bamaz/software/micromamba/envs/raspa_env/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for sgemm_
-- Looking for sgemm_ - not found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- Found BLAS: /home/bamaz/software/micromamba/envs/raspa_env/lib/libopenblas.so  
-- Looking for cheev_
-- Looking for cheev_ - found
-- Found LAPACK: /home/bamaz/software/micromamba/envs/raspa_env/lib/libopenblas.so;-lpthread;-lm;-ldl  
-- Found OpenMP_CXX: -fopenmp (found version "5.1") 
-- Found OpenMP: TRUE (found version "5.1")  
-- HDF5 CXX compiler wrapper is unable to compile a minimal HDF5 program.
-- Found HDF5: /home/bamaz/software/micromamba/envs/raspa_env/lib/libhdf5.so;/home/bamaz/software/micromamba/envs/raspa_env/lib/libhdf5_cpp.so;/home/bamaz/software/micromamba/envs/raspa_env/lib/libhdf5.so (found version "1.14.3") found components: CXX 
bash: llvm-config: command not found
bash: llvm-config: command not found
-- The C compiler identification is Clang 19.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/bamaz/software/micromamba/envs/raspa_env/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done (6.4s)
-- Generating done (0.7s)
-- Build files have been written to: /lustre/pd01/hpc-kuchta-1716987452/software/RASPA3/build

and here is output from ninja:

> ninja -C build
ninja: Entering directory `build'
[36/1038] Scanning /lustre/pd01/hpc-kuchta-1716987452/software/RASPA3/src/raspakit/breakthrough.cpp for CXX dependencies
FAILED: src/CMakeFiles/raspakit.dir/raspakit/breakthrough.cpp.o.ddi 
"/home/bamaz/software/micromamba/envs/raspa_env/bin/clang-scan-deps-19" -format=p1689 -- /home/bamaz/software/micromamba/envs/raspa_env/bin/clang++ -DUSE_LEGACY_HEADERS -DVERSION=3.0.0 -I/home/bamaz/software/micromamba/envs/raspa_env/include -std=c++23 -fPIC -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2 -Wimplicit-fallthrough -Wno-gnu-anonymous-struct -Wno-error=deprecated-declarations -Wno-error=nan-infinity-disabled -Wno-deprecated-declarations -Wno-nan-infinity-disabled -Wno-unknown-warning-option -x c++ /lustre/pd01/hpc-kuchta-1716987452/software/RASPA3/src/raspakit/breakthrough.cpp -c -o src/CMakeFiles/raspakit.dir/raspakit/breakthrough.cpp.o -resource-dir "/home/bamaz/software/micromamba/envs/raspa_env/lib/clang/19" -MT src/CMakeFiles/raspakit.dir/raspakit/breakthrough.cpp.o.ddi -MD -MF src/CMakeFiles/raspakit.dir/raspakit/breakthrough.cpp.o.ddi.d > src/CMakeFiles/raspakit.dir/raspakit/breakthrough.cpp.o.ddi.tmp && mv src/CMakeFiles/raspakit.dir/raspakit/breakthrough.cpp.o.ddi.tmp src/CMakeFiles/raspakit.dir/raspakit/breakthrough.cpp.o.ddi
Error while scanning dependencies for /lustre/pd01/hpc-kuchta-1716987452/software/RASPA3/src/raspakit/breakthrough.cpp:
/lustre/pd01/hpc-kuchta-1716987452/software/RASPA3/src/raspakit/breakthrough.cpp:11:10: fatal error: 'mdspan' file not found
[41/1038] Scanning /lustre/pd01/hpc-kuchta-1716987452/software/RASPA3/src/raspakit/cbmc/flexible_insertion.cpp for CXX dependencies
ninja: build stopped: subcommand failed.

If I understand correctly mdspan is by default in C++23. I'm using clang 19.1.0, cmake 3.28.4, ninja 1.12.1, llvm 19.1.0, all installed with micromamba from conda-forge channel. Operating system is AlmaLinux 8.10 with x86_64 architecture.

I would be incredibly grateful for any help in solving this problem!

dubbelda commented 1 month ago

Using the docker file for almalinux, I had no problem with compilation. There is also a binary package for it available.