LuxCoreRender / BlendLuxCore

Blender Integration for LuxCore
GNU General Public License v3.0
740 stars 92 forks source link

RuntimeError: OpenCL driver API error CL_DEVICE_NOT_FOUND #827

Open EntityinArray opened 1 year ago

EntityinArray commented 1 year ago

Hello, thank you for this amazing render engine! This error shows up when rendering:

ERROR: OpenCL driver API error (code: -1, file:/home/vsts/work/1/s/LinuxCompile/LuxCore/src/luxrays/devices/ocldevice.cpp, line: 89): CL_DEVICE_NOT_FOUND

Traceback (most recent call last):
  File "/home/entityinarray/.config/blender/3.5/scripts/addons/BlendLuxCore/engine/viewport.py", line 76, in view_update
    engine.session = engine.exporter.create_session(depsgraph, context, engine=engine)
  File "/home/entityinarray/.config/blender/3.5/scripts/addons/BlendLuxCore/export/__init__.py", line 253, in create_session
    return pyluxcore.RenderSession(renderconfig)
RuntimeError: OpenCL driver API error (code: -1, file:/home/vsts/work/1/s/LinuxCompile/LuxCore/src/luxrays/devices/ocldevice.cpp, line: 89): CL_DEVICE_NOT_FOUND

.blend file: blend.zip

Steps to reproduce:

  1. Launch blender
  2. Enter rendered view on the default scene

Tried:

  1. Renaming /etc/OpenCL/vendors/mesa.icd to mesa.icd.old and rebooted, same error.

Screenshots or rendered images: image

Error message from Blender console:

Read prefs: /home/entityinarray/.config/blender/3.5/config/userpref.blend
Failed to open dir (No such file or directory): /run/user/1000/gvfs/
Registered nodes
BlendLuxCore 2.61alpha registered (with pyluxcore 2.6)
Traceback (most recent call last):
  File "/home/entityinarray/.config/blender/3.5/scripts/addons/BlendLuxCore/handlers/load_post.py", line 67, in handler
    scene.luxcore.devices.update_devices_if_necessary()
  File "/home/entityinarray/.config/blender/3.5/scripts/addons/BlendLuxCore/properties/devices.py", line 41, in update_devices_if_necessary
    device_props = self.get_device_props()
  File "/home/entityinarray/.config/blender/3.5/scripts/addons/BlendLuxCore/properties/devices.py", line 108, in get_device_props
    return pyluxcore.GetOpenCLDeviceDescs()
RuntimeError: OpenCL driver API error (code: -1, file:/home/vsts/work/1/s/LinuxCompile/LuxCore/src/luxrays/devices/ocldevice.cpp, line: 89): CL_DEVICE_NOT_FOUND

Read blend: /home/entityinarray/Desktop/blend.blend
Traceback (most recent call last):
  File "/home/entityinarray/.config/blender/3.5/scripts/addons/BlendLuxCore/handlers/load_post.py", line 67, in handler
    scene.luxcore.devices.update_devices_if_necessary()
  File "/home/entityinarray/.config/blender/3.5/scripts/addons/BlendLuxCore/properties/devices.py", line 41, in update_devices_if_necessary
    device_props = self.get_device_props()
  File "/home/entityinarray/.config/blender/3.5/scripts/addons/BlendLuxCore/properties/devices.py", line 108, in get_device_props
    return pyluxcore.GetOpenCLDeviceDescs()
RuntimeError: OpenCL driver API error (code: -1, file:/home/vsts/work/1/s/LinuxCompile/LuxCore/src/luxrays/devices/ocldevice.cpp, line: 89): CL_DEVICE_NOT_FOUND

==================================================
[Engine/Viewport] New session
[Exporter] Creating session
[SDL][8.551] Define ImageMap: NamedObject
[SDL][8.551] Camera type: perspective
[SDL][8.551] Camera position: Point[14.7279, -6.5051, 8.01803]
[SDL][8.551] Camera target: Point[13.9091, -6.14344, 7.57225]
[SDL][8.551] Camera clipping plane disabled
WARNING: Material "Material": Missing node tree
[SDL][8.552] Material definition: 139906305326856
[SDL][8.552] Scene objects count: 1
[SDL][8.552] Light definition: 139906308831240
[SDL][8.552] Light definition: __WORLD_BACKGROUND_LIGHT__
[LuxCore][8.564] Configuration: 
[LuxCore][8.564]   path.pathdepth.total = 7
[LuxCore][8.564]   path.pathdepth.diffuse = 5
[LuxCore][8.564]   path.pathdepth.glossy = 5
[LuxCore][8.564]   path.pathdepth.specular = 6
[LuxCore][8.564]   path.hybridbackforward.enable = 0
[LuxCore][8.564]   path.hybridbackforward.partition = 0.8
[LuxCore][8.564]   path.hybridbackforward.glossinessthreshold = 0.049
[LuxCore][8.564]   rtpathcpu.zoomphase.size = 4
[LuxCore][8.564]   rtpathcpu.zoomphase.weight = 0
[LuxCore][8.564]   renderengine.type = "RTPATHCPU"
[LuxCore][8.564]   sampler.type = "RTPATHCPUSAMPLER"
[LuxCore][8.564]   film.width = 1586
[LuxCore][8.564]   film.height = 855
[LuxCore][8.564]   film.filter.type = "NONE"
[LuxCore][8.564]   film.filter.width = 1.5
[LuxCore][8.564]   lightstrategy.type = "LOG_POWER"
[LuxCore][8.564]   scene.epsilon.min = 1e-05
[LuxCore][8.564]   scene.epsilon.max = 0.1
[LuxCore][8.564]   path.albedospecular.type = "REFLECT_TRANSMIT"
[LuxCore][8.564]   path.albedospecular.glossinessthreshold = 0.05
[LuxCore][8.564]   film.opencl.enable = 0
[LuxCore][8.564]   path.forceblackbackground.enable = 0
[LuxCore][8.564]   renderengine.seed = 1
[LuxCore][8.564]   film.outputs.0.type = "RGB_IMAGEPIPELINE"
[LuxCore][8.564]   film.outputs.0.index = 0
[LuxCore][8.564]   film.outputs.0.filename = "RGB_IMAGEPIPELINE_0.png"
[LuxCore][8.564]   film.outputs.1.type = "ALBEDO"
[LuxCore][8.564]   film.outputs.1.filename = "ALBEDO.exr"
[LuxCore][8.564]   film.outputs.2.type = "AVG_SHADING_NORMAL"
[LuxCore][8.564]   film.outputs.2.filename = "AVG_SHADING_NORMAL.exr"
[LuxCore][8.564]   film.imagepipelines.000.0.type = "NOP"
[LuxCore][8.564]   film.imagepipelines.000.1.type = "TONEMAP_LINEAR"
[LuxCore][8.564]   film.imagepipelines.000.1.scale = 1
[LuxCore][8.564]   film.imagepipelines.000.radiancescales.0.enabled = 1
[LuxCore][8.564]   film.imagepipelines.000.radiancescales.0.globalscale = 1
[LuxCore][8.564]   film.imagepipelines.000.radiancescales.0.rgbscale = 1 1 1
[LuxCore][8.564]   batch.haltspp = 0 0
[LuxCore][8.564]   batch.halttime = 0
[LuxCore][8.564] File Name Resolver Configuration: 
Export took 0.0 s
[LuxCore][8.564] Film resolution: 1586x855
[SDL][8.565] Film output definition: RGB_IMAGEPIPELINE [image.png]
[SDL][8.565] Image pipeline: film.imagepipelines.000
[SDL][8.565] Image pipeline step 0: NOP
[SDL][8.565] Image pipeline step 1: TONEMAP_LINEAR
[SDL][8.565] Film output definition: RGB_IMAGEPIPELINE [RGB_IMAGEPIPELINE_0.png]
[SDL][8.565] Film output definition: ALBEDO [ALBEDO.exr]
[SDL][8.565] Film output definition: AVG_SHADING_NORMAL [AVG_SHADING_NORMAL.exr]
[LuxRays][8.565] OpenCL support: enabled
[LuxRays][8.565] OpenCL Platform 0: Clover
[LuxRays][8.565] OpenCL Platform 1: rusticl
ERROR: OpenCL driver API error (code: -1, file:/home/vsts/work/1/s/LinuxCompile/LuxCore/src/luxrays/devices/ocldevice.cpp, line: 89): CL_DEVICE_NOT_FOUND

Traceback (most recent call last):
  File "/home/entityinarray/.config/blender/3.5/scripts/addons/BlendLuxCore/engine/viewport.py", line 76, in view_update
    engine.session = engine.exporter.create_session(depsgraph, context, engine=engine)
  File "/home/entityinarray/.config/blender/3.5/scripts/addons/BlendLuxCore/export/__init__.py", line 253, in create_session
    return pyluxcore.RenderSession(renderconfig)
RuntimeError: OpenCL driver API error (code: -1, file:/home/vsts/work/1/s/LinuxCompile/LuxCore/src/luxrays/devices/ocldevice.cpp, line: 89): CL_DEVICE_NOT_FOUND

clinfo output:

Number of platforms                               2
  Platform Name                                   Clover
  Platform Vendor                                 Mesa
  Platform Version                                OpenCL 1.1 Mesa 23.1.0
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd
  Platform Extensions function suffix             MESA

  Platform Name                                   rusticl
  Platform Vendor                                 Mesa/X.org
  Platform Version                                OpenCL 3.0 
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd cl_khr_il_program
  Platform Extensions with Version                cl_khr_icd                                                       0x400000 (1.0.0)
                                                  cl_khr_il_program                                                0x400000 (1.0.0)
  Platform Numeric Version                        0xc00000 (3.0.0)
  Platform Extensions function suffix             MESA
  Platform Host timer resolution                  0ns

  Platform Name                                   Clover
Number of devices                                 1
  Device Name                                     AMD Radeon Graphics (renoir, LLVM 15.0.7, DRM 3.52, 6.3.4-zen1-1-zen)
  Device Vendor                                   AMD
  Device Vendor ID                                0x1002
  Device Version                                  OpenCL 1.1 Mesa 23.1.0
  Device Numeric Version                          0x401000 (1.1.0)
  Driver Version                                  23.1.0
  Device OpenCL C Version                         OpenCL C 1.1 
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Max compute units                               8
  Max clock frequency                             2000MHz
  Max work item dimensions                        3
  Max work item sizes                             256x256x256
  Max work group size                             256
=== CL_PROGRAM_BUILD_LOG ===
fatal error: cannot open file '/usr/share/clc/gfx909-amdgcn-mesa-mesa3d.bc': No such file or directory
  Preferred work group size multiple (kernel)     <getWGsizes:1504: create kernel : error -46>
  Preferred / native vector sizes                 
    char                                                16 / 16      
    short                                                8 / 8       
    int                                                  4 / 4       
    long                                                 2 / 2       
    half                                                 0 / 0        (n/a)
    float                                                4 / 4       
    double                                               2 / 2        (cl_khr_fp64)
  Half-precision Floating-point support           (n/a)
  Single-precision Floating-point support         (core)
    Denormals                                     No
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 No
    Round to infinity                             No
    IEEE754-2008 fused multiply-add               No
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  No
  Double-precision Floating-point support         (cl_khr_fp64)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
  Address bits                                    64, Little-Endian
  Global memory size                              7269498880 (6.77GiB)
  Error Correction support                        No
  Max memory allocation                           1817374720 (1.693GiB)
  Unified memory for Host and Device              No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       32768 bits (4096 bytes)
  Global Memory cache type                        None
  Image support                                   No
  Local memory type                               Local
  Local memory size                               65536 (64KiB)
  Max number of constant args                     16
  Max constant buffer size                        67108864 (64MiB)
  Max size of kernel argument                     1024
  Queue properties                                
    Out-of-order execution                        No
    Profiling                                     Yes
  Profiling timer resolution                      0ns
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
    ILs with version                              SPIR-V                                                           0x400000 (1.0.0)
  Built-in kernels with version                   (n/a)
  Device Extensions                               cl_khr_byte_addressable_store 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_fp64 cl_khr_extended_versioning
  Device Extensions with Version                  cl_khr_byte_addressable_store                                    0x400000 (1.0.0)
                                                  cl_khr_global_int32_base_atomics                                 0x400000 (1.0.0)
                                                  cl_khr_global_int32_extended_atomics                             0x400000 (1.0.0)
                                                  cl_khr_local_int32_base_atomics                                  0x400000 (1.0.0)
                                                  cl_khr_local_int32_extended_atomics                              0x400000 (1.0.0)
                                                  cl_khr_int64_base_atomics                                        0x400000 (1.0.0)
                                                  cl_khr_int64_extended_atomics                                    0x400000 (1.0.0)
                                                  cl_khr_fp64                                                      0x400000 (1.0.0)
                                                  cl_khr_extended_versioning                                       0x400000 (1.0.0)

  Platform Name                                   rusticl
Number of devices                                 0

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  Clover
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [MESA]
  clCreateContext(NULL, ...) [default]            Success [MESA]
  clCreateContext(NULL, ...) [other]              
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
    Platform Name                                 Clover
    Device Name                                   AMD Radeon Graphics (renoir, LLVM 15.0.7, DRM 3.52, 6.3.4-zen1-1-zen)
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
    Platform Name                                 Clover
    Device Name                                   AMD Radeon Graphics (renoir, LLVM 15.0.7, DRM 3.52, 6.3.4-zen1-1-zen)
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  Success (1)
    Platform Name                                 Clover
    Device Name                                   AMD Radeon Graphics (renoir, LLVM 15.0.7, DRM 3.52, 6.3.4-zen1-1-zen)

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.3.1
  ICD loader Profile                              OpenCL 3.0

OS: Arch Linux x64 Blender version: 3.5.1 LuxCore version: latest 7deee59

Thank you for your work, please let me know if any additional info is needed

zERO123331 commented 4 months ago

i have this problem too on all luxcore versions i tried