feichtenhofer / gpu_flow

GPU based optical flow extraction in OpenCV
427 stars 109 forks source link

OpenCV Error: No GPU support #11

Open duygusar opened 6 years ago

duygusar commented 6 years ago

I have OpenCV built with with_CUDA on so I don't know what the problem is, but I get the error below when I run the program:

start_vid:1gpuID:0flow method: 1 frameSkip: 1 OpenCV Error: No GPU support (The library is compiled without CUDA support) in setDevice, file /build/opencv-SviWsf/opencv-2.4.9.1+dfsg/modules/dynamicuda/include/opencv2/dynamicuda/dynamicuda.hpp, line 84 terminate called after throwing an instance of 'cv::Exception' what(): /build/opencv-SviWsf/opencv-2.4.9.1+dfsg/modules/dynamicuda/include/opencv2/dynamicuda/dynamicuda.hpp:84: error: (-216) The library is compiled without CUDA support in function setDevice

Aborted (core dumped)

duygusar commented 6 years ago

It seems I had installed 3.0.3 withGPU support and my cmake was referring to 2.4.9, now I have fixed it and my cmake is finding 3.0.3 but gives a ton of errors. I suppose the code supports only 2.4 so I would need to build it with cuda support. However opencv 2.4.9 comes along with Ubuntu distribution and possibly is not built with gpu support (as error suggests too). Since I have CUDA 9.0 (not supported by opencv 2.9 (nor 3.0.3 really but there is a work around for it) I wonder how I can make this work.

homxuwang commented 5 years ago

@duygusar I got the same problem.how did you fix it?

donghaiwang commented 5 years ago

I got the similary problem. I have OpenCV 2.4.9 built with CUDA 6.5, but occurs 'Segmentation fault' when the program run to line 162. how to fix it, thank you very much.

162 while ((entry = readdir(dirp)) != NULL) {

Program received signal SIGSEGV, Segmentation fault. 0x00007ffff5b6e452 in readdir64 () from /lib/x86_64-linux-gnu/libc.so.6