Sting - A fatal error in Hash code (Stockfish.2.1.1)

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

fishpov
Posts: 113
Joined: Sat Mar 07, 2015 6:05 pm

Re: Sting - A fatal error in Hash code (Stockfish.2.1.1)

Post by fishpov »

With http://www.mediafire.com/download/xxceg ... 7-test.zip
I cannot exceed 1024MB
I have Windows7 64 with 16Go and Deep Fritz 14.
For example if I try 2048 I get :
Sting caused an exception. This is a problem in the engine.
User avatar
Nordlandia
Posts: 2822
Joined: Fri Sep 25, 2015 9:38 pm
Location: Sortland, Norway

Re: Sting - A fatal error in Hash code (Stockfish.2.1.1)

Post by Nordlandia »

Latest stockfish dev is not able to detect king walk without human assistance.

Analysis by Stockfish 150316 64 BMI2:

1.Kb3 g2 2.Bxg2 Bf2 3.Kc2 Bh4 4.Kd3 Bg5 5.Ke2 Bd8 6.Kf1 Bf6 7.Bd5 f3 8.Bxf3 c6 9.Bxc6 e4 10.Bxe4 d5 11.Bxd5 h1R+ 12.Bxh1 Be5 13.Bc6 Bb2 14.Kg2 Be5 15.Kh3 Bd4 16.Kg4 Bg7 17.Kf5 Bd4 18.Ke6 Be5 19.Kd7 Bg7 20.Kc8 Bd4 21.Bb7#
+- (#21) Depth: 57/42 00:00:09 202MN, tb=815409
(, 15.03.2016)

[pgn][Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "New game"]
[Black "?"]
[Result "*"]
[SetUp "1"]
[FEN "B7/p1p5/k2p4/p3p3/P1Nb1p2/6p1/K6p/8 w - - 0 1"]
[PlyCount "17"]

1. Kb3 Bg1 (1... Be3 2. Kc3 {-1.62/36 Stockfish 7 64 POPCNT}) 2. Kc2 (2. Kc2
Bf2 3. Bg2 {-4.72/28 Deep Fritz 14 x64}) 2... Bf2 (2... Bd4 3. Kd2 Be3+ {
-2.01/44 Stockfish 5 64 SSE4.2}) 3. Kd1 (3. Kd3 Bg1 4. Bg2 {-1.72/42 Stockfish
5 64 SSE4.2}) 3... Bg1 4. Ke2 (4. Ke2 Bf2 {-3.05/31 Komodo TCECr 64-bit}) 4...
Bd4 5. Kf1 (5. Bd5 Bc5 6. Kf1 {-2.52/36 Komodo 9.3 64-bit}) 5... Bb2 6. Kg2 (6.
Kg2 Bd4 7. Bc6 {-2.33/34 Komodo 9.1 32-bit}) 6... Bd4 7. Kh3 Bc5 8. Kg4 Bd4 9.
Kf5 (9. Kf5 Bc3 10. Ke6 {-3.77/22 Deep Rybka 4 SSE42 x64}) *
[/pgn]
lech
Posts: 1169
Joined: Sun Feb 14, 2010 10:02 pm

Re: Sting - A fatal error in Hash code (Stockfish.2.1.1)

Post by lech »

fishpov wrote:With http://www.mediafire.com/download/xxceg ... 7-test.zip
I cannot exceed 1024MB
I have Windows7 64 with 16Go and Deep Fritz 14.
For example if I try 2048 I get :
Sting caused an exception. This is a problem in the engine.
Nicolas, please wait for the 64-bit version. :)
Maybe, I can't be friendly, but let me be useful.
lech
Posts: 1169
Joined: Sun Feb 14, 2010 10:02 pm

Re: Sting - A fatal error in Hash code (Stockfish.2.1.1)

Post by lech »

Nordlandia wrote:Latest stockfish dev is not able to detect king walk without human assistance.

Analysis by Stockfish 150316 64 BMI2:

1.Kb3 g2 2.Bxg2 Bf2 3.Kc2 Bh4 4.Kd3 Bg5 5.Ke2 Bd8 6.Kf1 Bf6 7.Bd5 f3 8.Bxf3 c6 9.Bxc6 e4 10.Bxe4 d5 11.Bxd5 h1R+ 12.Bxh1 Be5 13.Bc6 Bb2 14.Kg2 Be5 15.Kh3 Bd4 16.Kg4 Bg7 17.Kf5 Bd4 18.Ke6 Be5 19.Kd7 Bg7 20.Kc8 Bd4 21.Bb7#
+- (#21) Depth: 57/42 00:00:09 202MN, tb=815409
(, 15.03.2016)
What it means? Is able Stockfish without any dirty tricks to solve it or not? :wink:
Maybe, I can't be friendly, but let me be useful.
fishpov
Posts: 113
Joined: Sat Mar 07, 2015 6:05 pm

Re: Sting - A fatal error in Hash code (Stockfish.2.1.1)

Post by fishpov »

Hi Marek,
Just to tell you, but I think you already know this . :)
Windows 7 32 bits system cannot exceed 3Go Barrier.
This is the 32 bits system limitation unless you use some artefact as RAMDisk.

Regards.
Nicolas.
User avatar
hgm
Posts: 28379
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Sting - A fatal error in Hash code (Stockfish.2.1.1)

Post by hgm »

The Stockfish I have (which admittedly is an old version, Stockfish 6) does report a maximum hash setting of 2GB for the 32-bit version. (The sse42 version reports 1TB.)
Stockfish 6 by Tord Romstad, Marco Costalba and Joona Kiiski
uci
id name Stockfish 6
id author Tord Romstad, Marco Costalba and Joona Kiiski

option name Write Debug Log type check default false
option name Contempt type spin default 0 min -100 max 100
option name Min Split Depth type spin default 0 min 0 max 12
option name Threads type spin default 1 min 1 max 128
option name Hash type spin default 16 min 1 max 2048
option name Clear Hash type button
option name Ponder type check default true
option name MultiPV type spin default 1 min 1 max 500
option name Skill Level type spin default 20 min 0 max 20
option name Move Overhead type spin default 30 min 0 max 5000
option name Minimum Thinking Time type spin default 20 min 0 max 5000
option name Slow Mover type spin default 80 min 10 max 1000
option name UCI_Chess960 type check default false
option name SyzygyPath type string default <empty>
option name SyzygyProbeDepth type spin default 1 min 1 max 100
option name Syzygy50MoveRule type check default true
option name SyzygyProbeLimit type spin default 6 min 0 max 6
uciok
So it seems the behavior you get when asking for 3GB is not so much a program bug as a user error.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Sting - A fatal error in Hash code (Stockfish.2.1.1)

Post by bob »

lech wrote:I found a very important bug, next and next and I doubt that the last one; in the Stockfish 2.1.1 code.
Thanks to this, you (Sting) may use only max 3072 M hash. If you try tu set more (e.g. 4096) you in fact get and use only 64 K (KILO !!!).

Sting probably has all needed tools but to solve each tough position, needs strong hardware (large Hash and many CPUs), solid and stable search.

I prepared quickly a test (with correction) version of Sting 7 (only 32 bit).
download: http://www.mediafire.com/download/xxceg ... 7-test.zip

If somebody is able to help me and to test (solving with a large hash) this version, is welcome.
Especially this very intersting position for a question of lazzy King is worth to try (I can to add a special code or not).
[d]B7/p1p5/k2p4/p3p3/P1Nb1p2/6p1/7p/3K4 w - - 0 1 win Ke1 -> c8 by h3 gate.
White King can statrs from e.g. a2!

The full version of Sting 7 (with source code and 64-bit compilation) should to be ready in c.a. two weeks.
32 bit machines have a 32 bit address space. You are not going to be able to address 4gb in a single process. Even though some 32 bit CPUs can address 36 bits of RAM, a single process has a 4gb address space period. And the operating system and shared libraries take up part of that address space.

If you want > 2gb, you should go to a 64 bit machine.
lech
Posts: 1169
Joined: Sun Feb 14, 2010 10:02 pm

Re: Sting - A fatal error in Hash code (Stockfish.2.1.1)

Post by lech »

bob wrote:
lech wrote:I found a very important bug, next and next and I doubt that the last one; in the Stockfish 2.1.1 code.
Thanks to this, you (Sting) may use only max 3072 M hash. If you try tu set more (e.g. 4096) you in fact get and use only 64 K (KILO !!!).
----
32 bit machines have a 32 bit address space. You are not going to be able to address 4gb in a single process. Even though some 32 bit CPUs can address 36 bits of RAM, a single process has a 4gb address space period. And the operating system and shared libraries take up part of that address space.

If you want > 2gb, you should go to a 64 bit machine.
Thank you Robert for your explain.
Of course, for 32-bit systems Sting is not able to use more memory, but thanks to the Stockfish bug (no user error) probably was not able to use memory in some 64-systems (64-bit procesess) too. :)
Maybe, I can't be friendly, but let me be useful.