Ras wrote: ↑Tue Oct 05, 2021 4:32 pm
I checked my engine, and Wine with the Windows executable gets me 97.8% of the native Linux version. Same compiler, same compiler settings. I have an input and a search thread, and all output (may come from the input or the search thread) is guarded with a mutex. Also, the Windows version uses the native WinAPI, not the MingW pthread library.
Tested with different Wine versions...
Native linux version:
Code: Select all
go depth 10
info score cp 29 depth 1 seldepth 1 time 0 nodes 24 nps 0 pv d2d4
info score cp 0 depth 2 seldepth 2 time 0 nodes 90 nps 0 pv d2d4 d7d5
info score cp 27 depth 3 seldepth 5 time 0 nodes 672 nps 0 pv d2d4 d7d5 g1f3
info score cp 0 depth 4 seldepth 8 time 2 nodes 2292 nps 1146000 pv d2d4 d7d5 g1f3 g8f6
info score cp 27 depth 5 seldepth 12 time 5 nodes 13957 nps 2791400 pv d2d4 d7d5 g1f3 b8c6 b1c3
info score cp 0 depth 6 seldepth 18 time 14 nodes 66545 nps 4753214 hashfull 4 pv d2d4 d7d5 g1f3 g8f6 f3e5 f6e4
info score cp 19 depth 7 seldepth 18 time 43 nodes 300952 nps 6998884 hashfull 14 pv d2d4 d7d5 g1f3 g8f6 b1c3 b8c6 f3g5
info score cp 8 depth 8 seldepth 23 time 305 nodes 2059811 nps 6753479 hashfull 109 pv e2e4 e7e5 b1c3 b8c6 g1f3 g8f6 d2d4 e5d4 f3d4 c6d4 d1d4
info score cp 27 depth 9 seldepth 23 time 1368 nodes 9268090 nps 6774920 hashfull 411 pv e2e4 b8c6 g1f3 g8f6 f1d3 d7d5 e4d5 f6d5 e1g1
info score cp 6 depth 10 seldepth 24 time 6183 nodes 41775192 nps 6756460 hashfull 957 pv g1f3 g8f6 b1c3 b8c6 e2e4 e7e5 f1c4 f8d6 e1g1 e8g8
bestmove g1f3
Speed: 6.756.460 nps at depth 10.
Windows version, cross-compiled under Linux, using the windows-gnu toolchain I'd also use under Windows itself. I am assuming that windows-msvc won't run on Linux because it needs the MSVC linker, which on Windows, you'd need to install from the Visual C++ build tools.. (But I haven't tried this.)
Running on Debian 11 system Wine, version 5.03
Code: Select all
go depth 10
info score cp 29 depth 1 seldepth 1 time 0 nodes 24 nps 0 pv d2d4
info score cp 0 depth 2 seldepth 2 time 0 nodes 90 nps 0 pv d2d4 d7d5
info score cp 27 depth 3 seldepth 5 time 0 nodes 672 nps 0 pv d2d4 d7d5 g1f3
info score cp 0 depth 4 seldepth 8 time 2 nodes 2292 nps 1146000 pv d2d4 d7d5 g1f3 g8f6
info score cp 27 depth 5 seldepth 12 time 5 nodes 13957 nps 2791400 pv d2d4 d7d5 g1f3 b8c6 b1c3
info score cp 0 depth 6 seldepth 18 time 15 nodes 66545 nps 4436333 hashfull 4 pv d2d4 d7d5 g1f3 g8f6 f3e5 f6e4
info score cp 19 depth 7 seldepth 18 time 47 nodes 300952 nps 6403234 hashfull 14 pv d2d4 d7d5 g1f3 g8f6 b1c3 b8c6 f3g5
info score cp 8 depth 8 seldepth 23 time 334 nodes 2059811 nps 6167099 hashfull 109 pv e2e4 e7e5 b1c3 b8c6 g1f3 g8f6 d2d4 e5d4 f3d4 c6d4 d1d4
info score cp 27 depth 9 seldepth 23 time 1497 nodes 9268090 nps 6191109 hashfull 411 pv e2e4 b8c6 g1f3 g8f6 f1d3 d7d5 e4d5 f6d5 e1g1
info score cp 6 depth 10 seldepth 24 time 6769 nodes 41775192 nps 6171546 hashfull 957 pv g1f3 g8f6 b1c3 b8c6 e2e4 e7e5 f1c4 f8d6 e1g1 e8g8
bestmove g1f3
Speed: 6.171.546 at depth 10.
Result: 91.34%
So Wine causes an 8-9% speed penalty.
That is in league with what I'd expect.
Running under Wine 6.14 Staging (as installed by Lutris):
Code: Select all
go depth 10
info score cp 29 depth 1 seldepth 1 time 0 nodes 24 nps 0 pv d2d4
info score cp 0 depth 2 seldepth 2 time 0 nodes 90 nps 0 pv d2d4 d7d5
info score cp 27 depth 3 seldepth 5 time 2 nodes 672 nps 336000 pv d2d4 d7d5 g1f3
info score cp 0 depth 4 seldepth 8 time 6 nodes 2292 nps 382000 pv d2d4 d7d5 g1f3 g8f6
info score cp 27 depth 5 seldepth 12 time 14 nodes 13957 nps 996929 pv d2d4 d7d5 g1f3 b8c6 b1c3
info score cp 0 depth 6 seldepth 18 time 72 nodes 66545 nps 924236 hashfull 4 pv d2d4 d7d5 g1f3 g8f6 f3e5 f6e4
info score cp 19 depth 7 seldepth 18 time 248 nodes 300952 nps 1213516 hashfull 14 pv d2d4 d7d5 g1f3 g8f6 b1c3 b8c6 f3g5
info score cp 8 depth 8 seldepth 23 time 1894 nodes 2059811 nps 1087545 hashfull 109 pv e2e4 e7e5 b1c3 b8c6 g1f3 g8f6 d2
d4 e5d4 f3d4 c6d4 d1d4
info score cp 27 depth 9 seldepth 23 time 8159 nodes 9268090 nps 1135935 hashfull 411 pv e2e4 b8c6 g1f3 g8f6 f1d3 d7d5 e4d5 f6d5 e1g1
Speed: 1.135.935 nps
Result: 16.8%
(In some previous runs, I've also had speeds of around 700 kNodes/s, for a speed of only 8-10%)
I have Fritz 11 running under Wine/Lutris, using Wine 6.14 Staging as a runner. The node count in the Fritz 11 GUI is the same as it is on the Wine 6.14 command line: either 1.1 million nps, or 700 kNodes/s (I don't know why it is sometimes even slower.) Therefore I just switched the runner from Lutris' built-in 6.14 staging to system Wine; the same 5.03 version that gained 91+% of the speed of the native version.
The node count in the Fritz 11 GUI went up accordingly, and it is now also in the 6.1 million (91-92%) speed range.
So, the problem is clearly somewhere within Wine 6.14, or the specific build of Wine 6.14 that Lutris is using. The strange thing is that it does not affect all engines (some take a bigger hit than others, but none under 85%, except mine), and games are not affected as far as I can see. I'd know if a game would run at 15% of its normal speed.
So for now, I'll just use system Wine (or test other Lutris versions) for Fritz 11, until I find a Linux-specific GUI I like better. And, at 91-92% speed, tseting engines under Wine is an option, if there are no open source engines in the Elo-range I want to test.