3

I have geforce 1070, ubuntu-studio 16.10 and installed CUDA 8 (from here: https://developer.nvidia.com/cuda-toolkit). I also install g++ 5 and make symlink

ln -s /usr/bin/gcc-5 /usr/local/cuda/bin/gcc

but when i try to render model in blender, i got a stack of messages after "Compile CUDA kernel". All log (run from console)

crystal@ustudio:~$ blender
connect failed: No such file or directory
Read new prefs: /home/crystal/.config/blender/2.77/config/userpref.blend
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
AL lib: (WW) ALCjackBackendFactory_init: jack_client_open() failed, 0x11
AL lib: (WW) alc_initconfig: Failed to initialize backend "jack"
read blend: /home/crystal/Downloads/BMW27.blend
skipping driver '-90*brake', automatic scripts are disabled
skipping driver '100*power', automatic scripts are disabled
skipping driver '90*brake', automatic scripts are disabled
skipping driver '-100*power', automatic scripts are disabled
skipping driver '100*power', automatic scripts are disabled
skipping driver '-90*brake', automatic scripts are disabled
skipping driver '90*brake', automatic scripts are disabled
skipping driver '-100*power', automatic scripts are disabled
skipping driver '-90*brake', automatic scripts are disabled
skipping driver '100*power', automatic scripts are disabled
skipping driver '-100*power', automatic scripts are disabled
skipping driver '90*brake', automatic scripts are disabled
skipping driver '100*power', automatic scripts are disabled
skipping driver '-100*power', automatic scripts are disabled
skipping driver '90*brake', automatic scripts are disabled
skipping driver '-90*brake', automatic scripts are disabled
skipping driver '100*power', automatic scripts are disabled
skipping driver '-90*brake', automatic scripts are disabled
skipping driver '-100*power', automatic scripts are disabled
skipping driver '90*brake', automatic scripts are disabled
skipping driver '100*power', automatic scripts are disabled
skipping driver '90*brake', automatic scripts are disabled
skipping driver '-100*power', automatic scripts are disabled
skipping driver '-90*brake', automatic scripts are disabled
CUDA version 8.0 detected, build may succeed but only CUDA 7.5 is officially supported.
Compiling CUDA kernel ...
"/usr/local/cuda/bin/nvcc" -arch=sm_61 -m64 --cubin "/usr/share/blender/scripts/addons/cycles/kernel/kernels/cuda/kernel.cu" -o "/home/crystal/.config/blender/2.77/cache/cycles_kernel_sm61_19BAB894867FFAFF2ADC00F401D5E4EB.cubin" --ptxas-options="-v" --use_fast_math -I"/usr/share/blender/scripts/addons/cycles/kernel" -DNVCC -D__KERNEL_CUDA_VERSION__=80
/usr/share/blender/scripts/addons/cycles/kernel/kernels/cuda/kernel.cu:94:2: error: #error "Unknown or unsupported CUDA architecture, can't determine launch bounds"
 #error "Unknown or unsupported CUDA architecture, can't determine launch bounds"
  ^
/usr/share/blender/scripts/addons/cycles/kernel/kernels/cuda/kernel.cu:112:87: error: division by zero in #if
 #if CUDA_MULTIPRESSOR_MAX_REGISTERS/(CUDA_THREADS_BLOCK_WIDTH*CUDA_THREADS_BLOCK_WIDTH*CUDA_KERNEL_MAX_REGISTERS) > CUDA_MULTIPROCESSOR_MAX_BLOCKS
                                                                                       ^
CUDA kernel compilation failed, see console for details.

Refer to the Cycles GPU rendering documentation for possible solutions:
http://www.blender.org/manual/render/cycles/gpu_rendering.html

skipping driver '100*power', automatic scripts are disabled
skipping driver '90*brake', automatic scripts are disabled
skipping driver '-100*power', automatic scripts are disabled
skipping driver '-90*brake', automatic scripts are disabled
Error: CUDA kernel compilation failed, see console for details.

blender --version
Blender 2.77 (sub 0)

How to fix it? Thanks in advance.

  • Downgrade to Cuda 7.5, as the output says that CUDA 8 is not supported but CUDA 7.5 – Thomas Oct 30 '16 at 13:31
  • @Thomas, i read this. But how i can do this? Nvidia recommend cuda 8 for pascal – Crystal Oct 30 '16 at 13:36
  • developer.blender.org/T47262 ,but i don't have directory "lib" in "/usr/share/blender/scripts/addons/cycles" and no output when locate *.cubin – Crystal Oct 30 '16 at 13:44
  • 2
    temporary fix: sed -i 's/__CUDA_ARCH__ == 500 \|\| __CUDA_ARCH__ == 520 \|\| __CUDA_ARCH__ == 530/CUDA_ARCH__ >= 500/' /usr/share/blender/scripts/addons/cycles/kernel/kernels/cuda‌​/kernel.cu (or change that by your hands like i did) but it is not optimal configuration. Source: github.com/dfelinto/blender/blob/master/intern/cycles/kernel/… – Crystal Oct 30 '16 at 16:12
  • the comment of Crystal should be the answer since it solves the problem (maybe not elegantly). – hochl Nov 12 '16 at 20:43
0

This worked for me on Blender 2.76b (Ubuntu 16.04)

  1. Open kernel.cu

sudo gedit /usr/share/blender/scripts/addons/cycles/kernel/kernels/cuda/kernel.cu

  1. Find the line that looks something like this:

/* 5.0 and 5.2 */

#elif __CUDA_ARCH__ == 500 || __CUDA_ARCH__ == 520

It may be slightly different, but should start with #elif __CUDA_ARCH___ ==

  1. Change that line to: #elif __CUDA_ARCH__ >= 500

This will allow Blender to compile for newer CUDA architectures. It may not work as expected, and you'll probably get warnings the first time you run it (as it compiles), but you won't get the compile error any more. Also, this is working for me on Ubuntu 16.04 with Blender 2.76b and CUDA 8.0

  • i done this year ago (see comments) :) – Crystal Sep 20 '17 at 6:12
  • @Crystal ya, your comment was how I figured mine out (though the command you pasted didn't work!) Seems like lots of people on the interwebs having this this issue so thought I post the answer a tad more descriptively and prominently =) Thank you! – 43Tesseracts Sep 23 '17 at 22:47
0

Install G++ 5 solves the problem. Please use the following command:

sudo apt install g++-5
0

I'm using Blender 2.78 with Ubuntu 17.04 and CUDA 8.0:

  • installing g++ 5 didn't work
  • change kernel.cu didn't work (Blender 2.78 already has the change)

But this worked:

  1. Run Blender in sudo mode with "sudo blender". Rendering with GPU loaded the kernels and the rendering worked
  2. Then run Blender normally (no sudo) and GPU rendering now works

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.