carlren / gSLICr

gSLICr: Real-time super-pixel segmentation
Other
336 stars 126 forks source link

cudaSafeCall() Runtime API error : no CUDA-capable device is detected. #20

Open yuchen-xue opened 6 years ago

yuchen-xue commented 6 years ago

I'm using Ubuntu 16.04 machine and I've successfully build the code here, but I failed to run command ./demo, where I got the error:

/home/ee303/WORKSPACE/Super-pixels/gSLICr/gSLICr_Lib/engines/../../ORUtils/MemoryBlock.h(196) : cudaSafeCall() Runtime API error : no CUDA-capable device is detected.

My dependencies:

Additionally, here's the output of cmake command:

ee303@ee303-All-Series:~/WORKSPACE/Super-pixels/gSLICr/build$ cmake ..
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- 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-9.1 (found version "9.1") 
-- Found OpenCV: /usr/local (found version "3.4.0") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ee303/WORKSPACE/Super-pixels/gSLICr/build

And here is the output of make command:

ee303@ee303-All-Series:~/WORKSPACE/Super-pixels/gSLICr/build$ make -j8
[ 12%] Building NVCC (Device) object CMakeFiles/gSLICr_lib.dir/gSLICr_Lib/engines/gSLICr_lib_generated_gSLICr_seg_engine_GPU.cu.o
Scanning dependencies of target ORUtils
[ 25%] Building CXX object ORUtils/CMakeFiles/ORUtils.dir/Dummy.cpp.o
[ 37%] Linking CXX static library libORUtils.a
[ 37%] Built target ORUtils
/home/ee303/WORKSPACE/Super-pixels/gSLICr/gSLICr_Lib/engines/gSLICr_seg_engine_GPU.cu(228): warning: __shared__ memory variable with non-empty constructor or destructor (potential race between threads)

/home/ee303/WORKSPACE/Super-pixels/gSLICr/gSLICr_Lib/engines/gSLICr_seg_engine_GPU.cu(229): warning: __shared__ memory variable with non-empty constructor or destructor (potential race between threads)

Scanning dependencies of target gSLICr_lib
[ 62%] Building CXX object CMakeFiles/gSLICr_lib.dir/gSLICr_Lib/engines/gSLICr_core_engine.cpp.o
[ 62%] Building CXX object CMakeFiles/gSLICr_lib.dir/gSLICr_Lib/engines/gSLICr_seg_engine.cpp.o
/home/ee303/WORKSPACE/Super-pixels/gSLICr/gSLICr_Lib/engines/gSLICr_seg_engine.cpp:3:9: warning: #pragma once in main file
 #pragma once
         ^
/home/ee303/WORKSPACE/Super-pixels/gSLICr/gSLICr_Lib/engines/gSLICr_core_engine.cpp:3:9: warning: #pragma once in main file
 #pragma once
         ^
[ 75%] Linking CXX static library libgSLICr_lib.a
[ 75%] Built target gSLICr_lib
Scanning dependencies of target demo
[ 87%] Building CXX object CMakeFiles/demo.dir/demo.cpp.o
[100%] Linking CXX executable demo
[100%] Built target demo

So what have been wrong?

JordanMakesMaps commented 5 years ago

Required CUDA versions are 6 or 7 and you have 9.x