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

FATAL_ERROR "CMake did not find CUDA, which is required to build this program." #43

Closed
jsYangCode opened this issue Feb 21, 2020 · 5 comments

Comments

@jsYangCode
Copy link

hi, friends. Today, i build it on a server, named aaaa, my personal account name is yjs. As is shown below. The aaaa is already installed CUDA. in aaaa run "env | grep "cuda" " has shown. But the CMakeLists.txt indicate FATAL_ERROR "CMake did not find CUDA, which is required to build this program.". As is shown below. can you give me some help? thanks!!!
Screenshot from 2020-02-21 18-02-05

@puzzlepaint
Copy link
Collaborator

Would it work to run the following?

cmake \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
    -DCMAKE_CUDA_FLAGS="-arch=(the_appropriate_architecture(s))" \
    -DCMAKE_CUDA_COMPILER=/usr/local/cuda-10.0/bin/nvcc \
    ..

Or alternatively to -DCMAKE_CUDA_COMPILER, try to set CUDA_TOOLKIT_ROOT_DIR to /usr/local/cuda-10.0. Or put nvcc into the PATH environment variable.

@jsYangCode
Copy link
Author

@puzzlepaint hello,friend. i have successfully compiled "badslam&&badslam_test". But when i run "./applications/badslam/badslam_test". some error occurs,as shown below. can you give me some advice? thank you!! it is tested on CUDA10.0 &&&& GTX 1070 !!
Screenshot from 2020-02-24 13-46-14

@jsYangCode
Copy link
Author

@puzzlepaint
Screenshot from 2020-02-24 17-28-35

@puzzlepaint
Copy link
Collaborator

See #44.

@PyojinKim
Copy link

@puzzlepaint hello,friend. i have successfully compiled "badslam&&badslam_test". But when i run "./applications/badslam/badslam_test". some error occurs,as shown below. can you give me some advice? thank you!! it is tested on CUDA10.0 &&&& GTX 1070 !!
Screenshot from 2020-02-24 13-46-14

@puzzlepaint hello,friend. i have successfully compiled "badslam&&badslam_test". But when i run "./applications/badslam/badslam_test". some error occurs,as shown below. can you give me some advice? thank you!! it is tested on CUDA10.0 &&&& GTX 1070 !!
Screenshot from 2020-02-24 13-46-14

Hi @jsYangCode , Could I ask how to solve "CMake did not find CUDA, which is required to build this program." this error? I also installed CUDA, but see the same error message when I did CMake.

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

3 participants