1
$\begingroup$

I have a MSI GTX 1060, running Fedora 25, Blender 2.78a, Nvidia drivers 375.26, and Cuda 8.0.44.

I got the Cuda toolkit from Nvidia's website, installed the repo, and installed the cuda packages but it insists that I need to install xorg-x11-drv-nvidia from RPMFusion*. Which I have done and it all seems to work fine. Once those drivers are installed, if I run glxspheres it indicates I'm using the nvidia kernel module.

When I first try to render something using Cycles Render, I get an error about an unsupported version of GCC. After looking up the fix, I edit the appropriate .h file to remove the offending line. After that, the next time I try to render, I get a long output starting with undefined "nullptr" then multiple lines about expecting semi-colons.

The full error can be found here: http://pastebin.com/zpw6xFYU

Any ideas on what I'm doing wrong? I've tried to search for an answer for nothing comes up.

*I recognize this is not the preferred method to install proprietary drivers, but I was unable to get around this dependency. If the solution involves removing these drivers and cuda, installing the binary manually from Nvidia (which I can do), then installing Cuda in another manner, I'm open to that.

$\endgroup$
1
$\begingroup$

I found the root problem, it was an incompatibility with C++ 11. So passing in a different standard along with compiling the CUDA kernel manually did the trick. Here is the command I ran (I got it from an output linked above):

/usr/local/cuda/bin/nvcc \
-arch=sm_61 -Xcompiler -std=c++98 --cubin \
"/usr/share/blender/2.78/scripts/addons/cycles/kernel/kernels/cuda/kernel.cu" \
-o "/home/user/.config/blender/2.78/cache/cycles_kernel_sm61_D8F831DA74C0363DC018432CF25F3AD8.cubin" \
-m64 --ptxas-options="-v" --use_fast_math -DNVCC -D__KERNEL_CUDA_VERSION__=80 \
-I"/usr/share/blender/2.78/scripts/addons/cycles/kernel"

Which did give me this warning:

cc1: warning: command line option ‘-std=c++98’ is valid for C++/ObjC++ but not for C

However, this doesn't seem to affect Blender's ability to use my video card. I saw a near 50% improvement in render times on the file I have been working on.

For reference, I found these pages that helped me finally hunt down a solution:

Nvidia forum post, CUDA using wrong GCC

Arch Linux bug report

Cplusplus.com forum post

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.