Error OpenCV with CUDA using TBB for multiple GPUs
Asked Answered
G

1

1

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!

Gastropod answered 15/2, 2012 at 14:39 Comment(6)
Are you running Windows or Linux? If Linux, do you have libtbb and libtbb-dev installed?Masera
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 -lopencvGastropod
TBB is unaware of OpenCV, no special flags are necessary.Haggadah
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: NOGastropod
Can you make sure your other cuda programs work ? do you have read / write permissions to /dev/nvidia* (do they even exist ?)Valentin
none of my cuda programs work when i have two graphics cards installed. when i have one it works fine. i need to use tbb to specify which gpu to run it on i think, but tbb doesn't want to pick up the second card (maybe). so far it is just speculation so tomorrow i am going to install a other opencv version. perhaps its a bug in build 7232 (i'm using development builds)Gastropod
G
1

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

Gastropod answered 20/2, 2012 at 13:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.