The International Simutrans Forum

 

Author Topic: Support Multi-cores?  (Read 4671 times)

0 Members and 1 Guest are viewing this topic.

fishgills

  • Guest
Support Multi-cores?
« on: April 05, 2010, 12:31:40 AM »
Anyway to have this game support Multi cpu cores in windows? Frustrating to watch it only use one core when I have three more it can use!

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: Support Multi-cores?
« Reply #1 on: April 05, 2010, 01:02:09 AM »
Simutrans only runs on a single core. And the latest statement on this issue from the developers (that I can remember) said that this will (and can) not change, as it would require to completely rewrite major parts of the code.

So feel free to give your other cores something else to do. Run winamp or whatever.

Offline vilvoh

  • One of the good guys
  • Administrator (Inactive)
  • *
  • Posts: 4504
  • I'm the constructor, the architect
    • Escala real
Re: Support Multi-cores?
« Reply #2 on: April 05, 2010, 07:35:47 AM »
I was wondering how many open source games have multi-core support. Indeed, how many commercial games for PC have multi-core support? I guess there aren't many, even for windows.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Support Multi-cores?
« Reply #3 on: April 05, 2010, 08:21:34 AM »
Multicore = parallelism. It makes little sense to split code paths that are entangled together.

Offline vilvoh

  • One of the good guys
  • Administrator (Inactive)
  • *
  • Posts: 4504
  • I'm the constructor, the architect
    • Escala real
Re: Support Multi-cores?
« Reply #4 on: April 05, 2010, 09:39:22 AM »
That feature must be hardcoded by developers or is there any compiler that creates multicore code automagically?
« Last Edit: April 05, 2010, 09:49:32 AM by vilvoh »

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Support Multi-cores?
« Reply #5 on: April 05, 2010, 10:19:22 AM »
Manually hardcoded (or prove me wrong & make me happy!)

Offline jonasbb

  • Web Team
  • *
  • Posts: 167
Re: Support Multi-cores?
« Reply #6 on: April 05, 2010, 10:38:49 AM »
Multicore = parallelism. It makes little sense to split code paths that are entangled together.
But you could split the view from the other parts.
The view can be parallel to the rest without any problems.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9586
  • Languages: De,EN,JP
Re: Support Multi-cores?
« Reply #7 on: April 05, 2010, 07:32:17 PM »
The view cannot easily be splitted from other parts, as it can be only done after every stuff has been moved. Thus the only part that is done in parallel is the 16 to 32 bit rendering.

Furthermore simutrans is usually not limited by the processor speed by rather by the memory bandwidth for very large maps. If you map is a GB size and well developed, at least 10% of it must pass through the processor each frame. Not cache could help here, and faster processing means only you are faster with waiting for data.

And finally, I have still see a savegame simutrans cannot handle, if compiled without debugging and all optimisations.

Offline KrazyJay

  • *
  • Posts: 172
  • Infrastructure & Transportation Junk
Re: Support Multi-cores?
« Reply #8 on: April 13, 2010, 06:41:06 PM »
With new multicore CPUs from Intel single cores can be boosted when the other cores are hibernated with a sort of turbo function resulting in much faster processing compared to older CPUs with similar advertised core speeds...