Spring is running in SMP
Moderator: Moderators
Re: Spring is running in SMP
well, those assumptions are what they are, if you want lupsmanager on GML, it'll be easier to change the widget than the engine. just saying.
Re: Spring is running in SMP
So the gl calls only need to be moved to non synced code for this to work?
nice :)
nice :)
Code: Select all
for i=1,#allPlayers do
local playerName = Spring.GetPlayerInfo(allPlayers[i])
if (playerName == "[LCC]jK") then
local errorLog = Lups.GetErrorLog(1)
if (errorLog~="") then
local cmds = {
"say ------------------------------------------------------",
"say LUPS: jK is here! Sending error log (so he can fix your problems):",
}
--// the str length is limited with "say ...", so we split it
for line in errorLog:gmatch("[^\r\n]+") do
cmds[#cmds+1] = "say " .. line
end
cmds[#cmds+1] = "say ------------------------------------------------------"
Spring.SendCommands(cmds)
end
break
end
end
Re: Spring is running in SMP
Yep, simple as that. No OpenGL in Sim plz.
That said, this problem with incompatible widgets is indeed fixable, but
* it would mean added complexity
* it might have negative effect on performance
* there is no "portable" way of doing it --> separate coding for linux/windows
So, as I see it, it is much better to fix the widgets than the engine. Relatively few widgets have a problem.
That said, this problem with incompatible widgets is indeed fixable, but
* it would mean added complexity
* it might have negative effect on performance
* there is no "portable" way of doing it --> separate coding for linux/windows
So, as I see it, it is much better to fix the widgets than the engine. Relatively few widgets have a problem.
Re: Spring is running in SMP
+1Beherith wrote:This smp build is made of pure and epic win!
The frame rate is no longer tied to the cpu for me, and I can move up to 3000 core vamps around on dsd while still maintaining 20 fps if they are all in full view. Also, if they are not in view, my fps pop back up to 80! This is with quite high gfx settings.
Oh rite, and turning off threaded optimization gave me another 50% boost. So turning that off is essential.
I also tripled FPS with this multicore build.. from 7 to 21 with 1500 corvamp. Keep on good work :)
EDIT: how is triple gain even possible? From what i understand max theoretical gain should 2 times faster execution, not 3 times ?
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Re: Spring is running in SMP
Really only by replacing your EXE? LUPS still enabled? I should give it a try TODAY if so...ginekolog wrote: EDIT: how is triple gain even possible? From what i understand max theoretical gain should 2 times faster execution, not 3 times ?
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Spring is running in SMP
Maybe you have three cores and you don't know it.ginekolog wrote:+1Beherith wrote:This smp build is made of pure and epic win!
The frame rate is no longer tied to the cpu for me, and I can move up to 3000 core vamps around on dsd while still maintaining 20 fps if they are all in full view. Also, if they are not in view, my fps pop back up to 80! This is with quite high gfx settings.
Oh rite, and turning off threaded optimization gave me another 50% boost. So turning that off is essential.
I also tripled FPS with this multicore build.. from 7 to 21 with 1500 corvamp. Keep on good work :)
EDIT: how is triple gain even possible? From what i understand max theoretical gain should 2 times faster execution, not 3 times ?
-
- Spring Developer
- Posts: 1254
- Joined: 24 Jun 2007, 08:34
Re: Spring is running in SMP
Maybe you disabled LUPS, which alone causes my fps to rise by a factor of 2 with 1500 corvamps.ginekolog wrote:+1Beherith wrote:This smp build is made of pure and epic win!
The frame rate is no longer tied to the cpu for me, and I can move up to 3000 core vamps around on dsd while still maintaining 20 fps if they are all in full view. Also, if they are not in view, my fps pop back up to 80! This is with quite high gfx settings.
Oh rite, and turning off threaded optimization gave me another 50% boost. So turning that off is essential.
I also tripled FPS with this multicore build.. from 7 to 21 with 1500 corvamp. Keep on good work :)
EDIT: how is triple gain even possible? From what i understand max theoretical gain should 2 times faster execution, not 3 times ?
Re: Spring is running in SMP
Lups is disabled on both cases as behe suggested in this post:
http://springrts.com/phpbb/viewtopic.php?f=1&t=19338
I enabled lups now on MT with 1500 corvamp, but FPS droped to 12 (10-15) and speed reduced to 0.71. For now i wont use lups and will try to see what happens in real big games.
I still dont understaned why i get 3 times more fps
.. its same widgets as i have 2 exes (MT and ST) in same folder.
http://springrts.com/phpbb/viewtopic.php?f=1&t=19338
I enabled lups now on MT with 1500 corvamp, but FPS droped to 12 (10-15) and speed reduced to 0.71. For now i wont use lups and will try to see what happens in real big games.
I still dont understaned why i get 3 times more fps

Re: Spring is running in SMP
The theoretical maximum is equal to the highest framerate that the CPU core on which the rendering thread executes can produce (together with your GPU) given the scene. Since Spring is mostly CPU-limited, most of the CPU time is actually taken up by the simulation part in the ST builds when there are hundreds of units in play. That's why the jump is so large.ginekolog wrote: EDIT: how is triple gain even possible? From what i understand max theoretical gain should 2 times faster execution, not 3 times ?
Re: Spring is running in SMP
That makes sense. If simulation took 50% of single core before and rendering was left with 50% i got 7FPS. But now sim still takes 50% on single core but i get 50% + 2 x 50% because of dual core? ROX :)
I am not tocuhing ST version again if this works rockstable
I am not tocuhing ST version again if this works rockstable

Re: Spring is running in SMP
Unfortunately not all mods/games are compatible yet.ginekolog wrote:I am not tocuhing ST version again if this works rockstable
Re: Spring is running in SMP
i say dump incompatible mods/games as the work to make em compatible is heaps easier the write the enginen to support olde bahaviour.Das Bruce wrote:Unfortunately not all mods/games are compatible yet.ginekolog wrote:I am not tocuhing ST version again if this works rockstable
MT spring is sothng we have waitedsnethe era of HT/dulcore cpu:s and should be migrated to as soon as possible. This does not break backwards compatibility, it only needs a few coders looking thru lua code and make it non-gml calling.
Multithred/core has been here for ages, theres no reason to maintain pre atholn x2:s for sacrificing this much performance boost. MAKE SPRING MULTiTHREADED BY DEFAULT
Re: Spring is running in SMP
I wasn't making any suggestion to the contrary. It was just an observation.
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Re: Spring is running in SMP
I tried two games with MT. One worked flawlessly, the other one freezed after 5min ingame (no infolog sorry).
But I can freeze the MT-build reproducable by starting spring.exe, Commander-Script, Map Tropical (probably any other will "work" too). Then "/cheat" and "/give all". While spawning the stuff, spring completely locks up for me. Tested on two different machines (XP SP3 and Vista SP1).
But I can freeze the MT-build reproducable by starting spring.exe, Commander-Script, Map Tropical (probably any other will "work" too). Then "/cheat" and "/give all". While spawning the stuff, spring completely locks up for me. Tested on two different machines (XP SP3 and Vista SP1).
Re: Spring is running in SMP
widgets that spam error can cause freeze. Just got freeze for using iceui after 30 mins of spectating. I disabled it now and will test more.
ps: i hate freezes.
ps: i hate freezes.
Re: Spring is running in SMP
Try the debug MT version. If it still freezes, make a bug report.
If it does not, you still have a bad widget - read the infolog.
If it does not, you still have a bad widget - read the infolog.
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Re: Spring is running in SMP
Tried with debug version and figured out its LUPS' fault. No problems with disabled LUPS and LUPS Manager. Sorry, my fault. I guess thats the reason why Beherith said turn it off 
Will give it another try in real games soon...

Will give it another try in real games soon...
Re: Spring is running in SMP
Debug version is good as it showed which widgets were failing. After disabling LUPS manager and ICEUI this MT ver works awsome.. tested in 4 mp games and many single.zerver wrote:Try the debug MT version. If it still freezes, make a bug report.
If it does not, you still have a bad widget - read the infolog.
thanx for effort.
Re: Spring is running in SMP
im tried this solution - http://springrts.com/phpbb/viewtopic.ph ... 35#p358435 - but i still have an error on build:
gcc 4.4.0
is there any chance to build smp client on linux?
Code: Select all
[ 16%] Building CXX object rts/lib/CMakeFiles/gml.dir/gml/gml.cpp.o
In file included from /home/dugi/test/src/spring_0.79.1.2/rts/Rendering/GL/myGL.h:11,
from /home/dugi/test/src/spring_0.79.1.2/rts/Sim/Projectiles/Projectile.h:3,
from /home/dugi/test/src/spring_0.79.1.2/rts/Sim/Projectiles/FireProjectile.h:4,
from /home/dugi/test/src/spring_0.79.1.2/rts/lib/gml/gml.cpp:1118:
/home/dugi/test/src/spring_0.79.1.2/rts/lib/gml/gml.h:47: error: conflicting declaration 'gmlItemSequenceServer<unsigned int, int, GLuint (**)(GLsizei)> gmlListServer'
/home/dugi/test/src/spring_0.79.1.2/rts/lib/gml/gml.cpp:710: error: 'gmlListServer' has a previous declaration as 'gmlItemSequenceServer<unsigned int, int, GLuint (*)(GLsizei)> gmlListServer'
is there any chance to build smp client on linux?
Re: Spring is running in SMP
Yeah, still a bug it seems.DuGi wrote:gcc 4.4.0
is there any chance to build smp client on linux?
Look for the declaraion
and change the double pointer "**" to a pointer "*"extern gmlItemSequenceServer<GLuint, GLsizei,GLuint (**)(GLsizei)> gmlListServer;