Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 3 4 [5] 6 7 ... 12

Author Topic: Multi-threading?  (Read 23788 times)

The-Moon

  • Bay Watcher
    • View Profile
Re: Multi-threading?
« Reply #60 on: December 17, 2009, 12:03:56 am »

Couldn't hurt for him to think about it tho and see if he could make it work ? :)

Thats kinda why i took the time to type it all out :)
« Last Edit: December 17, 2009, 12:06:38 am by The-Moon »
Logged
There is absolutely no time, to be taking time for granted. ~Busta Rhymes

profit

  • Bay Watcher
  • Finely Crafted Engravings... Or it didn't happen.
    • View Profile
Re: Multi-threading?
« Reply #61 on: December 17, 2009, 12:04:52 am »

He said he wont do multithreading, he will see the title on the the forum and skip this suggestion entirely without opening it...

* hate being a realist but least I can see things the way they are*

I know there are massive performance gains here, but all my arguments for multithreading just are to sharpen my debate skills, test my knowledge,  and provide entertainment in the form of a battle of wits.  Toady will almost certainly not read this thread, and even if he does he stated flat out he won't do it. ever...

Sorry =/
« Last Edit: December 17, 2009, 12:09:01 am by profit »
Logged
Mods and the best utilities for dwarf fortress
Community Mods and utilities thread.

The-Moon

  • Bay Watcher
    • View Profile
Re: Multi-threading?
« Reply #62 on: December 17, 2009, 12:11:23 am »

hehe he will have to change his mind at some point.
Logged
There is absolutely no time, to be taking time for granted. ~Busta Rhymes

assimilateur

  • Bay Watcher
    • View Profile
Re: Multi-threading?
« Reply #63 on: December 17, 2009, 12:25:45 am »

he stated flat out he won't do it. ever...

Can you provide us with a citation for that? I mean the thread(s), DF talk or other medium where he stated such.

I mean, I'll take your word for it, but I want to know his reasoning for being as adamantly opposed to multithreading as you claim he is.
Logged

jocan2003

  • Bay Watcher
    • View Profile
Re: Multi-threading?
« Reply #64 on: December 17, 2009, 12:26:15 am »

To the point he is i think it wuol dbe easier to simply create a *emulator* wich will run DF inside himself and split everything to both core, a bit like Dosbox emulator these old game. I dont know if its even possible to make a non-multicore support/multicore support preogram wich lpay a game withing hiself, but that would be 1 awesome, 2 easier to prgram than change the DF game.
Logged
Quote from: LoSboccacc
that was a luky dwarf. I had one dabbling surgeon fail so spectacularly that the patient skull flew a tile away from the table.
Quote from: NW_Kohaku
DF doesn't mold players into its image - DF merely selects those who were always ready for DF.
Quote from: Girlinhat
Minecraft UI is very simple. There's only so many ways you can implement "simple" without copying something. We also gonna complain that it uses WASD?

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: Multi-threading?
« Reply #65 on: December 17, 2009, 12:27:37 am »

Profit: Have you actually done any projects implementing functionality using GPGPU? Why suggest CUDA when it is very hardware specific, NVidia is no longer the top dog in GPU's. At all price points ATI offers better performance and also has the most powerful card on the market. OpenCL looks to be the only GPGPU project aiming to work on NVidia, ATI and other hardware. Maybe its my 20 years of experience making me a curmudgeon, but I have a hard time seeing an efficient way to handle most problems without being able to use a damn IF statement.

The-Moon: I have worked on a peer to peer live video streaming application featuring multiple redundant automatic failover, automatically recovery servers managing a flock of thousands of clients, who each share the stream to reduce load on media servers with advanced code obfuscation and without stripping DRM from the providers stream. I have been there, done that, its not a miracle. And to make it work effectively, each node still has to be multi-threaded to handle buffering I/O, processing messages and doing real work. If you think doing things in order is bad, wait till you have to wait on I/O, thousands of times more time spent waiting.
« Last Edit: December 17, 2009, 12:30:13 am by Nadaka »
Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.

Gertack

  • Bay Watcher
    • View Profile
Re: Multi-threading?
« Reply #66 on: December 17, 2009, 12:34:52 am »

Multi-threading isn't currently necessary as the game uses incredibly inefficient algorithms (a la big-O notation) and fixing those would speed up the game far more than having twice as many threads running the same inefficient algorithms.  Get two people to push a 2 ton rock or carry a 2 lb rock?

For examples, get 8 FPS by spawning 100,000 rocks at embark:
http://www.bay12games.com/forum/index.php?topic=46336.msg920957#msg920957

or take 4 hours for the Stocks screen to look at 500,000 stones:
http://www.bay12games.com/forum/index.php?topic=42167.0
Logged

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: Multi-threading?
« Reply #67 on: December 17, 2009, 03:24:24 am »

In that case, I think that people like me (and supposedly you as well) need to speak up to bring a certain detail to Toady's attention. Namely, that if improving the abysmal performance of this game isn't part of the "actual project", then I do not know what is. Piling feature upon feature is meaningless if the game all but grinds to a halt on most rigs and it takes ages to get anything done.

Of course, I'm pretty much repeating myself by now.

The venue for bringing community priorities to Toady's attention is Eternal Suggestion Voting.  He's going to be working through the top 10 ESV items after the upcoming release (along with sieges and Adv. Mode stuff).  "Improved Pathfinder" stands at #4 in that list, and it's likely to become a generalized performance item.  The upshot is that there's a good chance he'll make performance improvements (or at least try) within, I don't know, 6 months.
Logged

diriel

  • Bay Watcher
    • View Profile
Re: Multi-threading?
« Reply #68 on: December 17, 2009, 03:50:49 am »

The good news is, the pathfinder project is hard at work on path finding. It is possible that they could actually come up with something that Toady could actually use. They seem to be genuinely trying to generate a solution that Could Be Used by Toady. So who knows? Number 4 on that list might just get taken care of more quickly than many folks are anticipating!

Gary
Logged

assimilateur

  • Bay Watcher
    • View Profile
Re: Multi-threading?
« Reply #69 on: December 17, 2009, 04:03:56 am »

The good news is, the pathfinder project is hard at work on path finding. It is possible that they could actually come up with something that Toady could actually use. They seem to be genuinely trying to generate a solution that Could Be Used by Toady. So who knows? Number 4 on that list might just get taken care of more quickly than many folks are anticipating!

Gary

Thanks for the good news, mate.
Logged

profit

  • Bay Watcher
  • Finely Crafted Engravings... Or it didn't happen.
    • View Profile
Re: Multi-threading?
« Reply #70 on: December 17, 2009, 06:12:05 am »

Profit: Have you actually done any projects implementing functionality using GPGPU? Why suggest CUDA when it is very hardware specific, NVidia is no longer the top dog in GPU's.

Someone just said CUDA. And so I just used it as an example.

To the point he is i think it wuol dbe easier to simply create a *emulator* wich will run DF inside himself and split everything to both core, a bit like Dosbox emulator these old game. I dont know if its even possible to make a non-multicore support/multicore support preogram wich lpay a game withing hiself, but that would be 1 awesome, 2 easier to prgram than change the DF game.

You cannot emulate it. Sorry.
The instructions have to be designed so they can be parallel or they wont work except in a ludicrously specific exceptions..  The emulator itself could be highly parallel, but the program inside of it could never really run faster than it could outside the emulator.

he stated flat out he won't do it. ever...

Can you provide us with a citation for that? I mean the thread(s), DF talk or other medium where he stated such.

I mean, I'll take your word for it, but I want to know his reasoning for being as adamantly opposed to multithreading as you claim he is.
.

I am sorry I cannot, it is so old it is now forum legend.  This goes back a long time but if I recall the reason is he does not know, and does not want to take a year off DF to learn.   I am sorry it has just been too long, the only thing I remember is everyone said he was very firm on the point of no multithreading.

I have a reference by him on it though:  (Quick note, with a post date of 2006 means he probably has done all the optimizations he knows of)

I'm just not sure where to begin with this sort of thing, and things like multi-threading and so on, given that I have a giant mass of code that's currently being run in one sequence.  It seems like it would take a lot of effort to figure this out and the best ways to use it and so on, when I still have plenty of regular optimizations to take advantage of.

However in future of the fortress 4 He mentioned Threading Building blocks.  So he did at one point look into it. (http://www.threadingbuildingblocks.org/)

Yeah, I don't know if it was tbb or something else, but I've received some correspondence on a few threading applications that work at a small scale like that.  I haven't had a chance to look at anything yet.  After brief look I couldn't find a page that clearly spelled out what the requirements were in tbb for a non-commercial license.  I'm often in a grey area there, I think.
as a side note, the license  for that is here -> http://www.gnu.org/licenses/old-licenses/gpl-2.0.html  with the runtime exception listed here -> http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt01ch01s02.html

Being that links to it were on the about page on the website, featured fairly prominently he was probably looking at something else and just had TBB stuck in his mind for the forum post.

(The runtime exception means basicly if toady used TBB even though it is under the GPLv2 Public licence, he would NOT be forced to open his source for his program)


« Last Edit: December 17, 2009, 09:19:02 am by profit »
Logged
Mods and the best utilities for dwarf fortress
Community Mods and utilities thread.

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: Multi-threading?
« Reply #71 on: December 17, 2009, 09:15:22 am »

To the point he is i think it wuol dbe easier to simply create a *emulator* wich will run DF inside himself and split everything to both core, a bit like Dosbox emulator these old game. I dont know if its even possible to make a non-multicore support/multicore support preogram wich lpay a game withing hiself, but that would be 1 awesome, 2 easier to prgram than change the DF game.

Dosbox does not split old games across multiple cores for increased performance. Nothing does. Nothing can. If you can find a way to split arbitrary, compiled, complex code into multiple threads at run time with any kind of performance increase you could win a Nobel prize for fundamental ground-breaking research.
Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.

sproingie

  • Bay Watcher
    • View Profile
Re: Multi-threading?
« Reply #72 on: December 17, 2009, 10:47:16 am »

No Nobel in the CS field (or even Mathematics), but you'd win a Turing award for sure.  Theoretically, pure functional code can parallelize perfectly, since it can evaluate in any order, but in reality, even Haskell can't manage to pull off implicit parallelism except in some very contrived circumstances.  I also suspect DF's codebase is about as opposite to pure functional as it gets.

Mind you GPGPU code *is* pure functional, and highly constrained, so it does get the benefits of automatic parallelism, but it's simple data parallelism.  I wish I knew how useful that SIGGRAPH paper was, since it might make a nice project.  Know of any open source implementations of it floating around?

Some of the design theories floating around here are amusing to say the least.  All I have to say to people suggesting them is, write up a proof of concept and show the benefit.
Logged
Toady is the man who Peter Molyneux wishes he was

Quote from: ToadyOne
dragon pus was like creamy gold. Infect and collect!

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: Multi-threading?
« Reply #73 on: December 17, 2009, 12:04:58 pm »

he stated flat out he won't do it. ever...

Can you provide us with a citation for that? I mean the thread(s), DF talk or other medium where he stated such.

I mean, I'll take your word for it, but I want to know his reasoning for being as adamantly opposed to multithreading as you claim he is.
.

I am sorry I cannot, it is so old it is now forum legend.  This goes back a long time but if I recall the reason is he does not know, and does not want to take a year off DF to learn.   I am sorry it has just been too long, the only thing I remember is everyone said he was very firm on the point of no multithreading.

It's a false forum legend.  We have a shit ton of those around here.  Don't spread it.  He's never been enthusiastic about the idea but he's also never, to my knowledge, flat-out said it won't happen.
Logged

assimilateur

  • Bay Watcher
    • View Profile
Re: Multi-threading?
« Reply #74 on: December 17, 2009, 12:11:55 pm »

He's never been enthusiastic about the idea but he's also never, to my knowledge, flat-out said it won't happen.

I hope you're right. You know what we could use? For Toady to show up in this thread so we hear something definite about his stance straight from the horse's mouth.

EDIT: Having some grammar-related blackouts today
Logged
Pages: 1 ... 3 4 [5] 6 7 ... 12