Page MenuHome

Rendering with Cycles via python script fails on AMD GPU
Closed, InvalidPublic

Description

System Information:
OS: Kubuntu Linux 14.04 64 bit
Graphics: AMD Radeon R9_290
Graphics driver: fglrx 15.12 (15.301) - latest suggested by AMD website

Blender Version:
Worked: n/a (suffering from other issues when tried in 2.76 and 2.77)
Broken: 2.78a release with Fix T49846

Short description of error:
Blender is unable to render with Cycles on AMD GPU most of the times while running in console with -P option - it throwing CL_INVALID_BUILD_OPTIONS error.
While in the same time renders successfully from GUI or from console without resorting to python script.

Here few lines from console. Full report attached:

...
OpenCL build failed: errors in console
Build error: CL_INVALID_BUILD_OPTIONS
Compiling base_kernel OpenCL kernel ...
Build flags: -D__NODES_MAX_GROUP__=0 -D__NODES_FEATURES__=0 -D__MAX_CLOSURE__=1 -D__NO_HAIR__ -D__NO_OBJECT_MOTION__ -D__NO_CAMERA_MOTION__ -D__NO_BAKING__ -D__NO_VOLUME__ -D__NO_SUBSURFACE__ -D__NO_BRANCHED_PATH__ -D__NO_PATCH_EVAL__
OpenCL build failed: errors in console
Build error: CL_INVALID_BUILD_OPTIONS
...

Exact steps for others to reproduce the error:
Download

minimalistic Cycles scene and minimalistic render script and place them in your user directory.
Open terminal and run command: <path-to-blender-binary>/blender -b -P ~/renderScript.py

Event Timeline

2016-12-03 daily build not rendering on my AMD GPU at all, even in GUI mode.

Mai Lavelle (maiself) lowered the priority of this task from 90 to 30.Dec 5 2016, 10:22 PM

I can't reproduce this issue here. Please check your drivers again, you may have selected the wrong one, as that version looks a bit old.

Also I'm not sure what you mean by "2.78a release with rB5aa6a2", as that fix isn't a part of the 2.78a release.

Hi Mai Lavelle!

  1. 2.78a release with rB5aa6a2 means that I take 2.78a and changed in 'blender-2.78a/2.78/scripts/addons/cycles/kernel/kernel_projection.h' that 'D->z' to '(*D).z' in line 238 as in rB5aa6a2. Otherwise Blender plainly unable to compile any OpenCL kernel at all.
  1. I know that AMD graphics drivers for Windows are updated frequently, but when I go to the http://support.amd.com/en-us/download and fill that query (Desktop Graphics -> R9 Series -> R9 290 -> Linux 64 bit) I get only 15.12 as the latest :(

Can you please suggest correct graphics driver for Cycles in Linux?

AMD website is VERY confusing for getting proper drivers. If instead of using search funcitonality you start digging into the driver using links on the right side of that page you'll end up in this driver page. There will be download link for Ubuntu 16.04 (there is no 14.04 link even tho this page is also advertised for Ubuntu 14.04) and the driver version is 16.40. Not sure it'll work on your 14.04 system, but maybe it's time to get updated (it's really important to be able to install latest drivers).

But before you do this, please test if the issue happens with builds from builder.blender.org (cherry-picking random fix from Git to 2.78a release is not really a bets idea, there might be more changes required to get things working).

Hi Sergey!

Nice to see you here! Thanks for kind and comprehensive answer. You are right - the case were my a bit outdated OS with dated AMD GPU driver. I switched to Kubuntu 16.04 and AMD GPU Pro driver 16.40 and now also not experiencing that issue.

Thank You very much!

Yes, AMD GPU Pro driver not working for 14.04 because of dependencies. In defense of AMD website I can say that if you fill driver search query for Ubuntu (not general Lunux_x64) it guides you to the GPU Pro download page. So after Mai Lavelle pointed out to my dated GPU driver I searched more and get that newer driver, moved to newer OS...

...and than found your answer there. So sadly I cannot test current daily build in 14.04 anymore. But I tested 2016.12.03 daily build in 14.04 with fglrx 15.12 and had no luck - rendering with Cycles on my R9_290 GPU was not working at all for me even through Blender GUI.

About my cherry-picking random fixes I can say that Blender 2.78 (thank to you, devs) is posting in console OpenCL kernel build errors now and this output pointed me to that faulty line and it happened that it was already reported and fixed.

I think this task can be closed now, as Blender developers have no need to do anything with it.

Bastien Montagne (mont29) changed the task status from Unknown Status to Invalid.Dec 16 2016, 8:21 PM
Bastien Montagne (mont29) claimed this task.

Indeed, not a Blender bug. Thanks for the followups.