1
votes

My OpenCV CUDA program runs fine using a single NVidia 580GTX, but when using another, it gives the following error:

OpenCV Error: Gpu API call (invalid device ordinal) in mallocPitch

I know I need TBB to assign a GPU its job, but even though I installed OpenCV with TBB support (followed the willowgarage website), it says TBB support is required (CMake key 'WITH_TBB' must be true). Any help would really be appreciated since I need this to complete my computer science Master's project.

Thanks!

1
Are you running Windows or Linux? If Linux, do you have libtbb and libtbb-dev installed? - mevatron
its linux and yes its installed. cmake wouldn't compile if TBB wasn't installed. is there perhaps a flag that i need to compile it with? eg. for cuda in opencv its -lopencv - user779328
TBB is unaware of OpenCV, no special flags are necessary. - Alexey Kukanov
oh i see. i just find it weird that it says: TBB support is required (CMake key 'WITH_TBB' must be true). But when i build opencv you can clearly see its on: cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON -D CUDA_NPP_LIBRARY_ROOT_DIR:STRING=/home/ddduke/SDK/ -D WITH_CUDA:BOOL=ON -D WITH_TBB=YES -D TBB_INCLUDE_DIRS=/usr/include/tbb .. Other third-party libraries: -- Use IPP: NO -- Use TBB: YES -- Use Cuda: YES -- Use Eigen: NO - user779328
Can you make sure your other cuda programs work ? do you have read / write permissions to /dev/nvidia* (do they even exist ?) - Pavan Yalamanchili

1 Answers

1
votes

Ok its solved. turns out it was build 7232 that was the problem, since it works with the latest opencv build(7292) with no problems. Thanks all for the support