Logo by CorneliaYoder - Contribute your own Logo!
News: Visit the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. August 23, 2017, 01:45:18 PM


Login with username, password and session length



Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Render bucket size control for OpenCL  (Read 194 times)
0 Members and 1 Guest are viewing this topic.
lukesleftleg
Navigator
*****
Posts: 60


« on: July 29, 2017, 12:52:19 PM »

First of all, let me say what an impressive piece of software Mandelbulber v2 is becoming, and thank you to everyone who's been working on it.

I've been taking a bit of a break, but it looks like I chose the right time to get back into some fractals. The limited OpenCL support in the latest alpha is already producing some extremely impressive results on my machine. (I've finally managed to get around to having a proper explore of Spudsville. Still got lost though  grin).

Anyway, I'm happy to report that the OpenCL seems to be working perfectly well on my machine (Windows 10 64bit, GTX 780) as far as Mandelbulber goes, but I'm still running into a problem I had with the previous version (mentioned here). It seems that Windows itself has a time-out for GPU operations, and if part of a render takes too long, it crashes Mandelbulber with a message saying something like "Could not clear OpenCL queue". That's just from memory, I'll have to recreate the crash to get the exact text of the message which does need a very busy scene, or even just some small corner of a scene that's very busy.

In some other renderers, specifically ones that use render buckets rather than scanlines (like the OpenCL renderer), I've seen an option to change the size of the render bucket, usually just multiples of two - (16x16, 32x32, 64x64 etcetera). I'm wondering if something like that could help here. If I could render a scene in smaller buckets, it seems likely that Windows might time-out less often.

Would implementing a render bucket size control for OpenCL be a relatively trivial task, or would it be horribly complicated?
Logged
mclarekin
Fractal Senior
******
Posts: 1719



« Reply #1 on: July 30, 2017, 10:23:46 AM »

I will eave the bucket size issue to Buddhi

In the meantime, this could be a problem with the Windows time outs.

There is in one of Syntopia's blogs, some advice on editing the register to increase the timeout threshold,  which I have used successfully in the past for OpenCL.

I had a quick look but I can not find it, sad ,  but there is also similar advice at the windows site.
Logged
lukesleftleg
Navigator
*****
Posts: 60


« Reply #2 on: July 30, 2017, 11:47:04 AM »

Hi mclarekin, and thanks for the reply.

You've successfully changed the Windows time-outs? I can't seem to find it now, but I'm sure I read a post in the Fragmentarium forum that said this was a bad idea for reasons I can't remember.

I did find this from Syntopia though:

The GPU is completely locked until a frame render completes in Fragmentarium. (Which is why Windows just kills the display driver if a GPU operation takes too long - it cannot show a dialog asking if you want to stop the operation).

Theoretically, the new WDDM 1.2 driver model in Windows 8 supports GPU Pre-emption (multitasking as we know it from desktop OS'es), but I don't know if the Nvidia and AMD drivers implement this yet - I don't think so.

The only way to keep the OS responsive is by rendering smaller tiles.

But if you say you've changed the registry without issue, then I can certainly look into this. Thanks for the advice. smiley

I did try reducing the memory available to OpenCL, and that seemed the help in the old versions, but doesn't seem to make a difference here.

Also, I managed to recreate the crash. The exact text of the error is "Error: Cannot enqueue reading OpenCL output buffers". (If I then ask it to render again, it gives me that message followed by "Error: OpenCL command queue cannot be created!").

Anyway, sorry, I feel like I'm moaning when in fact I'm really impressed by what you guys have achieved here, not to mention grateful.
Logged
mclarekin
Fractal Senior
******
Posts: 1719



« Reply #3 on: July 30, 2017, 12:32:05 PM »

http://blog.hvidtfeldts.net/index.php/2011/12/fragmentarium-faq

is what i followed for the TDR registry thing.

But I am not sure if it will fix your problem, because with me the program was crashing, and windows would give me some sort of GPU error message

Logged
lukesleftleg
Navigator
*****
Posts: 60


« Reply #4 on: July 30, 2017, 05:30:16 PM »

Aha! That looks like it's just what I need actually.

Thanks very much. I'll have a good read of that.  smiley



Edit:

Hi mclarekin. That seems to have done it. Thanks very much for the link.
I've set both the TdrDelay and TdrDdiDelay keys to thirty seconds as the article advises, rebooted, and now the problem frames I had seem to be rendering just fine.

I also read something about how not using the GPU for displaying the Windows desktop doesn't cause the timeout to happen at all. Maybe I'll look into using my onboard video for the display when rendering overnight.

Anyway, thanks again for the advice. Much appreciated. smiley
« Last Edit: July 30, 2017, 06:17:44 PM by lukesleftleg » Logged
zebastian
Conqueror
*******
Posts: 115



« Reply #5 on: July 31, 2017, 07:50:43 PM »

btw i added an explanation to the handbook.
Here it is, see chapter "Trouble shooting OpenCL":
https://github.com/buddhi1980/mandelbulber_doc/releases/download/untagged-558def77623db40dbefd/handbook-compressed.pdf

This will be shipped with the next mandelbulber version...

Cheers
Logged
lukesleftleg
Navigator
*****
Posts: 60


« Reply #6 on: August 01, 2017, 12:05:38 PM »

Ahh perfect. Thanks zebastian. smiley

Oh and good call on adding "as decimal" to the values. That gave me pause when I set the registry keys.
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Dynamic bucket size IFS - Iterated Function Systems zephyrtronium 0 875 Last post October 28, 2011, 12:08:56 PM
by zephyrtronium
Image change with render size? Mandelbulb 3d MarkJayBee 6 1037 Last post March 15, 2012, 07:17:20 PM
by MindsEye
Render size vs. Animation size? Mandelbulb 3d Weber 3 1064 Last post September 20, 2013, 12:21:11 AM
by Sockratease
Render size vrs. amount of memory Mandelbulb 3d haltenny 2 1226 Last post December 15, 2014, 11:25:41 AM
by haltenny
Maximum render size Kalles Fraktaler Dinkydau 4 256 Last post February 16, 2017, 11:32:12 PM
by Dinkydau

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.394 seconds with 29 queries. (Pretty URLs adds 0.019s, 2q)