Stockfish Maximum Hash Size

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

BBauer
Posts: 658
Joined: Wed Mar 08, 2006 8:58 pm

Re: Stockfish Maximum Hash Size

Post by BBauer »

My answer is in the subject working source for stockfish 1.6.2

Post subject: Re: working source for stockfish 1.6.2 Posted: Mon Feb 01, 2010 9:39 am

regards
Bernhard
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Stockfish Maximum Hash Size

Post by mcostalba »

BBauer wrote:My answer is in the subject working source for stockfish 1.6.2

Post subject: Re: working source for stockfish 1.6.2 Posted: Mon Feb 01, 2010 9:39 am

regards
Bernhard
Nice !

This is different from previous post, now I see linkage step

Code: Select all

/opt/intel/Compiler/11.1/current/bin/intel64/icpc -lpthread -o stockfish application.o bitboard.o pawns.o material.o endgame.o evaluate.o main.o misc.o move.o movegen.o history.o movepick.o search.o piece.o position.o direction.o tt.o value.o uci.o ucioption.o mersenne.o book.o bitbase.o san.o benchmark.o 
Does this now works for you ?

I mean, after you compile and at the end see linking step, i.e. the above posted line, do you still have problems or everything is fixed ?


P.S: In case you need to redo the test ALWAYS do a 'make clean' before to compile, you cannot have half files compiled with one compiler and remaining with another one.
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Stockfish Maximum Hash Size

Post by zullil »

Hi Marco,

Yes, the two patches together seem to work. I was able to run Stockfish with Hash = 4096. (I realize now that the hash value must be a power of 2!). I cannot test 8192 since I have only 6GB. Maybe someone else can.

I tested a single position, first with Hash = 1024 and then with Hash = 4096 (both using 8 threads, to depth 26). Below are the two search logs, respectively. Seems like no advantage from having more hash.

Code: Select all

Searching: r1r1q1k1/6p1/p2b1p1p/1p1PpP2/PPp5/2P4P/R1B2QP1/R5K1 w - -
infinite: 0 ponder: 0 time: 0 increment: 0 moves to go: 0
 2     +0.44   00:00      235 axb5 axb5 
 2     +0.57   00:00      432 Be4 Rd8 axb5 axb5 
 2     +0.85   00:00      980 Qb6 Bc7 Qe6+ Qxe6 fxe6 
 3     +0.85   00:00     1317 Qb6 Bc7 Qe6+ Qxe6 fxe6 
 4     +0.89   00:00     2107 Qb6 Bc7 Qe6+ Qxe6 fxe6 Bb6+ Kh2 
 5     +1.70   00:00     3283 Qb6 Bc7 Qe6+ Qxe6 fxe6 Bb6+ Kh2 Rab8 axb5 axb5 
 6     +1.70   00:00     5143 Qb6 Bc7 Qe6+ Qxe6 fxe6 Bb6+ Kh2 Rab8 axb5 axb5 
 7     +1.74   00:00    15959 Qb6 Qd7 axb5 Rab8 Qxa6 Rxb5 Be4 
 8  <  +1.54   00&#58;00    29952 Qb6 Bc7 Qe6+ Qxe6 fxe6 Rab8 axb5 axb5 Be4 Kf8 Kf2 
                              Ke7 
 9     +1.74   00&#58;00    87712 Qb6 Bc7 Qe6+ Qxe6 fxe6 Rab8 axb5 axb5 Ra6 Rb6 Ra7 
                              Rbb8 Kh2 e4+ g3 f5 
10     +1.70   00&#58;00   142600 Qb6 Bc7 Qe6+ Qxe6 fxe6 Rab8 axb5 Rxb5 Bf5 Rcb8 
                              Be4 a5 bxa5 Kf8 
11     +1.98   00&#58;00   319155 Qb6 Rd8 axb5 Rab8 Qxa6 Qxb5 Be4 Qxa6 Rxa6 Bc7 Rc6 
                              Bb6+ Kf1 Kf7 Rxc4 
12     +2.06   00&#58;00    1050k Qb6 Rd8 Be4 Kf8 axb5 Rab8 Qxa6 Qxb5 Qa7 Rd7 Qf2 
                              Bc7 Qc5+ Bd6 Qc6 Bc7 Qxb5 Rxb5 
13     +1.90   00&#58;01    1706k Qb6 Bc7 Qe6+ Qxe6 fxe6 Rab8 axb5 Rxb5 Bf5 Re8 Bg6 
                              Re7 Be4 f5 Bxf5 Bb6+ Kh2 Rxd5 Rxa6 
14     +2.10   00&#58;01    3144k Qb6 Rd8 Be4 Rab8 Qxa6 Bc7 Qe6+ Kf8 Qxe8+ Kxe8 
                              axb5 Rxb5 Kf2 Bb6+ Ke2 Kf8 g4 Ke7 
15     +2.02   00&#58;01    4654k Qb6 Rd8 Be4 Rab8 Qxa6 Bc7 Qe6+ Kf8 Qxe8+ Kxe8 
                              axb5 Rxb5 Kf2 Bb6+ Ke2 Kf8 g4 Ke7 Kf3 Kd6 Kg3 Rb8 
16  <  +1.66   00&#58;02    7689k Qb6 Qe7 axb5 Rab8 Qxa6 e4 b6 Qe5 b7 Qh2+ Kf1 Qf4+ 
                              Ke1 Qe3+ Kd1 Qg1+ Kd2 e3+ 
17     +1.58   00&#58;02   13203k Qb6 Qe7 axb5 Rab8 Qxa6 e4 Bxe4 Qe5 Bf3 Qe3+ Kf1 
                              Qd3+ Kf2 Rd8 Ra3 Qd2+ Kg1 Qe3+ Kf1 Qd3+ Be2 Qxd5 
                              b6 Qxf5+ Bf3 Qd3+ Kg1 
18     +1.33   00&#58;06   37560k Qb6 Qe7 axb5 Rab8 Qxa6 e4 Bxe4 Qe5 Bf3 Qe3+ Kf1 
                              Qd3+ Kf2 Rd8 Ra3 Qd2+ Kg1 Qe3+ Kf1 Qd3+ Be2 Qxf5+ 
                              Bf3 Qd3+ Be2 Qxd5 b6 Re8 Qxc4 
19     +1.09   00&#58;10   74111k Qb6 Qe7 axb5 Rab8 Qxa6 e4 Qa7 Qe5 Qe3 Re8 b6 Qh2+ 
                              Kf1 Bf4 Qg1 Qg3 Qf2 Qh2 Bd1 e3 Qg1 Qg3 Bh5 Red8 
                              Ra7 Rxb6 Re1 Rbb8 
20     +1.41   00&#58;23  167787k Qb6 Qe7 axb5 Rab8 Qxa6 e4 Qa7 Qe5 Qe3 Bc7 Qxe4 
                              Bb6+ Kh1 Qxc3 d6 Kh7 Qd5 Qxb4 Be4 Rc5 Qe6 Re5 Ra4 
                              Qd2 Qxc4 Qxd6 Ra8 Ree8 Rxb8 Qxb8 
21     +1.25   01&#58;23  636165k Qb6 Qe7 axb5 Rab8 Qxa6 e4 Qa7 Qe5 Qe3 Bc7 Qxe4 
                              Bb6+ Kh1 Qxc3 d6 Kh7 Qd5 Qxb4 Be4 Rc5 Qf7 Rxb5 
                              Qg6+ Kh8 d7 Re5 Ra8 Bc7 R1a7 Qb1+ Kh2 Qb6 g3 Rxa8 
                              Rxa8+ Bd8 
22     +1.37   01&#58;59  905155k Qb6 Qe7 axb5 Rab8 Qxa6 e4 Qa7 Qe5 Qe3 Re8 b6 Qh2+ 
                              Kf1 Bf4 Qg1 Qg3 Qf2 Qh2 Ke2 Be5 Ra3 e3 Qf3 Rxb6 
                              Be4 Rbb8 Qxe3 Bf4 Qf3 Rbd8 Kd1 Re7 Kc2 
23  <  +0.97   04&#58;07    1882M Qb6 Qe7 axb5 Rab8 Qxa6 e4 Qa7 Qe5 Qe3 Bc7 Ra6 Re8 
                              g3 Bb6 Rxb6 Rxb6 Qxb6 Qxc3 Rc1 Qxg3+ Kf1 Qxh3+ 
                              Ke2 Qxf5 
24     +0.97   07&#58;12    3303M Qb6 Qe7 axb5 Rab8 Qe3 axb5 Kf1 Qd8 Ra6 Ra8 Be4 
                              Rcb8 R1a5 Rxa6 Rxa6 Rb7 g4 Qc7 Kg2 Kf7 Kg3 Rb8 h4 
                              Rb7 Kg2 Rb8 Kg3 
25     +0.85   10&#58;42    4919M Qb6 Qe7 axb5 Rab8 Qe3 axb5 Ra6 Qd8 Kf1 Ra8 Be4 
                              Kf7 Ra7+ Rxa7 Qxa7+ Qc7 Qxc7+ Rxc7 Ke2 Ke7 Ke3 
                              Rb7 Ra8 Kd7 Bf3 Rb8 Ra7+ Bc7 Ke4 Kd6 g3 Rd8 Ra6+ 
                              Ke7 
26     +0.97   14&#58;11    6540M Qb6 Qe7 axb5 Rab8 Qe3 axb5 Ra6 Qd8 Kf1 Ra8 Be4 
                              Rcb8 R1a5 Kf8 Rxa8 Rxa8 Rxb5 Qd7 Qb6 Rb8 Qc6 Qxc6 
                              Rxb8+ Bxb8 dxc6 Ke7 Bd5 Kd6 Bxc4 Kxc6 Ke2 Kd6 Ke3 
                              Ba7+ Ke4 Bf2 
Nodes&#58; 6780450559
Nodes/second&#58; 7667365
Best move&#58; Qb6
Ponder move&#58; Qe7

Code: Select all

Searching&#58; r1r1q1k1/6p1/p2b1p1p/1p1PpP2/PPp5/2P4P/R1B2QP1/R5K1 w - -
infinite&#58; 0 ponder&#58; 0 time&#58; 0 increment&#58; 0 moves to go&#58; 0
 2     +0.44   00&#58;02      235 axb5 axb5 
 2     +0.57   00&#58;02      432 Be4 Rd8 axb5 axb5 
 2     +0.85   00&#58;02      980 Qb6 Bc7 Qe6+ Qxe6 fxe6 
 3     +0.85   00&#58;02     1317 Qb6 Bc7 Qe6+ Qxe6 fxe6 
 4     +0.89   00&#58;02     2107 Qb6 Bc7 Qe6+ Qxe6 fxe6 Bb6+ Kh2 
 5     +1.70   00&#58;02     3283 Qb6 Bc7 Qe6+ Qxe6 fxe6 Bb6+ Kh2 Rab8 axb5 axb5 
 6     +1.70   00&#58;02     5143 Qb6 Bc7 Qe6+ Qxe6 fxe6 Bb6+ Kh2 Rab8 axb5 axb5 
 7     +1.74   00&#58;02    15959 Qb6 Qd7 axb5 Rab8 Qxa6 Rxb5 Be4 
 8  <  +1.54   00&#58;02    29943 Qb6 Bc7 Qe6+ Qxe6 fxe6 Rab8 axb5 axb5 Be4 Kf8 Kf2 
                              Ke7 
 9     +1.21   00&#58;02   135886 Qb6 Bc7 Qe6+ Qxe6 fxe6 Rab8 axb5 axb5 Rd1 Rd8 Kf1 
                              Ra8 Rxa8 Rxa8 d6 Bb6 
10     +1.49   00&#58;02   201442 Qb6 Bc7 Qe6+ Qxe6 fxe6 Rab8 axb5 axb5 Rd1 Bd6 Ra6 
                              Rd8 Ra7 Ra8 Rda1 Rxa7 Rxa7 
11     +1.54   00&#58;02   483596 Qb6 Bc7 Qe6+ Qxe6 fxe6 Rab8 axb5 axb5 Rd1 Bd6 Ra6 
                              Rd8 Ra7 Ra8 Rda1 Rxa7 Rxa7 Kf8 Be4 Be7 Kf2 
12     +1.62   00&#58;02   620944 Qb6 Bc7 Qe6+ Qxe6 fxe6 Rab8 axb5 axb5 Rd1 Bd6 Ra6 
                              Rd8 Ra7 Rdc8 Rda1 Bc7 Kh2 Bb6 R7a6 Rd8 e7 Rd6 Ra8 
13  >  +1.82   00&#58;03   886582 Qb6 Qe7 axb5 Rcb8 Qc6 Qa7+ Kf1 
14     +1.66   00&#58;03    2368k Qb6 Qe7 axb5 Rab8 Qxa6 e4 Re1 Qe5 Rxe4 Qh2+ Kf1 
                              Qh1+ Kf2 Qh2 b6 Bg3+ Kf3 Be5 b7 Qg3+ Ke2 Qxg2+ 
                              Kd1 Qh1+ Kd2 Rc7 Qe6+ Kf8 
15     +1.05   00&#58;04   10217k Qb6 Qe7 axb5 Rab8 Qxa6 e4 Bxe4 Qe5 Bf3 Qe3+ Kf1 
                              Rd8 Qa3 Bh2 Rf2 Re8 d6 Bxd6 Bd5+ Kh7 Kg1 Bh2+ 
                              Kxh2 Qxf2 
16     +1.45   00&#58;06   15135k Qb6 Qe7 axb5 Rab8 Qxa6 e4 Bxe4 Qe5 Bf3 Qe3+ Kf1 
                              Rd8 Qa3 Qd3+ Re2 Re8 Qb2 Rxb5 Kg1 Rxe2 Ra8+ Rb8 
                              Rxb8+ Bxb8 Bxe2 Qxd5 Qa2 Qxf5 Qxc4+ Kf8 
17     +1.33   00&#58;06   19596k Qb6 Qe7 axb5 Rab8 Qxa6 e4 Bxe4 Qe5 Bf3 Qe3+ Kf1 
                              Rd8 Qa3 Qd3+ Re2 Re8 Qb2 Rxb5 Re1 Re5 Qa1 Rb8 Kg1 
                              Rxe2 Rxe2 Be5 Rxe5 fxe5 Qa7 
18     +1.33   00&#58;09   39324k Qb6 Qe7 axb5 Rab8 Qxa6 e4 Bxe4 Rd8 Re2 Qe5 Qa3 
                              Qh2+ Kf1 Qh1+ Kf2 Qh2 Ke1 Rxb5 Kd1 Qg3 Kc2 Rdb8 
                              Qa7 R8b6 Qa2 Be5 Qxc4 
19     +1.33   00&#58;15   81504k Qb6 Qe7 axb5 Rab8 Qxa6 e4 Bxe4 Qe5 Bf3 Qe3+ Kf1 
                              Rd8 Qa3 Qd3+ Re2 Re8 Qb2 Rxb5 Ra2 Kf8 Qd2 Rxe2 
                              Bxe2 Qxf5+ Kg1 Qxd5 Qxd5 Rxd5 Bxc4 
20  <  +1.13   00&#58;21  129816k Qb6 Qe7 axb5 Rab8 Qxa6 e4 Bxe4 Qe5 Bf3 Qe3+ Kf1 
                              Qd3+ Kf2 Be5 Qe6+ Kh8 d6 Rd8 b6 Rxb6 
21     +1.13   00&#58;27  170413k Qb6 Qe7 axb5 Rab8 Qxa6 e4 Bxe4 Qe5 Bf3 Qe3+ Kf1 
                              Qd3+ Kf2 Be5 Qe6+ Kh8 d6 Rd8 Rd1 Qxc3 d7 Qb3 Ra6 
                              Qxb4 Rc6 c3 Rc8 Qb2+ Be2 c2 Qe8+ Kh7 Re1 Qd4+ Kf1 
                              Qxd7 Qxd7 Rxd7 Rxc2 g6 
22     +1.13   01&#58;12  530427k Qb6 Qe7 axb5 Rab8 Qxa6 e4 Qa7 Qe5 Qe3 Bc7 Ra6 Re8 
                              g3 Bb6 Rxb6 Rxb6 Rd1 Rbb8 g4 Rbd8 b6 Rxd5 Re1 Rd3 
                              Bxd3 cxd3 c4 Qb2 c5 Qxb4 
23  >  +1.33   01&#58;59  895777k Qb6 Qe7 axb5 Rab8 Qxa6 e4 Qa7 Qe5 Qe3 Bc7 Qxe4 
                              Qh2+ Kf1 Bb6 Qf3 Qh1+ Ke2 
24     +1.13   02&#58;49    1287M Qb6 Qe7 axb5 Rab8 Qxa6 e4 Qa7 Qe5 Qe3 Bc7 Ra6 Re8 
                              Rd1 Qh2+ Kf1 Bf4 Qg1 Qg3 Qf2 Qxc3 Re6 Bg3 Qd2 
                              Qxd2 Rxd2 Red8 Rxe4 c3 Rd3 Be5 d6 Rxd6 Rxd6 Bxd6 
                              Rd4 
25     +1.21   06&#58;44    3090M Qb6 Qe7 axb5 Rab8 Qxa6 e4 Qa7 Qe5 Qe3 Bc7 Ra6 Re8 
                              Rd1 Qh2+ Kf1 Bf4 Qg1 Qg3 Qf2 Qxc3 Re6 Bg3 Qd2 
                              Qxd2 Rxd2 Red8 Rxe4 c3 Rd3 Be5 Ba4 Kf7 Ke2 Rb7 
                              Bb3 Rxb5 d6+ Ke8 
26     +0.89   15&#58;36    7159M Qb6 Qe7 axb5 Rab8 Qxa6 e4 Qa7 Qe5 Qe3 Bc7 Ra6 Re8 
                              Rd1 Qh2+ Kf1 Bf4 Qg1 Qg3 Qf2 e3 Qxg3 e2+ Kf2 
                              exd1=N+ Bxd1 Bxg3+ Kxg3 Re3+ Kf4 Rxc3 Rc6 Kf8 b6 
                              Rd3 Bf3 Ke8 Ke4 Rb3 Kd4 Rxb4 Kc5 Rb2 g3 
Nodes&#58; 7565747152
Nodes/second&#58; 7631046
Best move&#58; Qb6
Ponder move&#58; Qe7
BBauer
Posts: 658
Joined: Wed Mar 08, 2006 8:58 pm

Re: Stockfish Maximum Hash Size

Post by BBauer »

Actually it does not work on my computer.
At last not even without optimization.
But I have tried to compile stockfish with the intel compiler on an other computer and it worked. So perhaps I have build an executable for a different machine. That could be the explanation for not giving *any* output.
Now it looks like I was completely wrong and I was not able to use the compiler properly.
Sorry for the inconvenience.
Thank you for increasing the hash size.
kind regards
Bernhard
BBauer
Posts: 658
Joined: Wed Mar 08, 2006 8:58 pm

Re: Stockfish Maximum Hash Size

Post by BBauer »

I tested it.
It worked great.
Is there a reason to limit the hash size to 8192?
Kind regards
Bernhard
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Stockfish Maximum Hash Size

Post by mcostalba »

BBauer wrote: Now it looks like I was completely wrong and I was not able to use the compiler properly.
It only looks like you have fixed the issue you were experiencing so it is a good thing IMHO.

We are planning to shortly release a maintenance version that includes all the accumulated fixes so far, so that people does not need to manually apply all the patches.

This release, numbered 1.6.3, will be a MAINTENANCE ONLY release, so absolutely 100% same functionality and same speed of 1.6.2 so same ELO.

Only bug fixes will be included.


P.S: regarding the size to 8GB it seems an enough high value, there is no reason to limit to 8GB, but we have to give a limit for how the UCI options work.
ernest
Posts: 2041
Joined: Wed Mar 08, 2006 8:30 pm

Re: Stockfish Maximum Hash Size

Post by ernest »

zullil wrote:I tested a single position, first with Hash = 1024 and then with Hash = 4096 (both using 8 threads, to depth 26). Below are the two search logs, respectively. Seems like no advantage from having more hash.
You should have tested with a single thread, for reproducibility: that would have been interesting! :o
Martin Thoresen
Posts: 1833
Joined: Thu Jun 22, 2006 12:07 am

Re: Stockfish Maximum Hash Size

Post by Martin Thoresen »

zullil wrote: Hi Martin,

Take a look here.

Louis
Thanks Louis.

I eventually tried the PS build and it worked fine.

I guess Jim must be using the old source then, without the fix?