Crafty 20.14: Different node count

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Pablo Vazquez
Posts: 154
Joined: Thu May 31, 2007 9:05 pm
Location: Madrid, Spain

Crafty 20.14: Different node count

Post by Pablo Vazquez »

Hi,

I compiled crafty 20.14 for win32 and win64 and i analyzed the starting position to check for the speed difference. The analysis I got from 32 and 64 is the same except for the node count:

Code: Select all

FEN: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 



Crafty32:

   8	00:00	     245.190	766.218	+0.04	1. e4 Nc6 2. Bc4 Nf6 3. Nc3 e5 4. d3 Bc5
   8	00:00	     313.242	764.004	+0.04	1. e4 Nc6 2. Bc4 Nf6 3. Nc3 e5 4. d3 Bc5
   9	00:00	     504.383	788.098	+0.04	1. e4 d5 2. exd5 Qxd5 3. Nc3 Qe6+ 4. Qe2 Nf6 5. Nb5 Nd5
   9	00:00	     648.219	780.986	+0.15	1. d4 e6 2. e3 Nf6 3. Bd3 Bb4+ 4. Bd2 Nc6 5. c3 Bd6
   9	00&#58;01	     879.495	771.486	+0.28	1. Nf3 Nc6 2. d4 Nf6 3. Bd2 e6 4. Nc3 Bb4 5. e3 O-O <HT>
   9	00&#58;01	     881.616	773.347	+0.28	1. Nf3 Nc6 2. d4 Nf6 3. Bd2 e6 4. Nc3 Bb4 5. e3 O-O <HT>
  10	00&#58;01	   1.117.274	765.256	+0.14	1. Nf3 Nf6 2. Nc3 d5 3. e3 Bf5 4. Bb5+ c6 5. Bd3 Bxd3 6. cxd3
  10	00&#58;02	   1.661.431	758.644	+0.14	1. Nf3 Nf6 2. Nc3 d5 3. e3 Bf5 4. Bb5+ c6 5. Bd3 Bxd3 6. cxd3
  11	00&#58;03	   2.445.488	766.610	+0.31	1. Nf3 Nf6 2. e3 e6 3. Be2 d5 4. O-O Bd6 5. d3 O-O 6. Bd2
  11	00&#58;03	   2.775.179	768.747	+0.31	1. Nf3 Nf6 2. e3 e6 3. Be2 d5 4. O-O Bd6 5. d3 O-O 6. Bd2
  12	00&#58;04	   3.655.730	721.051	+0.01	1. Nf3 Nf6 2. e3 e6 3. d4 d5 4. Bb5+ Bd7 5. Bxd7+ Nfxd7 6. Bd2 Bd6 7. O-O O-O
  12	00&#58;08	   6.456.006	742.069	+0.19	1. e4 e5 2. Nf3 Nf6 3. d4 exd4 4. e5 Qe7 5. Be2 Ng4 6. Qxd4 d6 7. exd6 Qxd6
  12	00&#58;10	   8.154.309	759.954	+0.19	1. e4 e5 2. Nf3 Nf6 3. d4 exd4 4. e5 Qe7 5. Be2 Ng4 6. Qxd4 d6 7. exd6 Qxd6
  13	00&#58;15	  12.229.512	765.301	+0.23	1. e4 e5 2. Nf3 Nf6 3. d4 Nxe4 4. Bd3 d5 5. dxe5 Bc5 6. O-O O-O 7. Bf4
  13	00&#58;18	  14.438.834	781.322	+0.23	1. e4 e5 2. Nf3 Nf6 3. d4 Nxe4 4. Bd3 d5 5. dxe5 Bc5 6. O-O O-O 7. Bf4
  14	00&#58;27	  22.345.871	798.066	+0.23	1. e4 e5 2. Nf3 Nf6 3. d4 exd4 4. e5 Qe7 5. Be2 Ng4 6. Qxd4 d6 7. Bf4 Bf5 8. exd6 cxd6
  14	00&#58;35	  29.034.922	806.525	+0.23	1. e4 e5 2. Nf3 Nf6 3. d4 exd4 4. e5 Qe7 5. Be2 Ng4 6. Qxd4 d6 7. Bf4 Bf5 8. exd6 cxd6



FEN&#58; rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 



Crafty64&#58;

   8	00&#58;00	     245.190	1.225.950	+0.04	1. e4 Nc6 2. Bc4 Nf6 3. Nc3 e5 4. d3 Bc5
   8	00&#58;00	     313.243	1.204.780	+0.04	1. e4 Nc6 2. Bc4 Nf6 3. Nc3 e5 4. d3 Bc5
   9	00&#58;00	     504.384	1.200.914	+0.04	1. e4 d5 2. exd5 Qxd5 3. Nc3 Qe6+ 4. Qe2 Nf6 5. Nb5 Nd5
   9	00&#58;00	     648.220	1.223.056	+0.15	1. d4 e6 2. e3 Nf6 3. Bd3 Bb4+ 4. Bd2 Nc6 5. c3 Bd6
   9	00&#58;00	     879.499	1.204.793	+0.28	1. Nf3 Nc6 2. d4 Nf6 3. Bd2 e6 4. Nc3 Bb4 5. e3 O-O <HT>
   9	00&#58;00	     881.620	1.175.493	+0.28	1. Nf3 Nc6 2. d4 Nf6 3. Bd2 e6 4. Nc3 Bb4 5. e3 O-O <HT>
  10	00&#58;00	   1.117.279	1.201.375	+0.14	1. Nf3 Nf6 2. Nc3 d5 3. e3 Bf5 4. Bb5+ c6 5. Bd3 Bxd3 6. cxd3
  10	00&#58;01	   1.661.481	1.161.874	+0.14	1. Nf3 Nf6 2. Nc3 d5 3. e3 Bf5 4. Bb5+ c6 5. Bd3 Bxd3 6. cxd3
  11	00&#58;02	   2.445.538	1.181.419	+0.31	1. Nf3 Nf6 2. e3 e6 3. Be2 d5 4. O-O Bd6 5. d3 O-O 6. Bd2
  11	00&#58;02	   2.775.229	1.175.944	+0.31	1. Nf3 Nf6 2. e3 e6 3. Be2 d5 4. O-O Bd6 5. d3 O-O 6. Bd2
  12	00&#58;03	   3.655.782	1.183.100	+0.01	1. Nf3 Nf6 2. e3 e6 3. d4 d5 4. Bb5+ Bd7 5. Bxd7+ Nfxd7 6. Bd2 Bd6 7. O-O O-O
  12	00&#58;05	   6.456.059	1.120.843	+0.19	1. e4 e5 2. Nf3 Nf6 3. d4 exd4 4. e5 Qe7 5. Be2 Ng4 6. Qxd4 d6 7. exd6 Qxd6
  12	00&#58;07	   8.194.652	1.128.739	+0.19	1. e4 e5 2. Nf3 Nf6 3. d4 exd4 4. e5 Qe7 5. Be2 Ng4 6. Qxd4 d6 7. exd6 Qxd6
  13	00&#58;10	  11.826.159	1.158.291	+0.23	1. e4 e5 2. Nf3 Nf6 3. d4 Nxe4 4. Bd3 d5 5. dxe5 Bc5 6. O-O O-O 7. Bf4
  13	00&#58;11	  14.112.155	1.155.786	+0.23	1. e4 e5 2. Nf3 Nf6 3. d4 Nxe4 4. Bd3 d5 5. dxe5 Bc5 6. O-O O-O 7. Bf4
  14	00&#58;19	  23.129.414	1.217.337	+0.23	1. e4 e5 2. Nf3 Nf6 3. d4 exd4 4. e5 Qe7 5. Be2 Ng4 6. Qxd4 d6 7. Bf4 Bf5 8. exd6 cxd6
  14	00&#58;24	  29.552.198	1.231.341	+0.23	1. e4 e5 2. Nf3 Nf6 3. d4 exd4 4. e5 Qe7 5. Be2 Ng4 6. Qxd4 d6 7. Bf4 Bf5 8. exd6 cxd6
I would like to know if I did something wrong. I compiled from the command line with /DNT_i386. Do I have to define any other symbol? I also made 32 and 64 bit linux compiles that gave the same nodes as the win32 executable so maybe its a compiler bug. I compiled with and without optimization and the result was the same for the win64.

Thanks.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Crafty 20.14: Different node count

Post by bob »

Pablo Vazquez wrote:Hi,

I compiled crafty 20.14 for win32 and win64 and i analyzed the starting position to check for the speed difference. The analysis I got from 32 and 64 is the same except for the node count:

Code: Select all

FEN&#58; rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 



Crafty32&#58;

   8	00&#58;00	     245.190	766.218	+0.04	1. e4 Nc6 2. Bc4 Nf6 3. Nc3 e5 4. d3 Bc5
   8	00&#58;00	     313.242	764.004	+0.04	1. e4 Nc6 2. Bc4 Nf6 3. Nc3 e5 4. d3 Bc5
   9	00&#58;00	     504.383	788.098	+0.04	1. e4 d5 2. exd5 Qxd5 3. Nc3 Qe6+ 4. Qe2 Nf6 5. Nb5 Nd5
   9	00&#58;00	     648.219	780.986	+0.15	1. d4 e6 2. e3 Nf6 3. Bd3 Bb4+ 4. Bd2 Nc6 5. c3 Bd6
   9	00&#58;01	     879.495	771.486	+0.28	1. Nf3 Nc6 2. d4 Nf6 3. Bd2 e6 4. Nc3 Bb4 5. e3 O-O <HT>
   9	00&#58;01	     881.616	773.347	+0.28	1. Nf3 Nc6 2. d4 Nf6 3. Bd2 e6 4. Nc3 Bb4 5. e3 O-O <HT>
  10	00&#58;01	   1.117.274	765.256	+0.14	1. Nf3 Nf6 2. Nc3 d5 3. e3 Bf5 4. Bb5+ c6 5. Bd3 Bxd3 6. cxd3
  10	00&#58;02	   1.661.431	758.644	+0.14	1. Nf3 Nf6 2. Nc3 d5 3. e3 Bf5 4. Bb5+ c6 5. Bd3 Bxd3 6. cxd3
  11	00&#58;03	   2.445.488	766.610	+0.31	1. Nf3 Nf6 2. e3 e6 3. Be2 d5 4. O-O Bd6 5. d3 O-O 6. Bd2
  11	00&#58;03	   2.775.179	768.747	+0.31	1. Nf3 Nf6 2. e3 e6 3. Be2 d5 4. O-O Bd6 5. d3 O-O 6. Bd2
  12	00&#58;04	   3.655.730	721.051	+0.01	1. Nf3 Nf6 2. e3 e6 3. d4 d5 4. Bb5+ Bd7 5. Bxd7+ Nfxd7 6. Bd2 Bd6 7. O-O O-O
  12	00&#58;08	   6.456.006	742.069	+0.19	1. e4 e5 2. Nf3 Nf6 3. d4 exd4 4. e5 Qe7 5. Be2 Ng4 6. Qxd4 d6 7. exd6 Qxd6
  12	00&#58;10	   8.154.309	759.954	+0.19	1. e4 e5 2. Nf3 Nf6 3. d4 exd4 4. e5 Qe7 5. Be2 Ng4 6. Qxd4 d6 7. exd6 Qxd6
  13	00&#58;15	  12.229.512	765.301	+0.23	1. e4 e5 2. Nf3 Nf6 3. d4 Nxe4 4. Bd3 d5 5. dxe5 Bc5 6. O-O O-O 7. Bf4
  13	00&#58;18	  14.438.834	781.322	+0.23	1. e4 e5 2. Nf3 Nf6 3. d4 Nxe4 4. Bd3 d5 5. dxe5 Bc5 6. O-O O-O 7. Bf4
  14	00&#58;27	  22.345.871	798.066	+0.23	1. e4 e5 2. Nf3 Nf6 3. d4 exd4 4. e5 Qe7 5. Be2 Ng4 6. Qxd4 d6 7. Bf4 Bf5 8. exd6 cxd6
  14	00&#58;35	  29.034.922	806.525	+0.23	1. e4 e5 2. Nf3 Nf6 3. d4 exd4 4. e5 Qe7 5. Be2 Ng4 6. Qxd4 d6 7. Bf4 Bf5 8. exd6 cxd6



FEN&#58; rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 



Crafty64&#58;

   8	00&#58;00	     245.190	1.225.950	+0.04	1. e4 Nc6 2. Bc4 Nf6 3. Nc3 e5 4. d3 Bc5
   8	00&#58;00	     313.243	1.204.780	+0.04	1. e4 Nc6 2. Bc4 Nf6 3. Nc3 e5 4. d3 Bc5
   9	00&#58;00	     504.384	1.200.914	+0.04	1. e4 d5 2. exd5 Qxd5 3. Nc3 Qe6+ 4. Qe2 Nf6 5. Nb5 Nd5
   9	00&#58;00	     648.220	1.223.056	+0.15	1. d4 e6 2. e3 Nf6 3. Bd3 Bb4+ 4. Bd2 Nc6 5. c3 Bd6
   9	00&#58;00	     879.499	1.204.793	+0.28	1. Nf3 Nc6 2. d4 Nf6 3. Bd2 e6 4. Nc3 Bb4 5. e3 O-O <HT>
   9	00&#58;00	     881.620	1.175.493	+0.28	1. Nf3 Nc6 2. d4 Nf6 3. Bd2 e6 4. Nc3 Bb4 5. e3 O-O <HT>
  10	00&#58;00	   1.117.279	1.201.375	+0.14	1. Nf3 Nf6 2. Nc3 d5 3. e3 Bf5 4. Bb5+ c6 5. Bd3 Bxd3 6. cxd3
  10	00&#58;01	   1.661.481	1.161.874	+0.14	1. Nf3 Nf6 2. Nc3 d5 3. e3 Bf5 4. Bb5+ c6 5. Bd3 Bxd3 6. cxd3
  11	00&#58;02	   2.445.538	1.181.419	+0.31	1. Nf3 Nf6 2. e3 e6 3. Be2 d5 4. O-O Bd6 5. d3 O-O 6. Bd2
  11	00&#58;02	   2.775.229	1.175.944	+0.31	1. Nf3 Nf6 2. e3 e6 3. Be2 d5 4. O-O Bd6 5. d3 O-O 6. Bd2
  12	00&#58;03	   3.655.782	1.183.100	+0.01	1. Nf3 Nf6 2. e3 e6 3. d4 d5 4. Bb5+ Bd7 5. Bxd7+ Nfxd7 6. Bd2 Bd6 7. O-O O-O
  12	00&#58;05	   6.456.059	1.120.843	+0.19	1. e4 e5 2. Nf3 Nf6 3. d4 exd4 4. e5 Qe7 5. Be2 Ng4 6. Qxd4 d6 7. exd6 Qxd6
  12	00&#58;07	   8.194.652	1.128.739	+0.19	1. e4 e5 2. Nf3 Nf6 3. d4 exd4 4. e5 Qe7 5. Be2 Ng4 6. Qxd4 d6 7. exd6 Qxd6
  13	00&#58;10	  11.826.159	1.158.291	+0.23	1. e4 e5 2. Nf3 Nf6 3. d4 Nxe4 4. Bd3 d5 5. dxe5 Bc5 6. O-O O-O 7. Bf4
  13	00&#58;11	  14.112.155	1.155.786	+0.23	1. e4 e5 2. Nf3 Nf6 3. d4 Nxe4 4. Bd3 d5 5. dxe5 Bc5 6. O-O O-O 7. Bf4
  14	00&#58;19	  23.129.414	1.217.337	+0.23	1. e4 e5 2. Nf3 Nf6 3. d4 exd4 4. e5 Qe7 5. Be2 Ng4 6. Qxd4 d6 7. Bf4 Bf5 8. exd6 cxd6
  14	00&#58;24	  29.552.198	1.231.341	+0.23	1. e4 e5 2. Nf3 Nf6 3. d4 exd4 4. e5 Qe7 5. Be2 Ng4 6. Qxd4 d6 7. Bf4 Bf5 8. exd6 cxd6
I would like to know if I did something wrong. I compiled from the command line with /DNT_i386. Do I have to define any other symbol? I also made 32 and 64 bit linux compiles that gave the same nodes as the win32 executable so maybe its a compiler bug. I compiled with and without optimization and the result was the same for the win64.

Thanks.
I have not seen that happen. So a couple of questions first:

I assume different machines? If so, can you verify that the .craftyrc file is identical on both? IE one doesn't have endgame tables, the other not? One doesn't have a larger or smaller hash table than the other?

Barring that, I would suspect the compiler since this is one of the first tests we always do, verifying node counts across platforms to make sure we didn't let one of those very-difficult-to-find bugs slip in that sometimes show up when the compiler rearranges stuff due to different platforms...
Pablo Vazquez
Posts: 154
Joined: Thu May 31, 2007 9:05 pm
Location: Madrid, Spain

Re: Crafty 20.14: Different node count

Post by Pablo Vazquez »

I only used a pentium 4 at 3.4 Ghz for the test. I forgot to say that I compiled with /DNT_i386 /DNOEGTB for windows and -DLINUX -DNOEGTB for linux. I didn't use a .craftyrc file.

Now I'm even more puzzled because i tried the same with an old version (20.6) and now the nodes are the same for win32 and win64 (and linux of course). So maybe it was some change between 20.6 and 20.14?
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Crafty 20.14: Different node count

Post by bob »

Pablo Vazquez wrote:I only used a pentium 4 at 3.4 Ghz for the test. I forgot to say that I compiled with /DNT_i386 /DNOEGTB for windows and -DLINUX -DNOEGTB for linux. I didn't use a .craftyrc file.

Now I'm even more puzzled because i tried the same with an old version (20.6) and now the nodes are the same for win32 and win64 (and linux of course). So maybe it was some change between 20.6 and 20.14?
It is always possible that 20.14 had a bug, the code is certainly large enough and complex enough...