Multithreading

Hi,

afaik WM2 supports multithreading - but it seems to only use two threads. I run Worldmachine on WinXP64 Dual Quadcore so I hoped to see eight threads used during generation.

Did I get something wrong?

best,
Walli
P.S Congrats on this release, I really love the new features!

did you go into prefrences, build options and change it from to 2 to the number you wanted?

Yes you need to go into prefs. Also, some (a handful of) devices just won’t multi thread- erosion does for sure- it’s vastly faster.

monks

oh, missed that option completly, thanks for opening my eyes!

Yes, make sure you adjust the thread allocation in preferences for your system!

Normal builds have a limited ability to use multiple threads – only certain devices are internally threaded, and although devices can be built in parallel where possible, this often introduces memory issues at high res as well if you’re not using the 64bit version.

Multi-threading comes into its own on the 64bit edition where memory is no longer an issue, as well as doing Tiled builds and working in Layout view.

Memory is still a problem in 64bit - when you run out of virtual as well as physical RAM! :smiley:

You can’t really run out of memory except you use more than I believe 32GB (XPx64) or 8-128GB on Vista (depending on your version).

Two things can happen:
a) Your page file is too small.-> Out of memory error. Solution… increase page file to values you believed before were insane.
b) You create a file where wm has to process more data at a time than free physical ram. Like having 2 threads each processing a Erosion device on a 8192² terrain would fill at least 2GB of ram. So if you only got 2GB physical memory and XP already takes, say 256MB ;D, then there’s one heightfield that just can’t be held in memory. That leads to disk swapping which massively slows down the building process. (disk access is about 100times slower than ram access)

But I think tiled builds can massively reduce those problems.

Also what Remnant said, WM2(pro) will only use multiple threads when it can. If you just have a daisy-chain of nodes you won’t get much/any benefit because each node needs to wait on the last to finish before it can begin, but if you have a lot of branching with them coming back together at some point, each “branch” pretty much gets its own thread. Or so it seems.

Some devices are internally multithreading enabled. Most importantly Erosion.