CODARcode / MGARD

MGARD: MultiGrid Adaptive Reduction of Data
Apache License 2.0
37 stars 25 forks source link

GPU build on Summit #165

Closed suchyta1 closed 3 years ago

suchyta1 commented 3 years ago

Building with CUDA support on Summit is no longer working for me. I get the following error:

[ 5%] Building CUDA object CMakeFiles/mgard-library.dir/src/cuda/API.cu.o /sw/summit/cuda/11.3.1/bin/nvcc -forward-unknown-to-host-compiler -ccbin=/sw/summit/gcc/10.2.0-2/bin/g++ -DMGARD_ZSTD -Dmgard_library_EXPORTS -I/tmp/esuchyta/spack-stage/spack-stage-mgard-develop-gos6qwjwfuh7uug6tgwo2qztovo5oi2p/spack-src/include -I/tmp/esuchyta/spack-stage/spack-stage-mgard-develop-gos6qwjwfuh7uug6tgwo2qztovo5oi2p/spack-build-gos6qwj/include -isystem=/autofs/nccs-svm1_home1/esuchyta/spack/wdmapp/summit/spack/opt/spack/linux-rhel8-power9le/gcc-10.2.0/zlib-1.2.11-zkagthm7bqmy3eeeakauipekotv2op2i/include -isystem=/autofs/nccs-svm1_home1/esuchyta/spack/wdmapp/summit/spack/opt/spack/linux-rhel8-power9le/gcc-10.2.0/zstd-1.4.5-anr4xqdhghw6a27k7t2j2336eydp7c4r/include -isystem=/sw/summit/cuda/11.3.1/include -DMGARD_CUDA --expt-relaxed-constexpr -w -DMGARD_CUDA_FMA -DMGARD_CUDA_OPTIMIZE_VOLTA -O2 -g -DNDEBUG --generate-code=arch=compute_70,code=[compute_70,sm_70] --generate-code=arch=compute_72,code=[compute_72,sm_72] -Xcompiler=-fPIC -std=c++17 -MD -MT CMakeFiles/mgard-library.dir/src/cuda/API.cu.o -MF CMakeFiles/mgard-library.dir/src/cuda/API.cu.o.d -x cu -dc /tmp/esuchyta/spack-stage/spack-stage-mgard-develop-gos6qwjwfuh7uug6tgwo2qztovo5oi2p/spack-src/src/cuda/API.cu -o CMakeFiles/mgard-library.dir/src/cuda/API.cu.o In file included from /tmp/esuchyta/spack-stage/spack-stage-mgard-develop-gos6qwjwfuh7uug6tgwo2qztovo5oi2p/spack-src/src/cuda/API.cu:27: /tmp/esuchyta/spack-stage/spack-stage-mgard-develop-gos6qwjwfuh7uug6tgwo2qztovo5oi2p/spack-src/include/cuda/LosslessCompression.h:12:10: fatal error: nvcomp.hpp: No such file or directory 12 | #include "nvcomp.hpp" | ^~~~ compilation terminated. make[2]: [CMakeFiles/mgard-library.dir/build.make:107: CMakeFiles/mgard-library.dir/src/cuda/API.cu.o] Error 1 make[2]: Leaving directory '/tmp/esuchyta/spack-stage/spack-stage-mgard-develop-gos6qwjwfuh7uug6tgwo2qztovo5oi2p/spack-build-gos6qwj' make[1]: [CMakeFiles/Makefile2:905: CMakeFiles/mgard-library.dir/all] Error 2 make[1]: Leaving directory '/tmp/esuchyta/spack-stage/spack-stage-mgard-develop-gos6qwjwfuh7uug6tgwo2qztovo5oi2p/spack-build-gos6qwj' make: *** [Makefile:149: all] Error 2

CMake has passed the test for finding the NVCOMP package, but it seems to me like the target_link_libraries(mgard-library PUBLIC nvcomp CUDA::cudart ${CUDAToolkit_LIBRARY_DIR}/libcudadevrt.a) in #150 isn't automatically including the .hpp header. Looking at the .cmake that installs with NVCOMP, I don't think it's adding any headers to the interface with the library, but I might be mistaken. Also, I think the library is nvcomp::nvcomp, but doing it like that yields the same error.

JieyangChen7 commented 3 years ago

@suchyta1 The compilation issue should be fixed with #166