Open mohsensadr opened 5 months ago
What is the purpose of adding -G when compiling for CUDA? CMAKE_CXX_FLAGS_DEBUG seems to include -g flag.
-G
CMAKE_CXX_FLAGS_DEBUG
-g
Trying to include -G, I get errors like
[ 5%] Building CXX object _deps/heffte-build/CMakeFiles/Heffte.dir/src/heffte_c.cpp.o cd /data/user/sadr_m/ippl/build_cuda/_deps/heffte-build && /data/user/sadr_m/ippl/build_cuda/_deps/kokkos-src/bin/kokkos_launch_compiler /data/user/sadr_m/ippl/build_cuda/_deps/kokkos-src/bin/nvcc_wrapper /opt/psi/Programming/gcc/12.3.0/bin/g++ /opt/psi/Programming/gcc/12.3.0/bin/g++ -DENABLE_FFT -DUSE_ALTERNATIVE_VARIANT -I/data/user/sadr_m/ippl/build_cuda/_deps/heffte-build/include -isystem /data/user/sadr_m/ippl/build_cuda/_deps/heffte-src/include -g -fsanitize=address,undefined -G -Wunused -Wno-deprecated-declarations -Wno-stringop-overflow -Wno-array-bounds -Wno-restrict -pthread -std=c++20 -MD -MT _deps/heffte-build/CMakeFiles/Heffte.dir/src/heffte_c.cpp.o -MF CMakeFiles/Heffte.dir/src/heffte_c.cpp.o.d -o CMakeFiles/Heffte.dir/src/heffte_c.cpp.o -c /data/user/sadr_m/ippl/build_cuda/_deps/heffte-src/src/heffte_c.cpp g++: error: unrecognized command-line option ‘-G’
Also, Kokkos_DEVICES is empty in the current approach of compiling IPPL with cmake.
Kokkos_DEVICES
https://github.com/IPPL-framework/ippl/blob/db2ea88807363cbd9aaf083b872aaf78abe99132/CMakeLists.txt#L130C1-L132C8
-G is for generating shared objects. I would just remove this, we do not want to have shared object .
What is the purpose of adding
-G
when compiling for CUDA?CMAKE_CXX_FLAGS_DEBUG
seems to include-g
flag.Trying to include
-G
, I get errors likeAlso,
Kokkos_DEVICES
is empty in the current approach of compiling IPPL with cmake.https://github.com/IPPL-framework/ippl/blob/db2ea88807363cbd9aaf083b872aaf78abe99132/CMakeLists.txt#L130C1-L132C8