Bladesy Tux's lil' helper
Joined: 04 Apr 2015 Posts: 113
|
Posted: Thu Dec 01, 2016 7:29 pm Post subject: OpenCV seems to disable CUDA |
|
|
Hello all, I've ran into a problem trying to use CUDA for rendering in blender - however, I don't think my problem actually lies with blender.
I've ensured that the support in blender is definitely there, as I'm able to select my GTX 660 in the user preferences, and switch the render device to GPU compute.
However, when I actually attempt rendering, I get a black screen along with the error message "CUDA error at cuCtxCreate: Invalid device".
Using the gentoo wiki's blender page, I was able to find that my version of gcc (4.9.3) could be causing problems with CUDA, and the fix was to edit the file "/opt/cuda/include/host_config.h", which supposedly contains lines referring to gcc 4.9, preventing the use of CUDA. Finding references to gcc 5 and above instead of references to gcc 4.9, made me think that perhaps the incompatibility fix made its way into a new version of nvidia-cuda-toolkit.
Thinking that my problem was the lack of use flags near the start of the page, I then added a file containing the following to /etc/portage/package.use:
Code: | # Enable cuda or opencl if possible
media-libs/opencv cuda opencl
media-libs/openimageio opencv
media-libs/opensubdiv cuda opencl ptex tbb |
After the system update, I noticed a message:
Code: | * Messages for package media-libs/opencv-2.4.12-r1:
* CUDA and >=sys-devel/gcc-4.9 do not play well together. Disabling CUDA support. |
Does this mean that despite gcc 4.9 seeming to work with CUDA, opencv is preventing it from working?
If so, how would I go about fixing this?
Thanks for reading. |
|