My goodnes, 28-30 ply in middle game!
You are being no nice with us, humble player with 5-6 plys deep the best day...
Fern
Stockfish v2.1 now available
Moderators: hgm, chrisw, Rebel
-
- Posts: 1326
- Joined: Sun Mar 12, 2006 6:46 pm
- Location: Kelowna
- Full name: Tony Mokonen
Re: Stockfish v2.1 now available
Thanks Jim, this compile works fine with the official book. On my machine, the difference in NPS compared to the MSVC compile is negligible.
-
- Posts: 2042
- Joined: Wed Mar 08, 2006 8:30 pm
Re: Stockfish v2.1 now available
Yes, but obviously the compile options are not the same...
-
- Posts: 213
- Joined: Thu Jul 15, 2010 5:59 am
Re: Stockfish v2.1 now available
Thank you Tord , Marco and Joona for a wonderful engine that keeps improving and defying inertia...
Keep it up and rest assured that we are all indebted to your work.
P.S your website is elegant.
Hats off.
Best Regards
Mith.
Keep it up and rest assured that we are all indebted to your work.
P.S your website is elegant.
Hats off.
Best Regards
Mith.
-
- Posts: 2684
- Joined: Sat Jun 14, 2008 9:17 pm
Re: Stockfish v2.1 now available
The correct way to test any functionality change due to miscompile is to run from command line:ernest wrote: I get completely different analysis:
stockfish bench
Then verify that searched nodes must be: 6487630
-
- Posts: 2684
- Joined: Sat Jun 14, 2008 9:17 pm
Re: Stockfish v2.1 now available
Ok, I think I have found the issue with book reading under MSVC compile.mcostalba wrote: Yes, I will try to investigate when I have a bit of time, probably this week-end.
The problem happens only with the optimized 32 bit MSVC, not with the debug version I have used to test the new book code, hence I missed this bug.
The problem is here, in book.h file:
Code: Select all
template<int n> inline uint64_t Book::get_int() { return 256 * get_int<n-1>() + get(); }
For this to work it is critical that the recursive function get_int<n-1>() is called _before_ reading the next character through calling get().
This is what _normally_ happens in all the compilers, but for some reason MSVC 32 bits when optimization flags are enabled calls get() before evaluating get_int<n-1>() and this produces a wrong book key so that position is not detected and books return a "position not found" value.
I would assume this bug is mine, not of MSVC because C++ standard does not seem to guarantee the order of evaluation of a term in a sum expression, so that we have to rewrite the code in a way to enforce the ordering, one quick hack (that works with MSVC) is to substitute the above line with:
Code: Select all
template<int n> inline uint64_t Book::get_int() { uint64_t v = 256 * get_int<n-1>(); return v + get(); }
-
- Posts: 1771
- Joined: Fri Jul 14, 2006 7:56 am
- Location: London, England
- Full name: Jim Ablett
Re: Stockfish v2.1 now available
Was a miscompile, sorry. Intel optimization switch /QIfist was the culprit.mcostalba wrote:The correct way to test any functionality change due to miscompile is to run from command line:ernest wrote: I get completely different analysis:
stockfish bench
Then verify that searched nodes must be: 6487630
http://tinyurl.com/5saok4v
Here is re-compile which will show correct searched nodes.
http://dl.dropbox.com/u/5047625/stockfi ... tel-ja.zip
Jim.
-
- Posts: 2684
- Joined: Sat Jun 14, 2008 9:17 pm
Re: Stockfish v2.1 now available
Thanks for pointing that out !Jim Ablett wrote: Was a miscompile, sorry. Intel optimization switch /QIfist was the culprit.
Do you mean that the released 64 bit version was miscompiled ?
-
- Posts: 1771
- Joined: Fri Jul 14, 2006 7:56 am
- Location: London, England
- Full name: Jim Ablett
Re: Stockfish v2.1 now available
No, only new win32 intel compile I posted in this thread. 64 bit version was compiled with Msvc.mcostalba wrote:Thanks for pointing that out !Jim Ablett wrote: Was a miscompile, sorry. Intel optimization switch /QIfist was the culprit.
Do you mean that the released 64 bit version was miscompiled ?
Jim.
-
- Posts: 1326
- Joined: Sun Mar 12, 2006 6:46 pm
- Location: Kelowna
- Full name: Tony Mokonen
Re: Stockfish v2.1 now available
Thanks Jim, and Marco and the rest of the Stockfish team. You guys are very responsive to requests, and our little community benefits greatly from this.