Little to no OOS as long as the number of pipeline threads is reduced to 1 in the global defines XML (as that code has some non deterministic behavior in the order that units are created which unfortunately influences the unit IDs and therefore causes OOS).hello good people of c2c,
i wish to know if c2c has oos in it under multiplayer - mostly direct ip.
thank you in advance and a good weekend.
An approach to multithreading the city (and city AI) processing that Koshling added to C2C.ohh how nice ,
whats a pipeline ?
thank you for the fats answer aiandy!
CvPipeline* CvPlayer::createCityTurnPipeline()
{
SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo);
DWORD numCPU = sysinfo.dwNumberOfProcessors;
int iMaxThreads = std::max(1, ((int)numCPU / 2));
int iThreads = (GC.getGameINLINE().isGameMultiPlayer() ? 1 : std::min(iMaxThreads, std::max(1, 1 + getNumCities() / 8)));
CvPipeline* pResult = new CvPipeline(iThreads);
...
Is there a reason C2C hasn't pulled in my change to auto-update the pipeline threads based on Cores present and whether the game is in MP? There is zero reason or excuse for making players fiddle with XML to make MP work.
Edit: Code included, below
Code:CvPipeline* CvPlayer::createCityTurnPipeline() { SYSTEM_INFO sysinfo; GetSystemInfo(&sysinfo); DWORD numCPU = sysinfo.dwNumberOfProcessors; int iMaxThreads = std::max(1, ((int)numCPU / 2)); int iThreads = (GC.getGameINLINE().isGameMultiPlayer() ? 1 : std::min(iMaxThreads, std::max(1, 1 + getNumCities() / 8))); CvPipeline* pResult = new CvPipeline(iThreads); ...
The MP part of your change is OK for C2C but for the SP we need to change your code.
C2C is bloated like hell and needs more PipelineThreads compared with AND, everything below 4 is slower on my system.
AND is different because after reducing PipelineThreads from 4 to 2 it was faster.
Are hyperthreading "cores" counted or or has anybody tested if HT is good/bad for the number of pipelines used?
Hyperthreading cores are counted by the system as individual cores. I have a quad core i7 with hyperthreading, my core count reported by the windows API call above is 8.
Was that the reason for numCPU / 2 ?
I have only a quad core i5 without hyperthreading that means only two cores are used by AND at the moment.
That and also consider that just because a system has 4 cores, does not mean all 4 cores are usable to every application. Consider that the OS is likely to use resources as well, plus any background applications. I think I might change it to numCPU -1 instead of / 2 but the idea still stands.
Aside from the cores (which I set) what's the correct way to do things for a multiplayer, direct IP connection game when it comes to setting up BUG and the revDCM settings?