Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to compile heavyDB; CUDA architecture not detected #822

Open
shwetaiisc opened this issue Dec 17, 2023 · 3 comments
Open

Failed to compile heavyDB; CUDA architecture not detected #822

shwetaiisc opened this issue Dec 17, 2023 · 3 comments

Comments

@shwetaiisc
Copy link

Hi,

I am unable to complie heavyDB. I have both the nvidia compiler and nvidia drivers setup in the system.

I have followed the steps below --

./scripts/mapd-deps-prebuilt.sh && mkdir build && cd build && cmake ..

The scripts/mapd-deps-prebuild.sh executes successfully.

The error code received is --

CMake Error at /usr/local/share/cmake-3.25/Modules/CMakeDetermineCUDACompiler.cmake:603 (message):
  Failed to detect a default CUDA architecture.

  Compiler output:

Call Stack (most recent call first):
  CMakeLists.txt:194 (enable_language) 

My system environment is as follows:

  1. OS and kernel version: Ubuntu 20.04.6; 5.4.0-120-generic
  2. GCC version: 9.4.0
  3. CUDA version: 11.4
  4. Nvidia driver version: 470.57.02
  5. Boost version: 1.71.0
  6. LLVM version: 12.0
  7. CMake version: 3.25.1
  8. OpenJDK version: 13.0.1

Let me know if I need to downgrade/upgrade any software to allow the build to happen as well.

Alternatively, when I try to compile by disabling CUDA like --
cmake -DENABLE_CUDA=off ..

I get the following error:

CMake Error at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Thrift (missing: Thrift_VERSION)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  cmake/Modules/FindThrift.cmake:96 (find_package_handle_standard_args)
  CMakeLists.txt:373 (find_package)
@cdessanti
Copy link
Contributor

To compile the GPU version, you need CUDA 11.8; version 11.4 is outdated. Additionally, ensure your GPU driver is at least version 520.x (though it's not required at compile time).

If you encounter issues with CMake, make sure to run mapd-deps.sh found in /usr/local/mapd-deps. This directory includes the Thrift library and other dependencies not present in the standard Ubuntu repositories.

@shwetaiisc
Copy link
Author

Hi,

I upgraded the CUDA version to 12.1 and GPU driver to 530.x. However the cmake is still failing. Do I need to make any changes in the CMakeLists.txt file?

Thanks for the suggestion though!

@cdessanti
Copy link
Contributor

cdessanti commented Dec 25, 2023

Hello,

Just wanted to let you know that you don't need to make any modifications to the CMakeLists.txt file. Instead, you can try adding "-DCMAKE_CUDA_ARCHITECTURES=75" (replace 75 with the appropriate version for your setup) to your command.

However, please note that you may encounter an error if you run this command with an unsupported CUDA version or if you have already run the config script. To avoid this, run the command "source /usr/local/mapd-deps/mapd-deps.sh" before running the cmake command.
With the release of 8.0, we will probably move to cuda 12.1. However, for now, we are using 11.8. I'm installing cuda 12.1 to try and reproduce your error.

I haven't any issue using cuda 12.1 on my system. could you share the entire output of your cmake command?

mine is:

mapd@zion-tr:/opt/mapd_storage/github/test_os/heavydb/build$ cmake ..
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The CUDA compiler identification is NVIDIA 12.1.105
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- 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  
-- Found CUDA: /usr/local/cuda (found version "12.1") 
-- CMake 3.18+, Setting CUDA_ARCHITECTURES.
-- CUDA_ARCHITECTURES: 50-virtual;60-virtual;70-virtual;75-virtual;80-virtual
-- Enabling NVCC multi-threaded compilation with 24 threads.
-- Found GEOS: /usr/local/mapd-deps/lib/libgeos_c.so  
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1f")  
-- Found Thrift: /usr/local/mapd-deps/lib/libthrift.so  
-- Found Git: /usr/bin/git (found version "2.25.1") 
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
-- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version "1.6.37") 
-- Found GDAL: /usr/local/mapd-deps/lib/libgdal.so  
-- Found BLOSC: /usr/local/mapd-deps/lib/../include  
-- Found Folly: /usr/local/mapd-deps/lib/libfolly.so  
-- ONEDAL_LINK:      static
-- ONEDAL_USE_DPCPP:        no
-- ONEDAL_INTERFACE:   yes
-- ONEDAL_SET_TBB_MANUALLY: no
-- oneDAL_ROOT_DIR:         /usr/local/mapd-deps
-- oneDAL_INCLUDE_DIRS:     /usr/local/mapd-deps/include
-- oneDAL_IMPORTED_TARGETS: -lstdc++;-lm;-lpthread;-ldl;oneDAL::onedal;oneDAL::onedal_core;oneDAL::onedal_thread
-- Found the following oneDAL libraries:
--   onedal
--   onedal_core
--   onedal_thread
-- Found Curses: /usr/lib/x86_64-linux-gnu/libcurses.so  
-- Performing Test Terminfo_LINKABLE
-- Performing Test Terminfo_LINKABLE - Success
-- Found Terminfo: /usr/lib/x86_64-linux-gnu/libtinfo.so  
-- Found LLVM 14.0.6
-- Using LLVMConfig.cmake in: /usr/local/mapd-deps/lib/cmake/llvm
-- Using LLVM_LIB: /usr/local/mapd-deps/lib/libLLVM-14.so
-- Using CLANG_LIB: /usr/local/mapd-deps/lib/libclang-cpp.so.14
-- Found the following Boost libraries:
--   log
--   log_setup
--   filesystem
--   program_options
--   regex
--   system
--   thread
--   timer
--   locale
--   iostreams
--   serialization
-- Found Boost: (found version "1.71.0")
-- Performing Test HAVE_CXX_FLAG_STD_CXX11
-- Performing Test HAVE_CXX_FLAG_STD_CXX11 - Success
-- Performing Test HAVE_CXX_FLAG_WALL
-- Performing Test HAVE_CXX_FLAG_WALL - Success
-- Performing Test HAVE_CXX_FLAG_WEXTRA
-- Performing Test HAVE_CXX_FLAG_WEXTRA - Success
-- Performing Test HAVE_CXX_FLAG_WSHADOW
-- Performing Test HAVE_CXX_FLAG_WSHADOW - Success
-- Performing Test HAVE_CXX_FLAG_WERROR
-- Performing Test HAVE_CXX_FLAG_WERROR - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC
-- Performing Test HAVE_CXX_FLAG_PEDANTIC - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS - Success
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Failed
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS - Success
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED - Success
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WD654
-- Performing Test HAVE_CXX_FLAG_WD654 - Failed
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Failed
-- Performing Test HAVE_CXX_FLAG_COVERAGE
-- Performing Test HAVE_CXX_FLAG_COVERAGE - Success
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- AWSSDK version 1.7.301
-- Found LibAwsS3: /usr/local/mapd-deps/include  
-- Found Arrow: /usr/local/mapd-deps/lib/libarrow.so  
-- Found Parquet: /usr/local/mapd-deps/lib/libparquet.so  
-- Found Snappy: /usr/lib/x86_64-linux-gnu/libsnappy.so  
-- Build mode: Release
-- Compiler type GNU: /usr/bin/c++
-- Found RdKafka: /usr/local/mapd-deps/lib/librdkafka.so  
-- Found LibArchive: /usr/lib/x86_64-linux-gnu/libarchive.so  
-- TBB library is found with 
-- Found XercesC: /usr/lib/x86_64-linux-gnu/libxerces-c.so (found version "3.2.2") 
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/mapd_storage/github/test_os/heavydb/build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants