Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Bluefeild i7 Intel Processor  (Read 5797 times)

nordak

  • Bay Watcher
    • View Profile
Bluefeild i7 Intel Processor
« on: November 05, 2010, 09:48:54 pm »

Do you know what sucks about having so much power? Only being able to use 1/12th of the power due to no hyperthreading.  I hope that Toady will eventually implement hyperthreading, FPS death would be a thing of the past...

Just a mild rant...
Logged
Exerpt from townbrush.txt by Internet Kraken:

"Nobody wants to live in Townbrush, and for good reason. Almost everyone that has come to Townbrush has been eaten, stabbed, crushed, drowned, hacked, incinerated, or beaten to death with an octopre skin backpack. When we're not under siege, we're being attacked by Forgotten Beasts. And when we're not being attacked by Forgotten Beasts, there's probably a zombie whale crushing someone to death in the dining room."

Arkose

  • Bay Watcher
    • View Profile
Re: Bluefeild i7 Intel Processor
« Reply #1 on: November 05, 2010, 10:20:40 pm »

I doubt any threading, hyper or otherwise, is likely in the near term. Retrofitting complex single-threaded code to work with multiple threads is VERY difficult.
Logged

Nihilist

  • Bay Watcher
    • View Profile
Re: Bluefeild i7 Intel Processor
« Reply #2 on: November 06, 2010, 01:21:51 am »

DF - Time anomaly mode!
Logged

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Bluefeild i7 Intel Processor
« Reply #3 on: November 06, 2010, 01:25:57 am »

Intresting fact: Dwarf fortress is realy an evil ploy to try and make companys make more powerful processers, not just more of them in a single system.

Encased in burning magma

  • Bay Watcher
  • Nekkid
    • View Profile
Re: Bluefeild i7 Intel Processor
« Reply #4 on: November 06, 2010, 05:07:29 am »

I doubt any threading, hyper or otherwise, is likely in the near term. Retrofitting complex single-threaded code to work with multiple threads is VERY difficult.

No it's not. A for loop doing independant operations is not difficult to port on multiple threads. Such as, say, the pathfinding? Run DF with a sampling profiler: the pathfinding is eating most of the ressources.
Sure, it's not optimal, but it's rather quick to do, and could save a lot of time.
Logged
[MILL_CHILD:ONLY_IF_GOOD_REASON]

lordnincompoop

  • Bay Watcher
  • Allusionist
    • View Profile
Re: Bluefeild i7 Intel Processor
« Reply #5 on: November 06, 2010, 05:11:04 am »

I doubt any threading, hyper or otherwise, is likely in the near term. Retrofitting complex single-threaded code to work with multiple threads is VERY difficult.

No it's not. A for loop doing independant operations is not difficult to port on multiple threads. Such as, say, the pathfinding? Run DF with a sampling profiler: the pathfinding is eating most of the ressources.
Sure, it's not optimal, but it's rather quick to do, and could save a lot of time.

Then you should mention that in the Pathfinding thread, as you may have come up with a breakthrough. We've had dozens, if not hundreds of multithreading threads that, to be honest, led nowhere in particular because most forumites came to agreement that it was ridiculously hard for not enough gain, and Toady had more important stuff to do.

And I suggest you elaborate for added credibility.
Logged

Encased in burning magma

  • Bay Watcher
  • Nekkid
    • View Profile
Re: Bluefeild i7 Intel Processor
« Reply #6 on: November 06, 2010, 05:48:58 am »

I doubt any threading, hyper or otherwise, is likely in the near term. Retrofitting complex single-threaded code to work with multiple threads is VERY difficult.

No it's not. A for loop doing independant operations is not difficult to port on multiple threads. Such as, say, the pathfinding? Run DF with a sampling profiler: the pathfinding is eating most of the ressources.
Sure, it's not optimal, but it's rather quick to do, and could save a lot of time.

Then you should mention that in the Pathfinding thread, as you may have come up with a breakthrough. We've had dozens, if not hundreds of multithreading threads that, to be honest, led nowhere in particular because most forumites came to agreement that it was ridiculously hard for not enough gain, and Toady had more important stuff to do.

And I suggest you elaborate for added credibility.

If you have a compiler that uses, say, openmp, it's just a matter of adding a preprocessor instruction before the loop.
#pragma omp parallel for default(shared) private(i, j) or somesuch

That would, however, only work if the pathfinding calls are independent from each other. I don't know how his code works, so yeah.
But that was just an example: any for loop with independent operations can be optimised that way.
I had some benchmarks with matrix operations (for work): it doesn't go twice as fast, far from that (edit: nevermind, it does), but there is still a notable increase in speed (and that's with 2 cores). The increase gets better as the loop gets bigger. For very small loops, multithreading actually wastes time.

Graph is for 10*x  X 100 matrix transpositions. It's not very noticeable.


If you take the root of each element of a matrix however, multithreading it makes it run almost twice as fast.


Multiplication is also almost twice as fast for big matrixes (can't find the graph).
Multithreading addition actually slows down the program.

So if he uses euclidian distance, well, that part could go far faster.
« Last Edit: November 06, 2010, 06:15:25 am by Encased in burning magma »
Logged
[MILL_CHILD:ONLY_IF_GOOD_REASON]

lordnincompoop

  • Bay Watcher
  • Allusionist
    • View Profile
Re: Bluefeild i7 Intel Processor
« Reply #7 on: November 06, 2010, 06:35:59 am »

If it helps any, IIRC he uses Manhattan distance and lots of bitshifts.
Logged

Encased in burning magma

  • Bay Watcher
  • Nekkid
    • View Profile
Re: Bluefeild i7 Intel Processor
« Reply #8 on: November 06, 2010, 06:38:46 am »

If it helps any, IIRC he uses Manhattan distance and lots of bitshifts.

Ah, it would be far less effective then.
Logged
[MILL_CHILD:ONLY_IF_GOOD_REASON]

nordak

  • Bay Watcher
    • View Profile
Re: Bluefeild i7 Intel Processor
« Reply #9 on: November 06, 2010, 01:34:36 pm »

If anyone could come up with any Ideas as to where to start with porting to multi-threading, I could try to work on it. I have 2 weeks of downtime with nothing better to do.

If not just assigning different components to different threads... like say having path-finding on one processor and the rest of the game on another.
« Last Edit: November 06, 2010, 01:38:02 pm by nordak »
Logged
Exerpt from townbrush.txt by Internet Kraken:

"Nobody wants to live in Townbrush, and for good reason. Almost everyone that has come to Townbrush has been eaten, stabbed, crushed, drowned, hacked, incinerated, or beaten to death with an octopre skin backpack. When we're not under siege, we're being attacked by Forgotten Beasts. And when we're not being attacked by Forgotten Beasts, there's probably a zombie whale crushing someone to death in the dining room."

lordnincompoop

  • Bay Watcher
  • Allusionist
    • View Profile
Re: Bluefeild i7 Intel Processor
« Reply #10 on: November 06, 2010, 01:42:57 pm »

I'm pretty sure there's a pathfinding/multithreading thread somewhere in DF suggestions, so read that to make sure you're being useful and not reinventing the wheel or something.
Logged

Encased in burning magma

  • Bay Watcher
  • Nekkid
    • View Profile
Re: Bluefeild i7 Intel Processor
« Reply #11 on: November 06, 2010, 01:47:29 pm »

I'm pretty sure there's a pathfinding/multithreading thread somewhere in DF suggestions, so read that to make sure you're being useful and not reinventing the wheel or something.

Well what I suggested made no discernable improvements on additions and bitshifts, so yeah, nevermind.
Logged
[MILL_CHILD:ONLY_IF_GOOD_REASON]

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: Bluefeild i7 Intel Processor
« Reply #12 on: November 06, 2010, 01:55:51 pm »

I have tried to make something multithreaded that wasn't before.

it was not easy, and this was a project where it should have been easy.

on the other hand, I suck as a programmer, and if somebody who actually know what he was doing would take a shot at it, he'd probably do it easily, but I have crashed and burned.
Logged

nordak

  • Bay Watcher
    • View Profile
Re: Bluefeild i7 Intel Processor
« Reply #13 on: November 06, 2010, 02:58:29 pm »

No one but Toady and a few trustees have the source code. :(
Logged
Exerpt from townbrush.txt by Internet Kraken:

"Nobody wants to live in Townbrush, and for good reason. Almost everyone that has come to Townbrush has been eaten, stabbed, crushed, drowned, hacked, incinerated, or beaten to death with an octopre skin backpack. When we're not under siege, we're being attacked by Forgotten Beasts. And when we're not being attacked by Forgotten Beasts, there's probably a zombie whale crushing someone to death in the dining room."

lordnincompoop

  • Bay Watcher
  • Allusionist
    • View Profile
Re: Bluefeild i7 Intel Processor
« Reply #14 on: November 06, 2010, 03:01:39 pm »

No one but Toady and a few trustees have the source code. :(

It's just one trustee IIRC; Baughn, the resident code guru.
Logged
Pages: [1] 2