Bug 24379

Summary: Error: CUDA kernel compilation failed, see console for details
Product: Mageia Reporter: Richard Walker <richard.j.walker>
Component: RPM PackagesAssignee: David GEIGER <geiger.david68210>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: Normal CC: marja11
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
See Also: https://bugs.mageia.org/show_bug.cgi?id=24411
Whiteboard:
Source RPM: blender-2.79b-13.mga7.src.rpm CVE:
Status comment:

Description Richard Walker 2019-02-17 17:45:46 CET
Description of problem:
Console output on starting blender explains this as:
CUDA version 9.10 detected, build may succeed but only CUDA 8.0 is officially supported.

My Cauldron installation is fully up to date. 
Blender nightly builds for 2.79 and 2.80 start normally and correctly.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Configure blender to use GPU compute for rendering on a compatible Nvidia GPU
2. Save user preferences and quit
3. Re-start Blender
Comment 1 Marja Van Waes 2019-02-19 08:57:02 CET
Assigning to the registered maintainer.

CC: (none) => marja11
Assignee: bugsquad => geiger.david68210

Comment 2 David GEIGER 2019-02-19 21:56:31 CET
Latest git snapshot from branch blender2.7 is now available on Cauldron, please test it, thanks!

blender-2.79b-14.git20190219.1.mga7
Comment 3 Richard Walker 2019-02-19 23:20:06 CET
Yep, that's fixed it - thank you very much

Resolution: (none) => FIXED
Status: NEW => RESOLVED

Comment 4 Richard Walker 2019-02-19 23:24:20 CET
Ouch. Sorry. Blender started without complaint but fails on compiling the CUDA kernel for a render.

It now mentions a gcc problem;

CUDA version 9.1 detected, build may succeed but only CUDA 8.0 is officially supported.
Compiling CUDA kernel ...
"nvcc" -arch=sm_61 --cubin "/usr/share/blender/2.79/scripts/addons/cycles/source/kernel/kernels/cuda/kernel.cu" -o "/home/richard/.cache/cycles/kernels/cycles_kernel_sm61_7541DDBE6B1A613331389550DF3BCB6B.cubin" -m64 --ptxas-options="-v" --use_fast_math -DNVCC -I"/usr/share/blender/2.79/scripts/addons/cycles/source" 
In file included from /usr/include/host_config.h:50,
                 from /usr/include/cuda_runtime.h:78,
                 from <command-line>:
/usr/include/crt/host_config.h:121:2: error: #error -- unsupported GNU version! gcc versions later than 6 are not supported!
 #error -- unsupported GNU version! gcc versions later than 6 are not supported!
  ^~~~~
CUDA kernel compilation failed, see console for details.


Sorry for being so careless.

Resolution: FIXED => (none)
Status: RESOLVED => REOPENED

Comment 5 David GEIGER 2019-02-19 23:26:26 CET
Can you report this bug upstream, please?
Comment 6 Richard Walker 2019-02-20 01:41:28 CET
OK, I can report it upstream, but I am not sure what I would say. The 2.79b release from Blender.org works just fine and I don't know how the Mageia version was built.

How would you describe the problem?
Comment 7 Richard Walker 2019-02-20 02:51:41 CET
Hmmm. From a very quick poke around it seems the gcc compiler complaint is coming from the nvidia side (/usr/include/crt/host_config.h:121:2). That still doesn't explain why all of the blender.org builds (2.79b, 2.79 and 2.80 nightly builds) all manage to render with CUDA on my GPU. 

It's late now. I'll take another look after work tomorrow.

Richard
Comment 8 Richard Walker 2019-02-23 15:58:36 CET
That took longer than I expected, but I think I understand the problem now.
The most significant difference between the current Cauldron Blender "2.79b" rpm, built from git 2.79 branch on 19 Feb 2019, and the build from Blender.org dailies, timed at 15:34 on the same day, is that the Cauldron version starts rendering by compiling a CUDA kernel (which fails as noted above) whereas the Blender-built version goes straight in to rendering with no delay.

The reason for the difference is that the Blender.org dailies come with pre-compiled CUDA kernels in the 2.79/scripts/addons/cycles/lib directory so the CUDA kernel compile step is skipped.

Presumably the Blender devs have more recent CUDA headers than those shipped in our nvidia-cuda-toolkit-devel package (CUDA 9.1.85 dating from some time in 2017).

It may solve the problem if our CUDA packages were updated to CUDA 10.0.130 but that might prevent users, with nvidia hardware requiring pre-410.48 nvidia drivers, from getting CUDA accelerated rendering in Blender.

Perhaps we should consider driver-versioned rpms for the CUDA toolkit stuff too....

Meanwhile I can show that copying the Blender.org-supplied cycles addon from blender-2.79-667033e89e7f-linux-glibc224-x86_64/2.79/scripts/addons/cycles to ~/.config/blender/2.79/scripts/addons/cycles does indeed allow the Cauldron rpm version to start and render using my nvidia gpu.

Would you agree that this bug can be closed as "not valid" or whatever, and a new bug be raised against nvidia-cuda-toolkit-devel?
Comment 9 David GEIGER 2019-02-23 16:05:36 CET
Yes for me as we don't provides any pre-compiled sources in ours packages!

So make more sense in a cuda driver version issue.
Comment 10 Richard Walker 2019-02-23 16:40:10 CET
Opened a new bug for this: 24411

Thank you for your help, David

Status: REOPENED => RESOLVED
Resolution: (none) => INVALID

Marja Van Waes 2019-02-24 11:14:03 CET

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=24411