Author Topic: Build finished, but hangs ---> perpetual build  (Read 7923 times)

0 Members and 1 Guest are viewing this topic.

Tangled-Universe

  • World Machine Guru
  • ****
  • Posts: 66
    • View Profile
Build finished, but hangs ---> perpetual build
« on: July 16, 2011, 04:05:29 PM »
See attached image please.
The build is finished quickly but is never completed.
It does finish when I either lower resolution to 1025x1025 or when I decrease terrain size from 16x16 -> 8x8 km.

Unfortunately I do have this more than I do not :(
Maybe I should revert back to WM2.2...?

Martin
« Last Edit: July 17, 2011, 02:31:55 AM by Tangled-Universe »

jaf

  • World Machine Guru
  • ****
  • Posts: 142
    • View Profile
Re: Build finished, but hangs ---> perpetual build
« Reply #1 on: July 17, 2011, 05:02:40 PM »
Martin -- can you attach an example tmd?

Remnant

  • Author
  • World Machine Guru
  • *****
  • Posts: 2311
    • View Profile
    • http://www.world-machine.com/
Re: Build finished, but hangs ---> perpetual build
« Reply #2 on: July 19, 2011, 03:17:06 AM »
Is this repeatable at all for you? I have encountered this once so far but it was not reproducable and so shifted lower on the bug hunting list. Clicking "cancel" should still bring you out of the build dialog and have the build be complete.
-- Stephen Schmitt
- Creator of World Machine

Tangled-Universe

  • World Machine Guru
  • ****
  • Posts: 66
    • View Profile
Re: Build finished, but hangs ---> perpetual build
« Reply #3 on: July 19, 2011, 09:35:30 AM »
This tmd file shows the effect for me:

2049x2049 @ 16x16km builds in 35 sec.
2049x2049 @ 1x1km builds in ~200 sec.* but does not "complete" and keeps on building.

Apparently it still is complete and just by hitting cancel I can save the files, I didn't think of trying that, thanks Stephen :)

* Why is the build at smaller terrain size taking almost 6 times as long?

Hope this helps you solving the issue Stephen.

Cheers,
Martin

Tangled-Universe

  • World Machine Guru
  • ****
  • Posts: 66
    • View Profile
Re: Build finished, but hangs ---> perpetual build
« Reply #4 on: July 19, 2011, 04:03:01 PM »
It might be my machine, but I run into this problem every time I use WM2 now. Gets kind of annoying that the builds do not finish.
Pressing cancel and then F8 straight after it is "finished" to show the result does not always show the finished result I just figured out.
It looks like the when I wait a little longer with pressing cancel that the output looks finished.

jaf

  • World Machine Guru
  • ****
  • Posts: 142
    • View Profile
Re: Build finished, but hangs ---> perpetual build
« Reply #5 on: July 19, 2011, 07:09:58 PM »
I couldn't get it to hang, but it sure seems strange how long the 1km verses the 16km size makes.  I tried it on both x32 and x64 builds and it took around 23 minutes  :( for the 1km build and 3.5 minutes on the 16k x 16k on my old dual core AMD (most of it in erosion at 16 threads max.)

I guess it might be worth bypassing the erosion device and see if it hangs.  Maybe a threading problem? The erosion build says "100% complete"  but I wonder if it really is before the rest of the builds complete?  Pure speculation.  :lol:

[edit] Should have added "maybe setting the maximum worker threads to 1" and see if it still hangs.
« Last Edit: July 19, 2011, 08:53:03 PM by jaf »

Tangled-Universe

  • World Machine Guru
  • ****
  • Posts: 66
    • View Profile
Re: Build finished, but hangs ---> perpetual build
« Reply #6 on: July 20, 2011, 02:11:37 AM »
I also have this issue without using erosion, so it's not because of that filter.
I wonder why you couldn't get it to hang.
I'm afraid it's something in my system which doesn't go along very well.
Meh man, I have this everytime I use WM now. It's kind of unusable now :(

I will try and see what happens if I just use one worker thread.

jaf

  • World Machine Guru
  • ****
  • Posts: 142
    • View Profile
Re: Build finished, but hangs ---> perpetual build
« Reply #7 on: July 20, 2011, 11:51:27 AM »
I'm starting to suspect it's related to the speed of your computer (mine's relatively slow) and the timing of the Height Output builds (Stephen would have to address this.)  Since you said bypassing the erosion device doesn't help, that rules out the three Equalizers and attached Height Output devices.

I added three more Height Outputs to see if there is a certain combination that might cause the problem.  So far, nothing.

Stephen, is the build progress display correct?  What I mean is, it appears to be a serial process, in the order of the device listing top-to-bottom.  But when the Erosion device was not bypassed, I noticed the third Equalizer took .3 seconds and the other two took .1 seconds, even though they were identical.  Does each device absolutely have to be 100% complete before the next one starts to build?  I can remember the headaches we had in my old C programming days on large real-time systems with semaphores.  Maybe there's a "chicken or egg" thing here -- some debug code may help?

One thing I did notice, and it may be a display bug.  With the erosion device bypassed, I expected the Device Progress display to show "Unbuilt" as it does during the build process.  Instead, it switches to "Built" when building finishes (just the Erosion device.)  However, those three Equalizers and Height Outputs show (correctly, I believe) "Unbuilt."

Tangled-Universe

  • World Machine Guru
  • ****
  • Posts: 66
    • View Profile
Re: Build finished, but hangs ---> perpetual build
« Reply #8 on: July 21, 2011, 02:59:15 PM »
Thanks Jaf,

My system specs are:

i7-2600K @ stock speed
16 GB DDR3 1600MHz
Intel 510 SSD 120GB
Nvidia GTX570

If you would like me to debug things then I'm really happy to help.
Just let me know.

Cheers,
Martin

Remnant

  • Author
  • World Machine Guru
  • *****
  • Posts: 2311
    • View Profile
    • http://www.world-machine.com/
Re: Build finished, but hangs ---> perpetual build
« Reply #9 on: July 21, 2011, 03:29:27 PM »
Just an explanation of the longer erosion at small scales:

The erosion algorithm is adaptive; if an area is fairly level it will not waste much time trying to erode a flat plane for example, but an area with large differences in height will take more time*  More specifically, a terrain with lots of local minimas will complete faster than one without.

When you erode a small area of terrain, the terrain is unlikely to have many minimums, and those that exist get filled quickly, so the water flow ends up usually crossing the entire section of terrain. When eroding a large area of terrain, there exist many more minimums which conclude the flow faster.

All that said, one of the adaptive mechanisms seems to be have been too aggressive when scaling. I've relaxed it a bit; I'll be looking at the next beta carefully to see if it has any deleterious effects on erosion.
-- Stephen Schmitt
- Creator of World Machine

jaf

  • World Machine Guru
  • ****
  • Posts: 142
    • View Profile
Re: Build finished, but hangs ---> perpetual build
« Reply #10 on: July 22, 2011, 01:49:33 PM »
Thanks Jaf,

My system specs are:

i7-2600K @ stock speed
16 GB DDR3 1600MHz
Intel 510 SSD 120GB
Nvidia GTX570

If you would like me to debug things then I'm really happy to help.
Just let me know.

Cheers,
Martin

Thanks.  And that's a nice system you have -- been following your posts on the TG2 forums.

Tangled-Universe

  • World Machine Guru
  • ****
  • Posts: 66
    • View Profile
Re: Build finished, but hangs ---> perpetual build
« Reply #11 on: August 02, 2011, 12:27:36 PM »
Is it possible to bump this issue a bit up on the priority/bug list?

I have this issue with virtually everything I do in WM2.3 :(
Not only on finalizing builds/last nodes, but it also hangs on rebuilding a scene after adjustments.
It says it uses "current" advanced perlin etc., then it should combine for instance and there it hangs already, meanwhile terrace, erosion, etc. all still need to be computed.

I'm happy to run debuggers and what not to help pinpoint the issue.

Cheers,
Martin

Remnant

  • Author
  • World Machine Guru
  • *****
  • Posts: 2311
    • View Profile
    • http://www.world-machine.com/
Re: Build finished, but hangs ---> perpetual build
« Reply #12 on: August 03, 2011, 05:50:41 PM »
Hi Martin,

I'm still struggling to reproduce this at all locally.

Quick question: Turn "maximum builds at once" down to 1 in the preferences menu. This will allow devices to thread but only build a single device at a time. Does it still occur?


-- Stephen Schmitt
- Creator of World Machine