NVIDIA / nvbandwidth

A tool for bandwidth measurements on NVIDIA GPUs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

jzhang82119 opened this issue · comments

I am running into the following error when try to run "cmake ." I have cmake 3.26. NVIDIA-SMI 525.89.02 Driver Version: 525.89.02 CUDA Version: 12.0

-- The CUDA compiler identification is unknown
CMake Error at /usr/share/cmake-3.26/Modules/CMakeDetermineCUDACompiler.cmake:603 (message):
Failed to detect a default CUDA architecture.

Compiler output:

Call Stack (most recent call first):
CMakeLists.txt:3 (project)

CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

Do you have CUDA toolkit installed on this system?
Are the CUDA binaries/libraries available in your PATH and LD_LIBRARY_PATH?
For example,

export PATH=<path to cuda toolkit install>/bin:$PATH
export LD_LIBRARY_PATH=<path to cuda toolkit install>/lib64:$LD_LIBRARY_PATH

Yes.

I have the PATH and LD_LIBRARY_PATH defined in .bashrc.
export PATH=/usr/local/cuda-12.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-12.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

cuda_12.0.0_525.60.13_linux.run was used to installed cuda toolkit.
There was no error.
sudo bash cuda_12.0.0_525.60.13_linux.run

= Summary =

Driver: Not Selected
Toolkit: Installed in /usr/local/cuda-12.0/

Please make sure that

  • PATH includes /usr/local/cuda-12.0/bin
  • LD_LIBRARY_PATH includes /usr/local/cuda-12.0/lib64, or, add /usr/local/cuda-12.0/lib64 to /etc/ld.so.conf and run ldconfig as root

To uninstall the CUDA Toolkit, run cuda-uninstaller in /usr/local/cuda-12.0/bin
***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 525.00 is required for CUDA 12.0 functionality to work.
To install the driver using this installer, run the following command, replacing with the name of this run file:
sudo .run --silent --driver

Logfile is /var/log/cuda-installer.log

Hi, Can you make sure that only one instance of the CUDA toolkit installation exists on the system. This is to make sure that we don't have conflicting compiler paths for cmake to pick up.
Also, add the /usr/local/cuda-12.0/bin path to your path variable and make sure that is the only path that cmake sees.
In your previous message we saw the following issue:

-- The CUDA compiler identification is unknown

This will be resolved if the PATH variable is correct.
If this fails, then please try the following:
$> export CUDAARCHS=52
Then run cmake regularly.