all CUDA-capable devices are busy or unavailable

asked 2013-01-24 09:17:01 -0600

andreas_ gravatar image

Hi all, I'm getting the error

init done 
opengl support available 
OpenCV Error: Gpu API call (all CUDA-capable devices are busy or unavailable) in mallocPitch, file /home/andreas/Downloads/OpenCV-2.4.3/modules/core/src/gpumat.cpp, line 1283
/home/andreas/Downloads/OpenCV-2.4.3/modules/core/src/gpumat.cpp:1283: error: (-217) all CUDA-capable devices are busy or unavailable in function mallocPitch

when I'm trying to run the highgui_gpu_gpu example (with all except the gpumat openGlGpuMatWnd window commented out). So it basically looks like:

 if (haveCuda)
   namedWindow(openGlGpuMatWnd, WINDOW_OPENGL | WINDOW_AUTOSIZE);

 Mat img = imread(argv[1]);

 if (haveCuda)
   setGlDevice(0);

 GpuMat d_img;
 if (haveCuda)
   d_img.upload(img);

 if (haveCuda)
        {
            Timer t("OpenGL GpuMat   ");
            imshow(openGlGpuMatWnd, d_img);
        }

I'm using CUDA 5.0, the cuda examples as well as the opencv+cuda examples work.

I built OpenCV with following CMake Flags:

 WITH_1394                        ON                                                                                                                                                                        
 WITH_CUBLAS                      ON                                                                                                                                                                        
 WITH_CUDA                        ON                                                                                                                                                                        
 WITH_CUFFT                       ON                                                                                                                                                                        
 WITH_EIGEN                       ON                                                                                                                                                                        
 WITH_FFMPEG                      ON                                                                                                                                                                        
 WITH_GIGEAPI                     ON                                                                                                                                                                        
 WITH_GSTREAMER                   ON                                                                                                                                                                        
 WITH_GTK                         ON                                                                                                                                                                        
 WITH_IPP                         ON                                                                                                                                                                        
 WITH_JASPER                      ON                                                                                                                                                                        
 WITH_JPEG                        ON                                                                                                                                                                        
 WITH_OPENCL                      OFF                                                                                                                                                                       
 WITH_OPENCLAMDBLAS               OFF                                                                                                                                                                       
 WITH_OPENCLAMDFFT                OFF                                                                                                                                                                       
 WITH_OPENEXR                     ON                                                                                                                                                                        
 WITH_OPENGL                      ON                                                                                                                                                                        
 WITH_OPENNI                      ON                                                                                                                                                                        
 WITH_PNG                         ON                                                                                                                                                                        
 WITH_PVAPI                       ON                                                                                                                                                                        
 WITH_QT                          ON                                                                                                                                                                        
 WITH_TBB                         ON                                                                                                                                                                        
 WITH_TIFF                        ON                                                                                                                                                                        
 WITH_UNICAP                      OFF                                                                                                                                                                       
 WITH_V4L                         ON                                                                                                                                                                        
 WITH_XIMEA                       OFF                                                                                                                                                                       
 WITH_XINE                        OFF
edit retag flag offensive close merge delete

Comments

Yes, I've already read that post, and any other I found on that topic, without any luck. Maybe it has something to do with Ubuntu running compiz. But that's just a guess.

andreas_ gravatar imageandreas_ ( 2013-01-24 10:59:30 -0600 )edit

btw, if I try to run the unmodified highgui_gpu_gpu example, I also get an error:

OpenCV Error: Assertion failed (buffer_ != 0) in Impl, file /home/andreas/Downloads/OpenCV-2.4.2/modules/core/src/opengl_interop.cpp, line 371 /home/andreas/Downloads/OpenCV-2.4.2/modules/core/src/opengl_interop.cpp:371: error: (-215) buffer_ != 0 in function Impl

andreas_ gravatar imageandreas_ ( 2013-01-25 05:22:52 -0600 )edit

Maybe it'a a driver problem. Try to install drivers from NVidia site.

Vladislav Vinogradov gravatar imageVladislav Vinogradov ( 2013-01-25 08:19:21 -0600 )edit