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

Unable to compile #118

Open
BukuBukuChagma opened this issue Jan 1, 2024 · 1 comment
Open

Unable to compile #118

BukuBukuChagma opened this issue Jan 1, 2024 · 1 comment

Comments

@BukuBukuChagma
Copy link

When I run cmake ../crsc

Heres the output ;

CMake Error at /home/zen/anaconda3/envs/tf/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:751 (message):
  Compiling the CUDA compiler identification source file
  "CMakeCUDACompilerId.cu" failed.

  Compiler: /home/zen/anaconda3/envs/tf/bin/nvcc

  Build flags:

  Id flags: --keep;--keep-dir;tmp -v



  The output was:

  1

  #$ _NVVM_BRANCH_=nvvm

  #$ _SPACE_=

  #$ _CUDART_=cudart

  #$ _HERE_=/home/zen/anaconda3/envs/tf/bin

  #$ _THERE_=/home/zen/anaconda3/envs/tf/bin

  #$ _TARGET_SIZE_=

  #$ _TARGET_DIR_=

  #$ _TARGET_SIZE_=64

  #$ TOP=/home/zen/anaconda3/envs/tf/bin/..

  #$ NVVMIR_LIBRARY_DIR=/home/zen/anaconda3/envs/tf/bin/../nvvm/libdevice

  #$
  LD_LIBRARY_PATH=/home/zen/anaconda3/envs/tf/bin/../lib::/home/zen/anaconda3/envs/tf/lib/


  #$
  PATH=/home/zen/anaconda3/envs/tf/bin/../nvvm/bin:/home/zen/anaconda3/envs/tf/bin:/home/zen/anaconda3/envs/tf/bin:/home/zen/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin


  #$ INCLUDES="-I/home/zen/anaconda3/envs/tf/bin/../include"

  #$ LIBRARIES= "-L/home/zen/anaconda3/envs/tf/bin/../lib/stubs"
  "-L/home/zen/anaconda3/envs/tf/bin/../lib"

  #$ CUDAFE_FLAGS=

  #$ PTXAS_FLAGS=

  #$ rm tmp/a_dlink.reg.c

  #$ gcc -D__CUDA_ARCH__=520 -E -x c++ -DCUDA_DOUBLE_MATH_FUNCTIONS
  -D__CUDACC__ -D__NVCC__ "-I/home/zen/anaconda3/envs/tf/bin/../include"
  -D__CUDACC_VER_MAJOR__=11 -D__CUDACC_VER_MINOR__=3
  -D__CUDACC_VER_BUILD__=58 -D__CUDA_API_VER_MAJOR__=11
  -D__CUDA_API_VER_MINOR__=3 -include "cuda_runtime.h" -m64
  "CMakeCUDACompilerId.cu" -o "tmp/CMakeCUDACompilerId.cpp1.ii"

  <command-line>: fatal error: cuda_runtime.h: No such file or directory

  compilation terminated.

  # --error 0x1 --





Call Stack (most recent call first):
  /home/zen/anaconda3/envs/tf/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:8 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /home/zen/anaconda3/envs/tf/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:53 (__determine_compiler_id_test)
  /home/zen/anaconda3/envs/tf/share/cmake-3.26/Modules/CMakeDetermineCUDACompiler.cmake:307 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:3 (project)


-- Configuring incomplete, errors occurred!

I don't know what I'm doing wrong. Any help would be appreciated.

@manuelbirlo
Copy link

manuelbirlo commented Mar 27, 2024

It seems that the cuda_runtime.h file is not being found, which is a part of the CUDA Toolkit and required for compiling CUDA applications. I assume that either the CUDA Toolkit is not installed correctly, or CMake cannot find cuda_runtime.h.
You can check with 'nvcc --version' whether your CUDA Toolkit is correctly installed. Also make sure that your LD_LIBRARY_PATH environment variable includes the path to the CUDA Toolkit libraries:
export PATH=/usr/local/cuda/bin:${PATH}
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:${LD_LIBRARY_PATH}

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