OpenCL Error

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
CodeHD
Posts: 397
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

OpenCL Error

Post by CodeHD » Fri Jul 31, 2020 4:07 pm

Using yesterday's daily build of BlendLuxCore on Win10.

I just had an error with OpenCL trying to render an animation.

It ran fine for 57 frames, then aborted on frame 58. Only rotating objects in the scene, no light changes etc.

error below, full console output for frame 58 attached.
Won't be relevant for me (I hope) since I'm trying to switch to Optix, but perhaps you still need to fix it for others.

Blend-file is quite large, let me know if you need it for testing.

Code: Select all

Traceback (most recent call last):
  File "C:\Users\johannes\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\BlendLuxCore-daily\engine\base.py", line 86, in render_final
    final.render(self, depsgraph)
  File "C:\Users\johannes\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\BlendLuxCore-daily\engine\final.py", line 48, in render
    _render_layer(engine, depsgraph, statistics, layer)
  File "C:\Users\johannes\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\BlendLuxCore-daily\engine\final.py", line 153, in _render_layer
    engine.framebuffer.draw(engine, engine.session, depsgraph.scene, render_stopped=False)
  File "C:\Users\johannes\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\BlendLuxCore-daily\draw\final.py", line 71, in draw
    self._width, self._height, combined.as_pointer(), False, True)
RuntimeError: OpenCL driver API error (code: -4, file:D:\a\1\Luxcore\src\luxrays\devices\ocldevice.cpp, line: 313): CL_MEM_OBJECT_ALLOCATION_FAILURE

ERROR: OpenCL driver API error (code: -4, file:D:\a\1\Luxcore\src\luxrays\devices\ocldevice.cpp, line: 313): CL_MEM_OBJECT_ALLOCATION_FAILURE

[LuxCore][3272.657] [GeForce RTX 2070 OpenCLIntersect] Memory used for hardware image pipeline: 56700Kbytes
Error: OpenCL driver API error (code: -4, file:D:\a\1\Luxcore\src\luxrays\devices\ocldevice.cpp, line: 313): CL_MEM_OBJECT_ALLOCATION_FAILURE

User avatar
Dade
Developer
Posts: 4817
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: OpenCL Error

Post by Dade » Fri Jul 31, 2020 4:28 pm

It looks like a memory leak, can you check the system reported amount of GPU memory during the renderings.
Support LuxCoreRender project with salts and bounties

CodeHD
Posts: 397
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Re: OpenCL Error

Post by CodeHD » Fri Jul 31, 2020 4:44 pm

Indeed, there is about a 100MB increase per frame, at 1920x1080 resolution.

CodeHD
Posts: 397
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Re: OpenCL Error

Post by CodeHD » Fri Jul 31, 2020 4:58 pm

The problem seems to be gone with Optix enabled.

CodeHD
Posts: 397
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Re: OpenCL Error

Post by CodeHD » Sat Aug 15, 2020 8:39 pm

There have been a few reports of this on the discord server in the last days. People reporting Blender crash when doing animations. In those cases it was the combination of Nvidia GPU and OpenCL. I can also confirm it with an RTX 2070 as well as GTX 765M (i.e. across several GPU generations).

1.) I wanted to give feedback if you get similar support requests, especially for 2.4 where OCL is the default.

2.) For BlendLuxCore: this could be incorporated into the existing "improve CUDA/Optix default settings" topic

3.) For LuxCore It's probably the usual question: Bug or Driver?

User avatar
Dade
Developer
Posts: 4817
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: OpenCL Error

Post by Dade » Sun Aug 16, 2020 4:44 pm

Do you have a (simple) test animation to replicate problem ?
Support LuxCoreRender project with salts and bounties

CodeHD
Posts: 397
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Re: OpenCL Error

Post by CodeHD » Sun Aug 16, 2020 5:45 pm

The default cube already shows it, scene set up with halt conditions attached.

On my laptop now it's about 20MB per frame, so maybe you have to wait a minute or two to notice it. I don't have access to the scene that suffered 100MB per scene right now.
Attachments
oclleak.zip
(91.32 KiB) Downloaded 23 times

User avatar
Dade
Developer
Posts: 4817
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: OpenCL Error

Post by Dade » Mon Aug 17, 2020 12:05 pm

I should have fixed the problem.
Support LuxCoreRender project with salts and bounties

Post Reply