View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0004445 | Spring engine | General | public | 2014-06-18 08:54 | 2014-06-24 17:32 | ||||
Reporter | malric | ||||||||
Assigned To | jK | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 97.0.1+git | ||||||||
Target Version | 98.0 | Fixed in Version | |||||||
Summary | 0004445: Detection of number of hardware cores is broken | ||||||||
Description | Currently the detection of number of hardware cores is broken as it relies on a field that instead represents the maximum number of cores per physical package. For more info see://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-2a-manual.pdf, page 220 of the pdf: Bits 23-16: Maximum number of addressable IDs for logical processors in this physical package In the thread at https://software.intel.com/en-us/forums/topic/287414 some code is mentioned that should solve the problem (which I think is also used in 0ad). Same/similar code is also found at https://github.com/0ad/0ad/blob/457c40559f90356d8d7c4e1542830c6e24075077/source/lib/sysdep/arch/x86_x64/topology.cpp | ||||||||
Steps To Reproduce | 1) Start spring on an affected processor 2) infolog.txt will contain "Warning: Set ThreadPool workers to 4, but there are just 1 cores!" | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
malric (reporter) 2014-06-18 08:56 |
I am investigating for a patch, as I can reproduce this. @jk: can you please comment why you choose to use cpuid? I can use it, but the code is a bit big/complex, and, at least on Linux I think (but did not check extensively) it would be very similar to what information is provided in /proc/cpuinfo. |
jK (developer) 2014-06-18 11:54 |
cause there is no boost function and it is portable (Linux, Windows, OSX) |
malric (reporter) 2014-06-18 13:44 |
Ok, will continue with cpuid implementation then. |
malric (reporter) 2014-06-19 22:54 |
Update: I managed to make the detection working as expected on Linux (tested on a couple of systems), but still need to take into account some corner cases, integrate the code into spring, make it work on windows (and I have no dev env setup yet) and make a patch. |
malric (reporter) 2014-06-22 23:14 Last edited: 2014-06-23 00:30 |
Sent pull request at: https://github.com/spring/spring/pull/109 Edit: think there is a merge conflict (first time doing this in github, so need to sort this out). Edit2: sorted out the code, updated pull request. Tested on i7 (4 real cores, 8 with HT) and Core2 duo (2 real cores). Tested on both Linux and Win7 (on the i7). |
jK (developer) 2014-06-24 17:32 |
merged big thanks :D |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2014-06-18 08:54 | malric | New Issue | |
2014-06-18 08:56 | malric | Note Added: 0013293 | |
2014-06-18 11:54 | jK | Note Added: 0013296 | |
2014-06-18 13:44 | malric | Note Added: 0013297 | |
2014-06-19 21:25 | abma | Target Version | => 98.0 |
2014-06-19 22:54 | malric | Note Added: 0013304 | |
2014-06-22 23:14 | malric | Note Added: 0013317 | |
2014-06-22 23:19 | malric | Note Edited: 0013317 | View Revisions |
2014-06-23 00:30 | malric | Note Edited: 0013317 | View Revisions |
2014-06-24 17:30 | jK | Changeset attached | => spring develop 53b93263 |
2014-06-24 17:32 | jK | Note Added: 0013347 | |
2014-06-24 17:32 | jK | Status | new => resolved |
2014-06-24 17:32 | jK | Resolution | open => fixed |
2014-06-24 17:32 | jK | Assigned To | => jK |