Comments (8)
Resolved, soon to be merged.
Thanks for your help :)
from ethereal.
Change:
- fun2_t fun2 = (fun2_t)(void(*)())GetProcAddress(k32, "GetNumaNodeProcessorMaskEx");
- fun3_t fun3 = (fun3_t)(void(*)())GetProcAddress(k32, "SetThreadGroupAffinity");
+ fun2_t fun2 = (fun2_t)GetProcAddress(k32, "GetNumaNodeProcessorMaskEx");
+ fun3_t fun3 = (fun3_t)GetProcAddress(k32, "SetThreadGroupAffinity");
$ make
gcc -DNDEBUG -O3 -std=gnu11 -Wall -Wextra -Wshadow -march=native -flto *.c fathom/tbprobe.c -lpthread -lm -DUSE_POPCNT -msse3 -mpopcnt -o Ethereal
windows.c: In function 'bestGroup':
windows.c:39:25: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'void (*)()' [-Wcast-function-type]
fun1_t fun1 = (fun1_t)(void(*)())GetProcAddress(k32, "GetLogicalProcessorInformationEx");
^
windows.c:39:17: warning: cast between incompatible function types from 'void (*)()' to 'int (*)(LOGICAL_PROCESSOR_RELATIONSHIP, struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX *, DWORD *)' {aka 'int (*)(enum _LOGICAL_PROCESSOR_RELATIONSHIP, struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX *, long unsigned int *)'} [-Wcast-function-type]
fun1_t fun1 = (fun1_t)(void(*)())GetProcAddress(k32, "GetLogicalProcessorInformationEx");
^
windows.c: In function 'bindThisThread':
windows.c:103:17: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'int (*)(USHORT, struct _GROUP_AFFINITY *)' {aka 'int (*)(short unsigned int, struct _GROUP_AFFINITY *)'} [-Wcast-function-type]
fun2_t fun2 = (fun2_t)GetProcAddress(k32, "GetNumaNodeProcessorMaskEx");
^
windows.c:104:17: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'int (*)(void *, const GROUP_AFFINITY *, struct _GROUP_AFFINITY *)' {aka 'int (*)(void *, const struct _GROUP_AFFINITY *, struct _GROUP_AFFINITY *)'} [-Wcast-function-type]
fun3_t fun3 = (fun3_t)GetProcAddress(k32, "SetThreadGroupAffinity");
``` ^
from ethereal.
@AndyGrant One more comment about that.
stockfish has this code:
void Thread::idle_loop() {
// If OS already scheduled us on a different group than 0 then don't overwrite
// the choice, eventually we are one of many one-threaded processes running on
// some Windows NUMA hardware, for instance in fishtest. To make it simple,
// just check if running threads are below a threshold, in this case all this
// NUMA machinery is not needed.
if (Options["Threads"] >= 8)
WinProcGroup::bindThisThread(idx);
Do you want to do something similar in Ethereal?
I connected a 64 core machine under Windows with http://chess.grantnet.us
and had super weird effects (only 16% cpu load with 60 threads) and only 0.1 MN/s.
I am quite sure it is because of that. Most likely all the threads were bound to the same physical node.
from ethereal.
Okay, this is easy enough to do.
What about the case when we run tests using 8threads at once with your machine?
It looks to me like this solution only pushes back the problem.
from ethereal.
You are right, the problem comes again at 8 threads with stockfish. But the vast majority of tests are 1 thread tests.
from ethereal.
Okay, well do you have any aversion to using Threads > 8
instead of Threads >= 8
?
Stockfish usually does 7thread tests, but I do 8thread since the majority of workers are connected on 8 threads.
If not, I will submit a dummy patch where both master/test have the numa change
from ethereal.
No aversion :), I always use the full number of cores/threads when I use the engine for analysis or for engine-engine games in the internet ;)
from ethereal.
dd74700 resolved
from ethereal.
Related Issues (20)
- Interesting... HOT 4
- Invite Ethereal to participate in a chess engine tournament
- Can you build a Korean chess engine? HOT 1
- PONDERLOCK is locked by a thread and unlocked by another thread which is undefined behavior HOT 2
- UCI_AnalyseMode HOT 1
- Error compiling Ethereal on MacOS HOT 2
- compiling error : "the clang compiler does not support '-march=native'" HOT 1
- strange and surprising chess mistake : Why ? HOT 1
- Evals not normalized to +1.00 = 50% win
- Normalized evaluation HOT 5
- Ethereal Commercial VS Ethereal Free HOT 2
- make error HOT 3
- tt_store comment confusion HOT 2
- Things to do if I had time
- pawn targets in genAllNoisyMoves HOT 4
- Sizeof(board.history)
- Please add ARMv9.2, SVE2, Dot Product and Neon support HOT 1
- queen contribution to attackedBy2 is wrong HOT 6
- nit -- line appears to be a no-op
- Bug in evaluateComplexity HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ethereal.