-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Description
Hm, the following c++ code files compile, link and work as they should with gcc 15.2 without any warnings. They are just completely following openmp and c++ and openmpi standards.
However,
clang version 20.1.8
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/20/bin
Configuration file: /etc/clang/20/x86_64-pc-linux-gnu-clang.cfg
yields (which is a bit sad. I would like to see the code compile with clang. It uses openmp on gpu. earlier versions of the library worked with gcc 15.2 flawlessly on the nvidia gpu device, wheras clang failed to execute any cuda code there.
But now these more recent ones do not even link with clang, despite gcc compiling this without warning :-( (sad)
[ 25%] Building CXX object CMakeFiles/arraytest_mpi.dir/main_mpi.cpp.o
clang++ -DUnified_Shared_Memory=False -I/home/benni/projects/arraylibrary/openmp/arraytest -I/home/benni/projects/arraylibrary/openmp -I/home/benni/projects/arraylibrary/openmp/arraytest_mpi -std=c++23 -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda -Wall -std=gnu++23 -MD -MT CMakeFiles/arraytest_mpi.dir/main_mpi.cpp.o -MF CMakeFiles/arraytest_mpi.dir/main_mpi.cpp.o.d -o CMakeFiles/arraytest_mpi.dir/main_mpi.cpp.o -c /home/benni/projects/arraylibrary/openmp/main_mpi.cpp
[ 50%] Linking CXX executable arraytest
/usr/bin/cmake -E cmake_link_script CMakeFiles/arraytest.dir/link.txt --verbose=1
nvlink error : Undefined reference to 'ZSt21__glibcxx_assert_failPKciS0_S0' in '/tmp/main_omp.cpp-nvptx64-nvidia-cuda-sm_120-3c9aad-8d6c42.cubin'
/usr/lib/llvm/20/bin/clang-nvlink-wrapper: error: 'nvlink' failed
clang: error: nvlink command failed with exit code 1 (use -v to see invocation)
/usr/lib/llvm/20/bin/clang-linker-wrapper: error: 'clang' failed
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
mdspan_omp.h.txt
main_mpi.cpp.txt
main_omp.cpp.txt
CMakeLists.txt