Bay 12 Games Forum

Please login or register.

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

Author Topic: Dual/Multi core support...  (Read 4665 times)

nordak

  • Bay Watcher
    • View Profile
Re: Dual/Multi core support...
« Reply #15 on: November 06, 2010, 02:09:12 pm »

+BUMP+

I'm going to start looking into multithreading this game.  No promises, I don't know if I'll make it back out sane...
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."

thijser

  • Bay Watcher
  • You to cut down a tree in order to make an axe!
    • View Profile
Re: Dual/Multi core support...
« Reply #16 on: November 06, 2010, 02:42:02 pm »

Has anybody tried to use a simmulator to make df work in multicore yet?
Logged
I'm not a native English speaker. Feel free to point out grammar/spelling mistakes. This way I can learn better English.

G-Flex

  • Bay Watcher
    • View Profile
Re: Dual/Multi core support...
« Reply #17 on: November 06, 2010, 02:43:41 pm »

+BUMP+

I'm going to start looking into multithreading this game.  No promises, I don't know if I'll make it back out sane...

Er, how? You can't magically parallelize a game that isn't programmed to run in a multithreaded fashion. You can't perform miracles, nor do you even have the source code.

Has anybody tried to use a simmulator to make df work in multicore yet?

I'm not sure how you think this would work, but you can't do that. Short story: It just doesn't work that way.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

thijser

  • Bay Watcher
  • You to cut down a tree in order to make an axe!
    • View Profile
Re: Dual/Multi core support...
« Reply #18 on: November 06, 2010, 02:47:38 pm »

+BUMP+

I'm going to start looking into multithreading this game.  No promises, I don't know if I'll make it back out sane...

Er, how? You can't magically parallelize a game that isn't programmed to run in a multithreaded fashion. You can't perform miracles, nor do you even have the source code.

Has anybody tried to use a simmulator to make df work in multicore yet?

I'm not sure how you think this would work, but you can't do that. Short story: It just doesn't work that way.

There are programs that are able to "fool" your system into thinking it's 2 4 or 8 cores are really one. This is of course at a great loss of performance but it could be usefull to research for df.
Logged
I'm not a native English speaker. Feel free to point out grammar/spelling mistakes. This way I can learn better English.

G-Flex

  • Bay Watcher
    • View Profile
Re: Dual/Multi core support...
« Reply #19 on: November 06, 2010, 02:49:34 pm »

No, it wouldn't. You aren't getting the point.

It doesn't matter if you "fool" your system into thinking it has 16 cores. Hell, it doesn't matter if your system actually has 16 cores. DF will still only run on one.


DF won't run in a parallelized fashion, period.

Also, fooling your computer into thinking your single-core CPU has two cores won't make anything actually run in parallel, even multithreaded programs, because you still only have one actual core to work with.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

Brightgalrs

  • Bay Watcher
    • View Profile
Re: Dual/Multi core support...
« Reply #20 on: November 06, 2010, 02:53:16 pm »

Quote
There are programs that are able to "fool" your system into thinking it's 2 4 or 8 cores are really one. This is of course at a great loss of performance but it could be usefull to research for df.
Quote
No, it wouldn't. You aren't getting the point.

It doesn't matter if you "fool" your system into thinking it has 16 cores. Hell, it doesn't matter if your system actually has 16 cores. DF will still only run on one.


DF won't run in a parallelized fashion, period.

Also, fooling your computer into thinking your single-core CPU has two cores won't make anything actually run in parallel, even multithreaded programs, because you still only have one actual core to work with.
Epic fail.
Logged

G-Flex

  • Bay Watcher
    • View Profile
Re: Dual/Multi core support...
« Reply #21 on: November 06, 2010, 02:54:40 pm »

You got me. I thought he was talking about the exact opposite.


However, it still doesn't matter, and for the same reasons. If your computer has 4 cores, nothing you do will cause a single-threaded application to be run on multiple cores truly in parallel, because the program simply isn't parallelized. There is nothing you can really do to change that.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile
Re: Dual/Multi core support...
« Reply #22 on: November 06, 2010, 03:18:57 pm »

Unlike hyperthreading, multicore and multiprocessor systems actually have more total processing power in multiple cores than in one. So, hypothetically, it is still possible to let the multiple cores function as one, by performing the data processing equivalent of current alternation. This would most certainly only reach its full potential when implemented in hardware, as a function of the mainboard/BIOS. But not impossible. In fact, I believe there already exist some mainboards and processors with that functionality.
Logged
Multiworld Madness Archive:
Game One, Discontinued at World 3.
Game Two, Discontinued at World 1.

"Europe has to grow out of the mindset that Europe's problems are the world's problems, but the world's problems are not Europe's problems."
- Subrahmanyam Jaishankar, Minister of External Affairs, India

thijser

  • Bay Watcher
  • You to cut down a tree in order to make an axe!
    • View Profile
Re: Dual/Multi core support...
« Reply #23 on: November 06, 2010, 03:30:28 pm »

What I'm talking about is basically this:
1 The required calculations are loaded into a program
2 The program has a amout of treads that is the same as the amout of cores you have.
3 The program runs the needed calculations (it probably works best on low fps as it allows most calculations to be put into the program at the same time).
4 The output of the program is used to calculate what happens in df.

Now this wouldn't work for all program because most programs want to have all calculations done after eachother however as df syncs in frames it could work, at least in theory.

Most basic thing I know about computer: everything is passble.
Logged
I'm not a native English speaker. Feel free to point out grammar/spelling mistakes. This way I can learn better English.

G-Flex

  • Bay Watcher
    • View Profile
Re: Dual/Multi core support...
« Reply #24 on: November 06, 2010, 03:48:36 pm »

Unlike hyperthreading, multicore and multiprocessor systems actually have more total processing power in multiple cores than in one.

It doesn't matter if you can't actually run instructions on multiple cores simultaneously.

What I'm talking about is basically this:
1 The required calculations are loaded into a program
2 The program has a amout of treads that is the same as the amout of cores you have.
3 The program runs the needed calculations (it probably works best on low fps as it allows most calculations to be put into the program at the same time).
4 The output of the program is used to calculate what happens in df.

Now this wouldn't work for all program because most programs want to have all calculations done after eachother however as df syncs in frames it could work, at least in theory.

Most basic thing I know about computer: everything is passble.

This is not how programming works. An iterative program like DF consists of a set of instructions which are to be carried out sequentially. You cannot just break up that list of instructions however you want, try to run groups of them simultaneously, and expect it to work. That's the equivalent of taking a cake recipe, handing out each step to a different person, having them do them all at the same time, and expecting the result to turn out the same but faster.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

Soralin

  • Bay Watcher
    • View Profile
Re: Dual/Multi core support...
« Reply #25 on: November 06, 2010, 05:43:20 pm »

Unlike hyperthreading, multicore and multiprocessor systems actually have more total processing power in multiple cores than in one.

It doesn't matter if you can't actually run instructions on multiple cores simultaneously.

What I'm talking about is basically this:
1 The required calculations are loaded into a program
2 The program has a amout of treads that is the same as the amout of cores you have.
3 The program runs the needed calculations (it probably works best on low fps as it allows most calculations to be put into the program at the same time).
4 The output of the program is used to calculate what happens in df.

Now this wouldn't work for all program because most programs want to have all calculations done after eachother however as df syncs in frames it could work, at least in theory.

Most basic thing I know about computer: everything is passble.

This is not how programming works. An iterative program like DF consists of a set of instructions which are to be carried out sequentially. You cannot just break up that list of instructions however you want, try to run groups of them simultaneously, and expect it to work. That's the equivalent of taking a cake recipe, handing out each step to a different person, having them do them all at the same time, and expecting the result to turn out the same but faster.
You sort of can, with some checks in place, in fact individual cores already do some of this, although trying to extend it to multiple processors rather than it being done directly in hardware, might end up being a bit slow. See for example:

http://en.wikipedia.org/wiki/Instruction_level_parallelism
http://en.wikipedia.org/wiki/Out-of-order_execution
Logged

G-Flex

  • Bay Watcher
    • View Profile
Re: Dual/Multi core support...
« Reply #26 on: November 06, 2010, 05:53:56 pm »

You have a point, but that's still only done on a very low level and isn't nearly the kind of parallelism offered by actually threading a program properly.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

Brightgalrs

  • Bay Watcher
    • View Profile
Re: Dual/Multi core support...
« Reply #27 on: November 06, 2010, 11:31:43 pm »

Quote
You got me. I thought he was talking about the exact opposite.
It happens.  :P
Logged

thijser

  • Bay Watcher
  • You to cut down a tree in order to make an axe!
    • View Profile
Re: Dual/Multi core support...
« Reply #28 on: November 07, 2010, 01:11:00 am »

You have a point, but that's still only done on a very low level and isn't nearly the kind of parallelism offered by actually threading a program properly.

Yes but say that we have 4 cores and we lose 60% performance in the procces then we still have a speed up.
Logged
I'm not a native English speaker. Feel free to point out grammar/spelling mistakes. This way I can learn better English.

G-Flex

  • Bay Watcher
    • View Profile
Re: Dual/Multi core support...
« Reply #29 on: November 07, 2010, 02:07:45 am »

That's assuming all four cores are working at capacity. It's also assuming that the benefit would outweigh whatever overhead is involved, and that it would work properly to begin with. I honestly don't know enough to say, but neither do you.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==
Pages: 1 [2] 3 4