Closed pxlxingliang closed 2 months ago
I try to compile DCU abacus on sugon platform, and have the error"
clang-15: warning: argument unused during compilation: '-amdgpu-function-calls=false' [-Wunused-command-line-argument] [ 90%] Linking CXX executable abacus_pw /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../bin/ld: Dwarf Error: found dwarf version '5', this reader only handles version 2, 3 and 4 information. source/module_hamilt_pw/hamilt_pwdft/CMakeFiles/hamilt_pwdft.dir/forces_cc.cpp.o: In function `Forces<double, base_device::DEVICE_GPU>::deriv_drhoc(bool const&, int, double const*, double const*, double const*, double*, ModulePW::PW_Basis*, int)': forces_cc.cpp:(.text._ZN6ForcesIdN11base_device10DEVICE_GPUEE11deriv_drhocERKbiPKdS6_S6_PdPN8ModulePW8PW_BasisEi[_ZN6ForcesIdN11base_device10DEVICE_GPUEE11deriv_drhocERKbiPKdS6_S6_PdPN8ModulePW8PW_BasisEi]+0x48c): undefined reference to `hamilt::cal_stress_drhoc_aux_op<double, base_device::DEVICE_GPU>::operator()(double const*, double const*, double const*, double const*, double*, int, int, int, double, int)' forces_cc.cpp:(.text._ZN6ForcesIdN11base_device10DEVICE_GPUEE11deriv_drhocERKbiPKdS6_S6_PdPN8ModulePW8PW_BasisEi[_ZN6ForcesIdN11base_device10DEVICE_GPUEE11deriv_drhocERKbiPKdS6_S6_PdPN8ModulePW8PW_BasisEi]+0x52d): undefined reference to `hamilt::cal_stress_drhoc_aux_op<double, base_device::DEVICE_GPU>::operator()(double const*, double const*, double const*, double const*, double*, int, int, int, double, int)' /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../bin/ld: Dwarf Error: found dwarf version '5', this reader only handles version 2, 3 and 4 information. source/module_hamilt_pw/hamilt_pwdft/CMakeFiles/hamilt_pwdft.dir/stress_func_cc.cpp.o: In function `Stress_Func<double, base_device::DEVICE_GPU>::deriv_drhoc(bool const&, int, double const*, double const*, double const*, double*, ModulePW::PW_Basis*, int)': stress_func_cc.cpp:(.text._ZN11Stress_FuncIdN11base_device10DEVICE_GPUEE11deriv_drhocERKbiPKdS6_S6_PdPN8ModulePW8PW_BasisEi[_ZN11Stress_FuncIdN11base_device10DEVICE_GPUEE11deriv_drhocERKbiPKdS6_S6_PdPN8ModulePW8PW_BasisEi]+0x48c): undefined reference to `hamilt::cal_stress_drhoc_aux_op<double, base_device::DEVICE_GPU>::operator()(double const*, double const*, double const*, double const*, double*, int, int, int, double, int)' stress_func_cc.cpp:(.text._ZN11Stress_FuncIdN11base_device10DEVICE_GPUEE11deriv_drhocERKbiPKdS6_S6_PdPN8ModulePW8PW_BasisEi[_ZN11Stress_FuncIdN11base_device10DEVICE_GPUEE11deriv_drhocERKbiPKdS6_S6_PdPN8ModulePW8PW_BasisEi]+0x52d): undefined reference to `hamilt::cal_stress_drhoc_aux_op<double, base_device::DEVICE_GPU>::operator()(double const*, double const*, double const*, double const*, double*, int, int, int, double, int)' clang-15: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [CMakeFiles/abacus_pw.dir/build.make:747: abacus_pw] Error 1 make[1]: *** [CMakeFiles/Makefile2:829: CMakeFiles/abacus_pw.dir/all] Error 2
The compiler command is:
module purge module load compiler/rocm/dtk-23.10 module load compiler/devtoolset/7.3.1 module load compiler/cmake/3.23.3 module load mpi/hpcx/2.6.0/gcc-7.3.1 libs_path=/public/home/abacus/libs test -d build-dcu || mkdir build-dcu CC=clang CXX=clang++ cmake -B build-dcu -DUSE_OPENMP=ON -DENABLE_LCAO=OFF -DFFTW3_DIR=${libs_path}/fftw-3.3.10-1/build -DLAPACK_DIR=${libs_path}/OpenBLAS_install/lib -DSCALAPACK_DIR=${libs_path}/scalapack-2.2.0 -DUSE_ROCM=ON -DCOMMIT_INFO=ON > dcu.log 2>&1 cd ./build-dcu make >> ../dcu.log 2>&1 cd ..
No response
@pxlxingliang Maybe you should load devtoolset first, then rocm. https://mcresearch.github.io/abacus-user-guide/abacus-dcu.html
devtoolset
rocm
Describe the bug
I try to compile DCU abacus on sugon platform, and have the error"
The compiler command is:
Expected behavior
No response
To Reproduce
No response
Environment
No response
Additional Context
No response
Task list for Issue attackers (only for developers)