(Solved) OpenCL issues since release 2.17

  • 11 Replies
  • 434 Views

0 Members and 1 Guest are viewing this topic.

Offline piotrv

  • *
  • Fractal Friend
  • **
  • Posts: 10
« on: April 19, 2019, 07:17:56 PM »
After the wonderful release of 2.16 around last Xmas, I got OpenCL issues since 2.17 with NVIDIA driver:

Either I get:

Cannot finish reading OpenCL output buffers
Calculation probably took too long and triggered timeout error in graphic driver


or Mandelbulber crashes completely, even worse that I have to kill the desktop window manager and restart it.  :(

This occurs only with the more complex fractals, such as hybrid.
Already when loading in preview.

I minimized the job size multiplier and reduced the memory limit.
This doesn't make any difference

I compiled the source code and tested on the latest Ubuntu LTS and Arch Linux, both release 2.17 and 2.18-dev from the git repo
I have not tested > 2.16 yet on AMD GPU

For the moment I stick with release 2.16 which is working great for me with OpenCL rendering . . .


Linkback: https://fractalforums.org/mandelbulber/14/opencl-issues-since-release-2-17/2760/
« Last Edit: April 25, 2019, 04:59:04 PM by piotrv »

Offline batjorge

  • *
  • Fractal Friend
  • **
  • Posts: 12
  • Fractal Crusader
« Reply #1 on: April 20, 2019, 05:59:51 PM »
log says:
PID: 12311, time: 0.177030639, Directory already exists, value = /home/piotrek/.mandelbulber/
PID: 12311, time: 0.177086022, Directory already exists, value = /home/piotrek/mandelbulber/

I use antergos linux (arch) and always had issues when compiling a new version due to the folders.
Try renaming (or deleting) ~/mandelbulber and ~./.mandelbulber folders.
After it, make a clean install.
It worked for me time ago, hope it helps.

Offline mclarekin

  • *
  • Fractal Frankfurter
  • *
  • Posts: 603
« Reply #2 on: April 21, 2019, 01:56:34 AM »
Quote
Cannot finish reading OpenCL output buffers
Calculation probably took too long and triggered timeout error in graphic driver

Please provide a settings file that works in V2.16  but not in V2.17.  I can not test openCL in linux but there are plenty of users at the Mandelbulber Facebook group who can try to reproduce problem.

Yes, it is more likely to happen with hybrids, but some Effects will also create a very long computation.

In winOS it "probably" means that the registry TDR limit has been hit, (but i had thought this was not a problem in linux?).

Offline mclarekin

  • *
  • Fractal Frankfurter
  • *
  • Posts: 603
« Reply #3 on: April 21, 2019, 02:15:10 AM »


 I will make an issue at Github.

 Warning: libpng warning: iCCP: known incorrect sRGB profile (:0,
« Last Edit: April 21, 2019, 02:26:09 AM by mclarekin »

Offline Tas_mania

  • *
  • Fractal Friar
  • *
  • Posts: 122
    • West Tamar Talk
« Reply #4 on: April 21, 2019, 03:26:21 AM »
line 95 of your log file "opencl_memory_limit 440;"
That seems too low.
You have eight cores but how much video ram?

Offline piotrv

  • *
  • Fractal Friend
  • **
  • Posts: 10
« Reply #5 on: April 22, 2019, 11:30:20 AM »
@batjorge
I am afraid my issue has no relation with the new data structure since release 2.10.
It makes no difference it I remove the 2.16 init files.

I tested with the same (hybrid) fractal formula, both on Ubuntu and Arch, with the same hardware and slightly different nvidia opencl client driver:

Arch
 ICD loader Version                             2.2.12
 ICD loader Profile                              OpenCL 2.2

Ubuntu
 ICD loader Version                             2.2.11
 ICD loader Profile                              OpenCL 2.1

(see clinfo in attached file)

The laptops' GPU hardware is limited and complex rendering can be relatively slow, but still, I have no issues with release 2.16, as I have with 2.17 and 2.18-dev :

Ubuntu  Mandelbulber 2.17 +
Code: [Select]
Warning: libpng warning: iCCP: known incorrect sRGB profile

((null):0, (null))

Critical: OpenCl ERROR:  "CommandQueue::finish() - read buffers"  ( -36 )
(../src/opencl_engine.cpp:80, static bool cOpenClEngine::checkErr(cl_int, QString))

Error: Cannot finish reading OpenCL output buffers
Calculation probably took too long and triggered timeout error in graphics driver.
Critical: OpenCl ERROR:  "CommandQueue::enqueueWriteBuffer(...) for z-buffer"  ( -5 )
(../src/opencl_engine.cpp:80, static bool cOpenClEngine::checkErr(cl_int, QString))

Error: Cannot enqueue writing OpenCL z-buffer
Critical: OpenCl ERROR:  "Context::Context()"  ( -2 )
(../src/opencl_hardware.cpp:350, static bool cOpenClHardware::checkErr(cl_int, QString))

Error: OpenCL context cannot be created!
Segmentation fault (core dumped)

Arch  Mandelbulber 2.17 +
Code: [Select]
Warning: libpng warning: iCCP: known incorrect sRGB profile
((null):0, (null))

Critical: OpenCl ERROR:  "CommandQueue::finish() - read buffers"  ( -36 )
(../src/opencl_engine.cpp:80, static bool cOpenClEngine::checkErr(cl_int, QString))

Error: Cannot finish reading OpenCL output buffers
Calculation probably took too long and triggered timeout error in graphics driver.
Critical: OpenCl ERROR:  "program->build()"  ( -5 )
(../src/opencl_engine.cpp:80, static bool cOpenClEngine::checkErr(cl_int, QString))

Error: Error during compilation of OpenCL program
Device #0

Also it seems the calculated Total Time for rendering is occasionally  incorrect  (I guess it wrongly shows only time for last operation, f.e. effect blur ???)
Last, it may be subjective, but render time takes longer with 2.17 from my own experience . . .

Offline Tas_mania

  • *
  • Fractal Friar
  • *
  • Posts: 122
    • West Tamar Talk
« Reply #6 on: April 23, 2019, 02:50:34 AM »
Thats interesting piotrv. I use Ubuntu 18.04 on a PC and my clinfo does not have an ICD loader. Your clinfo loads OpenCL version 1.1 which I found does not work with Mandelbulber 17. Maybe the loader just loads and the OpenCL version is what counts?
You need OpenCL 1.2.
I don't know if your laptop has drivers for that.
At least you can render with no OpenCL :)

Offline mclarekin

  • *
  • Fractal Frankfurter
  • *
  • Posts: 603
« Reply #7 on: April 23, 2019, 10:28:57 AM »
Yes  1.2 is needed,   

But why did  v2.16  work and v2.17 will not? Different drivers?  Something to do with the multi-Gpu implementation in v2.17? I will prompt Buddhi

Offline buddhi

  • *
  • Fractal Friar
  • *
  • Posts: 116
    • Mandelbulber GitHub repository
« Reply #8 on: April 23, 2019, 04:54:38 PM »
Can you paste settings file which causes this problem? Please also send mandelbulber_218.ini file.

Offline piotrv

  • *
  • Fractal Friend
  • **
  • Posts: 10
« Reply #9 on: April 25, 2019, 04:54:59 PM »
I believe I have found a work around  ;D

I guessed my issue had to do with video memory allocation.

The NVIDIA GPU  hardware of my laptop is limited and though around 450MiB total memory is dedicated,  the max memory allocation should be 128MiB.
Working DRAM memory is shared with the CPU ?

Code: [Select]
inxi -Gxzc0
Graphics:  Device-1: NVIDIA GF119M [NVS 4200M] vendor: Dell driver: nvidia v: 390.116 bus ID: 01:00.0
           Display: x11 server: X.Org 1.20.4 driver: nvidia resolution: 1920x1200~60Hz
           OpenGL: renderer: NVS 4200M/PCIe/SSE2 v: 4.6.0 NVIDIA 390.116 direct render: Yes
mhwd -li
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
    video-nvidia-390xx            2018.08.09               false            PCI

clinfo --human

  Platform Name                                   NVIDIA CUDA
  Platform Vendor                                 NVIDIA Corporation
  Platform Version                                OpenCL 1.2 CUDA 9.1.84

  Address bits                                        64, Little-Endian
  Global memory size                              474152960 (452.2MiB)
  Error Correction support                        No
  Max memory allocation                           134217728 (128MiB)
 Platform Name                                    NVIDIA CUDA

Number of devices                                 1
  Device Name                                     NVS 4200M
  Device Vendor                                   NVIDIA Corporation
  Device Vendor ID                                0x10de
  Device Version                                  OpenCL 1.1 CUDA
  Driver Version                                  390.116
  Device OpenCL C Version                         OpenCL C 1.1
  Device Type                                     GPU
  Device Topology (NV)                            PCI-E, 01:00.0
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Max compute units                               1
  Max clock frequency                             1480MHz
  Compute Capability (NV)                         2.1

This memory limit of around 128MiB was already suggested by Mandelbulber (how nice !)
So I limited the OpenCL memory allocation size in Mandelbulber to 127MiB.
I recompiled release 2.17 and 2. 18  and now even with hybrid fractals, I do not notice any OpenCL issues anymore, hurrah !   :)

Still, it is confusing whether or not OpenCL 1.2 is mandatory since release 2.17. 
My nividia hardware seems to support only OpenCL 1.1  :confused:
Also, why didn't I have this issue with release 2.16 ?

Though it is nice to have the laptops' Intel i7 with 4 cores x 2 threads as a solid fallback, even this "old" nvidia GPU is considerable faster in rendering, so I am happy to have this OpenCL issue sorted out.

Thanks everyone for the support and suggestions !!
« Last Edit: April 25, 2019, 05:13:28 PM by piotrv »

Offline claude

  • *
  • 3f
  • ******
  • Posts: 1272
    • mathr.co.uk
« Reply #10 on: April 25, 2019, 04:58:38 PM »
OpenCL is a bit confusing, there is the platform version (you have 1.2) and and device version (you have 1.1) and C version (you have 1.1).  Not sure which one matters most...

Offline piotrv

  • *
  • Fractal Friend
  • **
  • Posts: 10
« Reply #11 on: April 25, 2019, 05:09:55 PM »
Can you paste settings file which causes this problem? Please also send mandelbulber_218.ini file.

I attached my mandelbulber_218.ini
Issue has been resolved my limiting OpenCL max memory allocation to 128MiB   :yes: (see my post above)
This was not needed in release 2.16  ?


xx
"Time Span"

Started by cricke49 on Fractal Image Gallery

0 Replies
355 Views
Last post August 02, 2018, 07:05:21 AM
by cricke49
question
[Solved] Color interpolation

Started by galac on Programming

5 Replies
310 Views
Last post March 02, 2019, 09:03:11 AM
by mclarekin
xx
OpenCL double precision in release 2.2.13

Started by piotrv on Mandelbulber

11 Replies
591 Views
Last post April 16, 2018, 02:58:42 PM
by mclarekin
xx
Birdie Style

Started by gannjondal on Fractal Image Gallery

1 Replies
415 Views
Last post May 08, 2018, 02:39:37 PM
by who8mypnuts
clip
Neural Style Transfer with Fractal Art

Started by reallybigname on Other Artforms

1 Replies
187 Views
Last post July 20, 2019, 04:25:41 PM
by reallybigname