Cycles OpenCL throws CL_INVALID_BUILD_OPTIONS on AMD R9 280x on Linux
Closed, InvalidPublic

Description

System Information
Ubuntu Linux 64bit Wily Werewolf 15.10 two AMD R9 290's in crossfire

Blender Version
Broken: (2.78 RC1,RC2)
Worked: (same builds in windows on the same PC (dual boot)l)

Short description of error

Exact steps for others to reproduce the error
Anything including the default cube in cycles and rendered on GPU

The console says:
Read new prefs: /home/jeremy/.config/blender/2.78/config/userpref.blend
found bundled python: /home/jeremy/Downloads/blender-2.78-rc2-linux-glibc211-x86_64/2.78/python
addon not found: 'io_import_scene_osm'
version 3 imported
read blend: /home/jeremy/mirco_test.blend
Device init success
Device init success
Compiling base_kernel OpenCL kernel ...
Build flags: -DKERNEL_EXPERIMENTAL -DNODES_MAX_GROUP=3 -DNODES_FEATURES=15 -DMAX_CLOSURE=64 -DNO_HAIR -DNO_OBJECT_MOTION -DNO_CAMERA_MOTION -DNO_BAKING -DNO_VOLUME -DNO_SUBSURFACE -DNO_BRANCHED_PATH
OpenCL build failed: errors in console
Build error: CL_INVALID_BUILD_OPTIONS

Details

Type
Bug
Sergey Sharybin (sergey) triaged this task as Incomplete priority.Sep 29 2016, 5:16 PM

What is your video driver? Mind shading system-info.txt generated with Help -> Save System Info?

From system info text file:

Blender 2.78 (sub 0) System Information

Blender:

version: 2.78 (sub 0), branch: master, commit date: 2016-09-14 14:46, hash: 9d70344, type: Release
build date: 2016-09-14, 15:52:55
platform: Linux
binary path: '/home/jeremy/Downloads/blender-2.78-rc2-linux-glibc211-x86_64/blender'
build cflags: -Wall -Wcast-align -Werror=implicit-function-declaration -Werror=return-type -Werror=vla -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wlogical-op -Wundef -Winit-self -Wnonnull -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Wuninitialized -Wredundant-decls -Wno-error=unused-but-set-variable -std=gnu99 -msse2 -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing
build cxxflags: -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Werror=implicit-function-declaration -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wuninitialized -Wundef -Wmissing-declarations -msse2 -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing
build linkflags: -Wl,--version-script='/home/sources/blender-release/source/creator/blender.map'
build system: CMake

Python:

version: 3.5.1 (default, Apr 12 2016, 13:36:06)
[GCC 4.7.1]
paths:
'/home/jeremy/Downloads/blender-2.78-rc2-linux-glibc211-x86_64/2.78/scripts/addons_contrib'
'/home/jeremy/Downloads/blender-2.78-rc2-linux-glibc211-x86_64/2.78/scripts/addons'
'/home/jeremy/Downloads/blender-2.78-rc2-linux-glibc211-x86_64/2.78/scripts/startup'
'/home/jeremy/Downloads/blender-2.78-rc2-linux-glibc211-x86_64/2.78/scripts/modules'
'/home/jeremy/Downloads/blender-2.78-rc2-linux-glibc211-x86_64/2.78/python/lib/python35.zip'
'/home/jeremy/Downloads/blender-2.78-rc2-linux-glibc211-x86_64/2.78/python/lib/python3.5'
'/home/jeremy/Downloads/blender-2.78-rc2-linux-glibc211-x86_64/2.78/python/lib/python3.5/plat-linux'
'/home/jeremy/Downloads/blender-2.78-rc2-linux-glibc211-x86_64/2.78/python/lib/python3.5/lib-dynload'
'/home/jeremy/Downloads/blender-2.78-rc2-linux-glibc211-x86_64/2.78/python/lib/python3.5/site-packages'
'/home/jeremy/Downloads/blender-2.78-rc2-linux-glibc211-x86_64/2.78/scripts/freestyle/modules'
'/home/jeremy/Downloads/blender-2.78-rc2-linux-glibc211-x86_64/2.78/scripts/addons/modules'
'/home/jeremy/.config/blender/2.78/scripts/addons/modules'

Python (External Binary):

binary path: '/home/jeremy/Downloads/blender-2.78-rc2-linux-glibc211-x86_64/2.78/python/bin/python3.5m'
version: Python 3.5.1

Directories:

scripts:
'/home/jeremy/Downloads/blender-2.78-rc2-linux-glibc211-x86_64/2.78/scripts/modules'
'/home/jeremy/Downloads/blender-2.78-rc2-linux-glibc211-x86_64/2.78/scripts'
'/home/jeremy/.config/blender/2.78/scripts'
user scripts: '/home/jeremy/.config/blender/2.78/scripts'
pref scripts: None
datafiles: '/home/jeremy/.config/blender/2.78/datafiles/'
config: '/home/jeremy/.config/blender/2.78/config/'
scripts : '/home/jeremy/.config/blender/2.78/scripts/'
autosave: '/home/jeremy/.config/blender/2.78/autosave/'
tempdir: '/tmp/blender_IyZq3E/'

FFmpeg:

avcodec: '56, 60, 100'
avdevice: '56, 4, 100'
avformat: '56, 40, 101'
avutil: '54, 31, 100'
swscale: ' 3, 1, 101'

SDL:

Version: Unknown
Loading method: dynamically loaded by Blender (WITH_SDL_DYNLOAD=ON)

WARNING: Blender could not load SDL library

Other Libraries:

OpenColorIO: 1, 0, 9
OpenImageIO: 1, 6, 9
OpenShadingLanguage: 1, 7, 3
OpenVDB: 3, 1, 0
Alembic: 1, 6, 0

OpenGL:

renderer: 'AMD Radeon R9 200 Series'
vendor: 'ATI Technologies Inc.'
version: '4.5.13416 Compatibility Profile Context 15.302'
extensions:
GL_AMDX_debug_output
GL_AMD_blend_minmax_factor
GL_AMD_conservative_depth
GL_AMD_debug_output
GL_AMD_depth_clamp_separate
GL_AMD_draw_buffers_blend
GL_AMD_framebuffer_sample_positions
GL_AMD_gcn_shader
GL_AMD_gpu_shader_int64
GL_AMD_interleaved_elements
GL_AMD_multi_draw_indirect
GL_AMD_name_gen_delete
GL_AMD_occlusion_query_event
GL_AMD_performance_monitor
GL_AMD_pinned_memory
GL_AMD_query_buffer_object
GL_AMD_sample_positions
GL_AMD_seamless_cubemap_per_texture
GL_AMD_shader_atomic_counter_ops
GL_AMD_shader_stencil_export
GL_AMD_shader_stencil_value_export
GL_AMD_shader_trace
GL_AMD_shader_trinary_minmax
GL_AMD_stencil_operation_extended
GL_AMD_texture_cube_map_array
GL_AMD_texture_texture4
GL_AMD_transform_feedback3_lines_triangles
GL_AMD_transform_feedback4
GL_AMD_vertex_shader_layer
GL_AMD_vertex_shader_viewport_index
GL_ARB_ES2_compatibility
GL_ARB_ES3_1_compatibility
GL_ARB_ES3_compatibility
GL_ARB_arrays_of_arrays
GL_ARB_base_instance
GL_ARB_bindless_texture
GL_ARB_blend_func_extended
GL_ARB_buffer_storage
GL_ARB_clear_buffer_object
GL_ARB_clear_texture
GL_ARB_clip_control
GL_ARB_color_buffer_float
GL_ARB_compatibility
GL_ARB_compressed_texture_pixel_storage
GL_ARB_compute_shader
GL_ARB_conditional_render_inverted
GL_ARB_conservative_depth
GL_ARB_copy_buffer
GL_ARB_copy_image
GL_ARB_cull_distance
GL_ARB_debug_output
GL_ARB_depth_buffer_float
GL_ARB_depth_clamp
GL_ARB_depth_texture
GL_ARB_derivative_control
GL_ARB_direct_state_access
GL_ARB_draw_buffers
GL_ARB_draw_buffers_blend
GL_ARB_draw_elements_base_vertex
GL_ARB_draw_indirect
GL_ARB_draw_instanced
GL_ARB_enhanced_layouts
GL_ARB_explicit_attrib_location
GL_ARB_explicit_uniform_location
GL_ARB_fragment_coord_conventions
GL_ARB_fragment_layer_viewport
GL_ARB_fragment_program
GL_ARB_fragment_program_shadow
GL_ARB_fragment_shader
GL_ARB_framebuffer_no_attachments
GL_ARB_framebuffer_object
GL_ARB_framebuffer_sRGB
GL_ARB_geometry_shader4
GL_ARB_get_program_binary
GL_ARB_get_texture_sub_image
GL_ARB_gpu_shader5
GL_ARB_gpu_shader_fp64
GL_ARB_half_float_pixel
GL_ARB_half_float_vertex
GL_ARB_imaging
GL_ARB_indirect_parameters
GL_ARB_instanced_arrays
GL_ARB_internalformat_query
GL_ARB_internalformat_query2
GL_ARB_invalidate_subdata
GL_ARB_map_buffer_alignment
GL_ARB_map_buffer_range
GL_ARB_multi_bind
GL_ARB_multi_draw_indirect
GL_ARB_multisample
GL_ARB_multitexture
GL_ARB_occlusion_query
GL_ARB_occlusion_query2
GL_ARB_pipeline_statistics_query
GL_ARB_pixel_buffer_object
GL_ARB_point_parameters
GL_ARB_point_sprite
GL_ARB_program_interface_query
GL_ARB_provoking_vertex
GL_ARB_query_buffer_object
GL_ARB_robust_buffer_access_behavior
GL_ARB_sample_shading
GL_ARB_sampler_objects
GL_ARB_seamless_cube_map
GL_ARB_seamless_cubemap_per_texture
GL_ARB_separate_shader_objects
GL_ARB_shader_atomic_counters
GL_ARB_shader_bit_encoding
GL_ARB_shader_draw_parameters
GL_ARB_shader_group_vote
GL_ARB_shader_image_load_store
GL_ARB_shader_image_size
GL_ARB_shader_objects
GL_ARB_shader_precision
GL_ARB_shader_stencil_export
GL_ARB_shader_storage_buffer_object
GL_ARB_shader_subroutine
GL_ARB_shader_texture_image_samples
GL_ARB_shader_texture_lod
GL_ARB_shading_language_100
GL_ARB_shading_language_420pack
GL_ARB_shading_language_packing
GL_ARB_shadow
GL_ARB_shadow_ambient
GL_ARB_stencil_texturing
GL_ARB_sync
GL_ARB_tessellation_shader
GL_ARB_texture_barrier
GL_ARB_texture_border_clamp
GL_ARB_texture_buffer_object
GL_ARB_texture_buffer_object_rgb32
GL_ARB_texture_buffer_range
GL_ARB_texture_compression
GL_ARB_texture_compression_bptc
GL_ARB_texture_compression_rgtc
GL_ARB_texture_cube_map
GL_ARB_texture_cube_map_array
GL_ARB_texture_env_add
GL_ARB_texture_env_combine
GL_ARB_texture_env_crossbar
GL_ARB_texture_env_dot3
GL_ARB_texture_float
GL_ARB_texture_gather
GL_ARB_texture_mirror_clamp_to_edge
GL_ARB_texture_mirrored_repeat
GL_ARB_texture_multisample
GL_ARB_texture_non_power_of_two
GL_ARB_texture_query_levels
GL_ARB_texture_query_lod
GL_ARB_texture_rectangle
GL_ARB_texture_rg
GL_ARB_texture_rgb10_a2ui
GL_ARB_texture_snorm
GL_ARB_texture_stencil8
GL_ARB_texture_storage
GL_ARB_texture_storage_multisample
GL_ARB_texture_swizzle
GL_ARB_texture_view
GL_ARB_timer_query
GL_ARB_transform_feedback2
GL_ARB_transform_feedback3
GL_ARB_transform_feedback_instanced
GL_ARB_transform_feedback_overflow_query
GL_ARB_transpose_matrix
GL_ARB_uniform_buffer_object
GL_ARB_vertex_array_bgra
GL_ARB_vertex_array_object
GL_ARB_vertex_attrib_64bit
GL_ARB_vertex_attrib_binding
GL_ARB_vertex_buffer_object
GL_ARB_vertex_program
GL_ARB_vertex_shader
GL_ARB_vertex_type_10f_11f_11f_rev
GL_ARB_vertex_type_2_10_10_10_rev
GL_ARB_viewport_array
GL_ARB_window_pos
GL_ATI_draw_buffers
GL_ATI_envmap_bumpmap
GL_ATI_fragment_shader
GL_ATI_meminfo
GL_ATI_separate_stencil
GL_ATI_texture_compression_3dc
GL_ATI_texture_env_combine3
GL_ATI_texture_float
GL_ATI_texture_mirror_once
GL_EXT_abgr
GL_EXT_bgra
GL_EXT_bindable_uniform
GL_EXT_blend_color
GL_EXT_blend_equation_separate
GL_EXT_blend_func_separate
GL_EXT_blend_minmax
GL_EXT_blend_subtract
GL_EXT_compiled_vertex_array
GL_EXT_copy_buffer
GL_EXT_copy_texture
GL_EXT_depth_bounds_test
GL_EXT_direct_state_access
GL_EXT_draw_buffers2
GL_EXT_draw_instanced
GL_EXT_draw_range_elements
GL_EXT_fog_coord
GL_EXT_framebuffer_blit
GL_EXT_framebuffer_multisample
GL_EXT_framebuffer_object
GL_EXT_framebuffer_sRGB
GL_EXT_geometry_shader4
GL_EXT_gpu_program_parameters
GL_EXT_gpu_shader4
GL_EXT_histogram
GL_EXT_multi_draw_arrays
GL_EXT_packed_depth_stencil
GL_EXT_packed_float
GL_EXT_packed_pixels
GL_EXT_pixel_buffer_object
GL_EXT_point_parameters
GL_EXT_polygon_offset_clamp
GL_EXT_provoking_vertex
GL_EXT_rescale_normal
GL_EXT_secondary_color
GL_EXT_separate_specular_color
GL_EXT_shader_image_load_store
GL_EXT_shader_integer_mix
GL_EXT_shadow_funcs
GL_EXT_stencil_wrap
GL_EXT_subtexture
GL_EXT_texgen_reflection
GL_EXT_texture3D
GL_EXT_texture_array
GL_EXT_texture_buffer_object
GL_EXT_texture_compression_bptc
GL_EXT_texture_compression_latc
GL_EXT_texture_compression_rgtc
GL_EXT_texture_compression_s3tc
GL_EXT_texture_cube_map
GL_EXT_texture_edge_clamp
GL_EXT_texture_env_add
GL_EXT_texture_env_combine
GL_EXT_texture_env_dot3
GL_EXT_texture_filter_anisotropic
GL_EXT_texture_integer
GL_EXT_texture_lod
GL_EXT_texture_lod_bias
GL_EXT_texture_mirror_clamp
GL_EXT_texture_object
GL_EXT_texture_rectangle
GL_EXT_texture_sRGB
GL_EXT_texture_sRGB_decode
GL_EXT_texture_shared_exponent
GL_EXT_texture_snorm
GL_EXT_texture_storage
GL_EXT_texture_swizzle
GL_EXT_timer_query
GL_EXT_transform_feedback
GL_EXT_vertex_array
GL_EXT_vertex_array_bgra
GL_EXT_vertex_attrib_64bit
GL_IBM_texture_mirrored_repeat
GL_INTEL_fragment_shader_ordering
GL_KHR_context_flush_control
GL_KHR_debug
GL_KHR_robust_buffer_access_behavior
GL_KHR_robustness
GL_KTX_buffer_region
GL_NV_blend_square
GL_NV_conditional_render
GL_NV_copy_depth_to_color
GL_NV_copy_image
GL_NV_depth_buffer_float
GL_NV_explicit_multisample
GL_NV_float_buffer
GL_NV_half_float
GL_NV_primitive_restart
GL_NV_texgen_reflection
GL_NV_texture_barrier
GL_OES_EGL_image
GL_SGIS_generate_mipmap
GL_SGIS_texture_edge_clamp
GL_SGIS_texture_lod
GL_SUN_multi_draw_arrays
GL_WIN_swap_hint

Implementation Dependent OpenGL Limits:

Maximum Fixed Function Texture Units: 8
Maximum DrawElements Vertices: 2147483647
Maximum DrawElements Indices: 2147483647

GLSL:
Maximum Varying Floats: 128
Maximum Vertex Attributes: 29
Maximum Vertex Uniform Components: 16384
Maximum Fragment Uniform Components: 16384
Maximum Vertex Image Units: 32
Maximum Fragment Image Units: 32
Maximum Pipeline Image Units: 192

Cycles:

CPU device capabilities: SSE2 SSE3 SSE41 AVX

OpenCL device capabilities:
Number of platforms: 1
Platform #0
Platform Name: AMD Accelerated Parallel Processing
Platform Vendor: Advanced Micro Devices, Inc.
Platform Version: OpenCL 2.0 AMD-APP (1912.5)
Platform Profile: FULL_PROFILE
Platform Extensions: cl_khr_icd cl_amd_event_callback cl_amd_offline_devices
Number of devices: 3

		Device: #0
			Device Name: Hawaii
			Device Vendor: Advanced Micro Devices, Inc.
			Device OpenCL C Version: OpenCL C 2.0 
			Device Profile: FULL_PROFILE
			Device Version: OpenCL 2.0 AMD-APP (1912.5)
			Device Extensions: cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_khr_gl_depth_images cl_ext_atomic_counters_32 cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_image2d_from_buffer cl_khr_spir cl_khr_subgroups cl_khr_gl_event cl_khr_depth_images cl_khr_mipmap_image cl_khr_mipmap_image_writes 
		Device: #1
			Device Name: Hawaii
			Device Vendor: Advanced Micro Devices, Inc.
			Device OpenCL C Version: OpenCL C 2.0 
			Device Profile: FULL_PROFILE
			Device Version: OpenCL 2.0 AMD-APP (1912.5)
			Device Extensions: cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_khr_gl_depth_images cl_ext_atomic_counters_32 cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_image2d_from_buffer cl_khr_spir cl_khr_subgroups cl_khr_gl_event cl_khr_depth_images cl_khr_mipmap_image cl_khr_mipmap_image_writes 
		Device: #2
			Device Name: Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz
			Device Vendor: GenuineIntel
			Device OpenCL C Version: OpenCL C 1.2 
			Device Profile: FULL_PROFILE
			Device Version: OpenCL 1.2 AMD-APP (1912.5)
			Device Extensions: cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_device_fission cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_spir cl_khr_gl_event
Sergey Sharybin (sergey) raised the priority of this task from Incomplete to Normal.Sep 30 2016, 9:39 AM

In the future, please use file attachment instead of inlining such a lengthy information.

Same issue here with 6 AMD R7 370 Strix

system info attachment:

after restarting blender and trying again, there was a bit more info in the console:

Read new prefs: /home/cocoknight/.config/blender/2.78/config/userpref.blend
found bundled python: /home/cocoknight/Downloads/blender-2.78a-linux-glibc211-x86_64/2.78/python
Device init success
Device init success
Device init success
Device init success
Device init success
Device init success
Compiling base_kernel OpenCL kernel ...
Build flags: -DNODES_MAX_GROUP=0 -DNODES_FEATURES=0 -DMAX_CLOSURE=1 -DNO_HAIR -DNO_OBJECT_MOTION -DNO_CAMERA_MOTION -DNO_BAKING -DNO_VOLUME -DNO_SUBSURFACE -DNO_BRANCHED_PATH -DNO_PATCH_EVAL
OpenCL kernel build output:
"/home/cocoknight/Downloads/blender-2.78a-linux-glibc211-x86_64/2.78/scripts/addons/cycles/kernel/kernels/opencl/../../kernel_projection.h", line 238: error:

        expression must have pointer-to-struct-or-union type
		float altitude = fabsf(safe_asinf(D->z));
		                 ^

1 error detected in the compilation of "/tmp/OCLiM13iN.cl".
Frontend phase failed compilation.

OpenCL build failed: errors in console
Build error: CL_BUILD_PROGRAM_FAILURE

Error: OpenCL build failed: errors in console

The fix described in the comment of T50269 works for me using 2.78a, but not with a daily build.

Aaron Carlisle (Blendify) lowered the priority of this task from Normal to Incomplete.Feb 2 2017, 4:10 PM

Please try with a build from https://builder.blender.org/download/ I think this has been fixed already.

This comment was removed by Jeremy (mryeje).

Please try with a build from https://builder.blender.org/download/ I think this has been fixed already.

I gave one a try and still threw the same error.

Please try with a build from https://builder.blender.org/download/ I think this has been fixed already.

Tried and still getting the same error

To anyone having these issues please make sure you are using the latest available drivers.

More than a week without reply. Due to the policy of the tracker archiving for until required info/data are provided.

What kind of reply is expected. Let me know if I can help somehow. Systeminfo with driver info is already attached, and nighty builds have already been tried without success...

@Fabian Hernandez (cocoknight) we need to know the exact version of your GPU driver, and that you ensure to be using the latest one. ;)

I'm using the latest available driver even though it's from 2015. I'll have a look about the exact driver version when I get home from work.

Eeeeh… 'latest driver' being from 2015 sounds very fishy to me… AMD and NVidia usually publish new drivers every other months or so.

The newest one I could find from AMD is from Jan 28th 2017 AMDGPU-PRO Driver 16.60

I think canonical isnt making new drivers for 16.04. The situation is confusing for the layman.
Ive also spotted https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers

I don't think that the amdgpu drivers are any good, or do they work for cycles?

Here's the direct link to the amd driver downloads page for my gpu and system. The release date shows 2015. The version seems to be 15.302.
The driver version I'm using is slightly older even though I'm using the binaries from updates:
ls /var/lib/dkms/fglrx-updates-core/
15.201 kernel-4.2.0-42-generic-x86_64

I'll try to install the 15.302 version and test again.

everything is working perfectly for me with driver 15.302 and blender 2.78b. yay, thanks!

Bastien Montagne (mont29) closed this task as Archived.Feb 19 2017, 1:22 PM

Thanks, closing then. :)

ah no, wait, sorry, I was accidentally using the cpu... will test a bit more with daily builds

ok, so with 2.78-9992e6a169 it is working for real now :-) thanks!

hmm... now it's not working anymore once again. I don't how this is possible... maybe jeremy is able to test it better.

here's a blender.crash.txt but it doesn't seem to contain much info. Is there a way to debug this further? Although I'm sure it was working when I first tried it, it doesn't work anymore and I can't get it to work. Only way it works again is if I downgrade the driver again and use the workaround on the 2.78a version.

I've now been able to reproduce and confirm 100% that after switching drivers back and forth, it works the first time using 2.78-9992e6a169 and the 15.302 driver. But after restarting blender it doesn't work anymore, even after reboot. What could be the cause of this?
Edit: here's another

Try removing ~/.cache/cycles to see whether driver fails to restore OpenCL kernel from a binary dump.

no, that's not it, still failing with OpenCL build failed with error CL_INVALID_BUILD_OPTIONS, errors in console.
Error: Failed loading render kernel, see console for errors

I just tried with 2.78-9992e6a169 AMD driver 15.20.3 (I cat seem to upgrade to 15.302 (ubuntu15.10))
Crashed right away.

So is there a way to get more debug information other than:
OpenCL build failed with error CL_INVALID_BUILD_OPTIONS, errors in console.
Error: Failed loading render kernel, see console for errors
?

Please grab latest build from builder.blender.org and run it with --debug-cycles command line argument. Attach the output as a file here.

It will also be great if someone tests Cycles on a more recent Ubuntu with amd-gpu driver. All other drivers are discontinued.

I can also see the crash report here, which is obviously different from compilation error and having such a mix of issues in a single report doesn't make life easier.

you can probably ignore the crash report. Blender doesn't crash normally, it only happened when I run the render command on the python console which I did as an effort to get more info about the issue.

More recent ubuntu versions don't support the fglrx driver anymore, but amd-gpu only supports a handful of cards, mine not included. Thus for now I'm stuck to ubuntu 15.10 for doing stuff like cycles rendering.

Here's the --debug-cycles output using 2.78-36c4fc1ea9 and latest driver 15.302:

$ ./blender --debug-cycles
Read new prefs: /home/cocoknight/.config/blender/2.78/config/userpref.blend
found bundled python: /home/cocoknight/Downloads/blender-2.78-36c4fc1ea9-linux-glibc219-x86_64/2.78/python
I0222 13:34:51.450047 3287 blender_python.cpp:182] Debug flags initialized to:
CPU flags:

AVX2   : True
AVX    : True
SSE4.1 : True
SSE3   : True
SSE2   : True

CUDA flags:
Adaptive Compile: False
OpenCL flags:

Device type : ALL
Kernel type : DEFAULT
Debug       : False

I0222 13:34:51.466560 3287 device_cuda.cpp:1363] CUEW initialization failed: Error opening the library
I0222 13:34:51.467574 3287 device_opencl.cpp:58] CLEW initialization succeeded.
I0222 13:34:52.558423 3287 opencl_util.cpp:743] Enumerating devices for platform AMD Accelerated Parallel Processing.
I0222 13:34:52.558457 3287 opencl_util.cpp:804] Adding new device Pitcairn.
I0222 13:34:52.558468 3287 opencl_util.cpp:804] Adding new device Pitcairn.
I0222 13:34:52.558475 3287 opencl_util.cpp:804] Adding new device Pitcairn.
I0222 13:34:52.558482 3287 opencl_util.cpp:804] Adding new device Pitcairn.
I0222 13:34:52.558488 3287 opencl_util.cpp:804] Adding new device Pitcairn.
I0222 13:34:52.558495 3287 opencl_util.cpp:804] Adding new device Pitcairn.
I0222 13:34:52.558501 3287 opencl_util.cpp:814] Ignoring device Intel(R) Pentium(R) CPU G3220 @ 3.00GHz, not officially supported yet.
I0222 13:35:00.009901 3296 util_system.cpp:77] Detected 1 CPU groups.
I0222 13:35:00.010079 3296 util_system.cpp:80] Group 0 has 2 threads.
I0222 13:35:00.010087 3296 util_task.cpp:203] Creating pool of 2 threads.
I0222 13:35:00.010359 3296 device_opencl.cpp:37] Using split kernel.
I0222 13:35:00.010396 3296 opencl_base.cpp:85] Creating new Cycles device for OpenCL platform AMD Accelerated Parallel Processing, device Pitcairn.
Device init success
I0222 13:35:00.020341 3296 device_opencl.cpp:37] Using split kernel.
I0222 13:35:00.020529 3296 opencl_base.cpp:85] Creating new Cycles device for OpenCL platform AMD Accelerated Parallel Processing, device Pitcairn.
Device init success
I0222 13:35:00.030499 3296 device_opencl.cpp:37] Using split kernel.
I0222 13:35:00.030753 3296 opencl_base.cpp:85] Creating new Cycles device for OpenCL platform AMD Accelerated Parallel Processing, device Pitcairn.
Device init success
I0222 13:35:00.034765 3296 device_opencl.cpp:37] Using split kernel.
I0222 13:35:00.034824 3296 opencl_base.cpp:85] Creating new Cycles device for OpenCL platform AMD Accelerated Parallel Processing, device Pitcairn.
Device init success
I0222 13:35:00.044865 3296 device_opencl.cpp:37] Using split kernel.
I0222 13:35:00.045058 3296 opencl_base.cpp:85] Creating new Cycles device for OpenCL platform AMD Accelerated Parallel Processing, device Pitcairn.
Device init success
I0222 13:35:00.049139 3296 device_opencl.cpp:37] Using split kernel.
I0222 13:35:00.049386 3296 opencl_base.cpp:85] Creating new Cycles device for OpenCL platform AMD Accelerated Parallel Processing, device Pitcairn.
Device init success
I0222 13:35:00.054700 3311 session.cpp:654] Requested features:
Experimental features: Off
Max closure count: 1
Max nodes group: 0
Nodes features: 0
Use hair: False
Use object motion: False
Use camera motion: False
Use Baking: False
Use Subsurface: False
Use Volume: False
Use Branched Integrator: False
Use Patch Evaluation: False
Use Transparent Shadows: False
I0222 13:35:00.054813 3311 opencl_util.cpp:285] OpenCL program base not found in cache.
I0222 13:35:00.087499 3311 opencl_util.cpp:285] Kernel file /home/cocoknight/.cache/cycles/kernels/cycles_kernel_base_4644B8F88DE6648FA08D3293FC292D81_40341E00E8FD162387DB90AE044524D8.clbin either doesn't exist or failed to be loaded by driver.
Compiling OpenCL program base
I0222 13:35:00.385466 3311 opencl_util.cpp:285] Build flags: -DNODES_MAX_GROUP=0 -DNODES_FEATURES=0 -DMAX_CLOSURE=1 -DNO_HAIR -DNO_OBJECT_MOTION -DNO_CAMERA_MOTION -DNO_BAKING -DNO_VOLUME -DNO_SUBSURFACE -DNO_BRANCHED_PATH -DNO_PATCH_EVAL -DNO_TRANSPARENT
I0222 13:35:00.385484 3311 opencl_util.cpp:312] Build options passed to clBuildProgram: '-cl-fast-relaxed-math -DKERNEL_OPENCL_AMD -DNODES_MAX_GROUP=0 -DNODES_FEATURES=0 -DMAX_CLOSURE=1 -DNO_HAIR -DNO_OBJECT_MOTION -DNO_CAMERA_MOTION -DNO_BAKING -DNO_VOLUME -DNO_SUBSURFACE -DNO_BRANCHED_PATH -DNO_PATCH_EVAL -DNO_TRANSPARENT'.
OpenCL build failed with error CL_INVALID_BUILD_OPTIONS, errors in console.
I0222 13:35:00.385749 3296 blender_session.cpp:562] Total render time: 0.375861
I0222 13:35:00.385771 3296 blender_session.cpp:563] Render time (without synchronization): 0.375861
Error: Failed loading render kernel, see console for errors

Saved session recovery to '/tmp/quit.blend'

Blender quit

Initially I was testing with the latest AMD-gpu driver but also on 15.10 because of the reason Fabian mentioned. I'll try the newest release of Ubuntu with amd-gpu when I get a chance. I have allot on my plate right now so it may be several days.

Sergey Sharybin (sergey) renamed this task from Blender 2.78 Ubuntu OpenCL Build Failed: see Errors in Console to Cycles OpenCL throws CL_INVALID_BUILD_OPTIONS on AMD R9 280x on Linux.Feb 22 2017, 2:45 PM
Sergey Sharybin (sergey) reopened this task as Open.

Ok, ignoring the crash report. For the future discussion please follow the issues which are related on CL_INVALID_BUILD_OPTIONS only. All other issues are to be reported separately.

Please also use file attachment instead of inlining logs into the comments. That will make discussion much easier to follow.

There you find few builds with various patches applied: http://download.blender.org/ftp/sergey/tmp/T49465/

Hopefully some of them will work. otherwise it's not much we can do about this -- the compilation is all done on driver side which we can not fix :(

Thanks Sergey

These builds all fail, I've tried with the 15.302 driver as well as with the 15.201 driver:

However I feel that there must be something you can do since I have a scenario where it is working, and that's using 2.78a with the workaround from T50269 applied and using the driver 15.201. Here's the --debug-cycles output of that:

However I feel that there must be something you can do since I have a scenario where it is working, and that's using 2.78a with the workaround from T50269 applied and using the driver 15.201. Here's the --debug-cycles output of that:

Hi, dear. 15.201 is too old... What the version of linux kernel you use to enable this version of fglrx? A you use any patches for dkms?

Hi Pavel

15.201 is working in the before mentioned scenario so it's not too old ;-)

This version of fglrx comes out of the box with ubuntu 15.10 when switching to the propietary drivers (there are actually two options for propietary drivers, and this is the updates version, so the other one is probably older).

No patches etc... it's all very standard and out-of-the-box.

Pavel (Metallikus) added a comment.EditedFeb 25 2017, 6:01 PM

I'm just build blender from src (git://git.blender.org/blender.git) and now cycles gpu render work for me.
What information can help you to fix this bug?

System summary:


Glxinfo:
CLinfo:
Blender --debug-cycles:

Cycles engine in blender edge (blender-2.78-6d1ac79514-linux-glibc219-x86_64) stiil no work:


Cycles engine in builded from src blender still works fine:
My CMakeLists.txt:
My CMakeCache.txt:

Ubuntu 16.04
Kernel: 4.8.0-36-generic x64
fglrx: 15.302 x64

Cycles engine in edge and src stiil no work on amdgpu-pro: T50761

If I install libjemalloc-dev and recompile blender, then cycles engine does not render over gpu.
If I build blender without libjemalloc-dev, then opencl rendering work fine.

I'm curious to see if it works for me as well with a compiled version of blender. It did not work for compiled 2.78b with fglrx 15.302, but I was yet unable to try with the version from git because there's always a compile error. Last time I tried I got an error at 100%:

../../lib/libbf_imbuf.a(anim_movie.c.o):anim_movie.c:function IMB_anim_absolute: error: undefined reference to 'avpicture_deinterlace'
collect2: error: ld returned 1 exit status

Do you guys know how to get around this?

The lastest working version on fglrx is 520b53364c73c75c4ff400d639dad13630f0e6fc
But only if it compliled with "WITH_MEM_JEMALLOC OFF" option

Version 97c4c2689fda8d1da8c98612b10dd6212764f067 also work, but need patch D2551 and "WITH_MEM_JEMALLOC OFF" option.

Thanks Pavel

I compiled 520b53364c73c75c4ff400d639dad13630f0e6fc with WITH_MEM_JEMALLOC=OFF and run it with fglrx 15.302 but cycles failed and blender crashed. Here's the --debug-cycles output:

Thanks Pavel

I compiled 520b53364c73c75c4ff400d639dad13630f0e6fc with WITH_MEM_JEMALLOC=OFF and run it with fglrx 15.302 but cycles failed and blender crashed. Here's the --debug-cycles output:

Try remove ~/.config/blender, uninstall mesa-opencl and build 9e566b06e3e10e2a6514ee09354abfe90c538284 with this config:

mesa-opencl is not installed, only mesa-common-dev. Do you want me to uninstall that?

No, only mesa-opencl-icd

I've followed your instruction except the mesa part ( since that's not installed), here's the --debug-cycles output:

Please test with latest master.

Thanks Aaron

I tested using the nightly build 5ce120b865, but I don't know if that's recent enough?

So with this build something similar to my tests on Feb 19 happened, but this time there was no successful render:
The first time I ran blender it got stuck in the kernel building process (I think), cancel didn't work and I had to forcefully reboot.
The second time I ran blender, the usual errors appeared.

I tried removing .cache/cycles but that folder does not exist, and I tried removing .config/blender but that had no effect, still the same errors.

I'm now compiling from the latest master to see if there's something different happening.

Meanwhile I'm open for any ideas to make blender work like the first time it ran once again, then I could test if it makes any difference when using only one gpu and a couple of other things...

Here's the output from the latest git build, though I feel like I might not be getting the best debug output because of the difference between the first run of blender and then afterwards, This might have a cross-version effect? So maybe this git version 59bb4ca is behaving as though it was not the firs run because I already run 5ce120b865?

This comment was removed by Martin Capitanio (capnm).
Aaron Carlisle (Blendify) raised the priority of this task from Incomplete to Normal.May 16 2017, 8:55 PM
Mai Lavelle (maiself) closed this task as Invalid.May 25 2017, 3:41 AM

Closing for a few reasons:

  • different people writing about different issues (please open separate reports)
  • use of old drivers / unsupported cards (we support GCN 2 or greater only)
  • lack of activity

If anyone is still having issues with up to date drivers on supported hardware please open a new report with detailed driver, gpu, system, and build info.