OpenDTAM
OpenDTAM copied to clipboard
ubuntu 14.04 + cuda 7.5 +opencv 2.4.9
...
Reading: scene_044.png text_file_name = /home/anson/Downloads/OpenDTAM-2.4.9_experimental/Trajectory_30_seconds/scene_045.txt Reading: scene_045.png text_file_name = /home/anson/Downloads/OpenDTAM-2.4.9_experimental/Trajectory_30_seconds/scene_046.txt Reading: scene_046.png text_file_name = /home/anson/Downloads/OpenDTAM-2.4.9_experimental/Trajectory_30_seconds/scene_047.txt Reading: scene_047.png text_file_name = /home/anson/Downloads/OpenDTAM-2.4.9_experimental/Trajectory_30_seconds/scene_048.txt Reading: scene_048.png text_file_name = /home/anson/Downloads/OpenDTAM-2.4.9_experimental/Trajectory_30_seconds/scene_049.txt Reading: scene_049.png OpenCV Error: Gpu API call (invalid device function) in call, file /home/anson/Downloads/opencv-2.4.10/modules/gpu/include/opencv2/gpu/device/detail/transform_detail.hpp, line 320 terminate called after throwing an instance of 'cv::Exception' what(): /home/anson/Downloads/opencv-2.4.10/modules/gpu/include/opencv2/gpu/device/detail/transform_detail.hpp:320: error: (-217) invalid device function in function call
Aborted (core dumped)
Hi, How to solve this problem? I use ldd a.out and the results like:
libopencv_imgproc.so.2.4 => /usr/local/lib/libopencv_imgproc.so.2.4 (0x00007f0b9c004000)
libopencv_highgui.so.2.4 => /usr/local/lib/libopencv_highgui.so.2.4 (0x00007f0b9bd6c000)
libopencv_gpu.so.2.4 => /usr/local/lib/libopencv_gpu.so.2.4 (0x00007f0b93c3d000)
libopencv_core.so.2.4 => /usr/local/lib/libopencv_core.so.2.4 (0x00007f0b936a1000)
libopencv_calib3d.so.2.4 => /usr/local/lib/libopencv_calib3d.so.2.4 (0x00007f0b93401000)
That usually means that your graphics card doesn't have a high enough compute capability. Please look at https://developer.nvidia.com/cuda-gpus and make sure that your compute capability is at least 3.5
@anuranbaka I check the GPU ( GeForce 840M ) as your reply, and find that its compute capability is 5.0.
Weird. I have never seen that on an 840. Can you find the source for the error? I'm surprised to see it looks like it's coming out of the opencv library. If you can find the kernel that is producing the error and point me to it, I might have better luck debugging it
It occurs to me you might be compiling the kernels for the wrong architechture, since cuda code is forward compatible, but the compiled kernels are not. Make sure you compiled for compute capability 5 in the opencv settings. I think that they might not include that by default.
@anuranbaka as your replay, I make the opencv 2.4.9 by: cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D ENABLE_FAST_MATH=1 -D CUDA_GENERATION=Kepler -D CUDA_FAST_MATH=1 -D CUDA_ARCH_BIN=3.0 -D CUDA_ARCH_PTX=3.0 -D WITH_CUBLAS=1 ..
you can find the installation link: http://blog.aicry.com/ubuntu-14-04-install-opencv-with-cuda/
@anuranbaka I solve the problem by using another computer that have the right gpu version. And then i found running error after ./a.out like:
OpenCV Error: Assertion failed (src1.type() == src2.type()) in scaleAdd, file /home/ubuntu/opencv-2.4.10/modules/core/src/matmul.cpp, line 2079 terminate called after throwing an instance of 'cv::Exception' what(): /home/ubuntu/opencv-2.4.10/modules/core/src/matmul.cpp:2079: error: (-215) src1.type() == src2.type() in function scaleAdd
when run to the command line optimizer.cvStream.waitForCompletion();
@anuranbaka I have the same error and using the GPU GFORCE TITAN X with compute capability 5.2. I use opencv 2.4.9 and compile it myself with cuda arch_bin 3.5.
Any suggestions ? I think this is majorly due to the opencv problem.