Crafty 21.6

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

Moderators: hgm, Rebel, chrisw

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

Re: Crafty 21.6 single cpu 7.6% faster on my computer

Post by bob »

Dirt wrote:
bob wrote:
Dirt wrote:
Jim Ablett wrote:Crafty 21.6 win32 Intel Compiler 10 p.g.o (single-cpu)

http://mihd.net/frxlg3

Jim.
Thanks.
Makes no sense to me. On my machines, compiling without SMP is a bare fraction of one percent. There is only one if-test that gets executed in search, once for each node searched. No way it can be 7% of the total time...
I checked again, with similar results. This time I ran in safe mode (to make sure I got a different memory layout) and got only a slightly smaller difference in time. The speedup actually increased to 8.11% due to everything speeding up in safe mode.

I'm don't doubt you about the extra instructions not taking that much time. Given that, my guess is that the memory footprint of the new compile fits my computer's cache better; unless Jim did something different when he made the single CPU version.
If you compile with and without SMP support, the actual engine kernel footprint is only a few dozen bytes bigger. There are some arrays that are created, but they are not used during execution and so do not affect cache footprint at all. I doubt the total executable size is significantly different unless you compile with cpus=8 which creates some pretty large arrays of split blocks.

I just tested here and the speed difference was essentially zero, which is what I would expect for bigger searches...
User avatar
Jim Ablett
Posts: 1385
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: Problem found, SMP version now 1% faster!

Post by Jim Ablett »

bob wrote:
<stuff>
I think that should read 'Get stuffed!' :lol:

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

Re: Crafty 21.6 single cpu 7.6% faster on my computer

Post by bob »

Dirt wrote:
bob wrote:
Dirt wrote:
Jim Ablett wrote:Crafty 21.6 win32 Intel Compiler 10 p.g.o (single-cpu)

http://mihd.net/frxlg3

Jim.
Thanks.
Makes no sense to me. On my machines, compiling without SMP is a bare fraction of one percent. There is only one if-test that gets executed in search, once for each node searched. No way it can be 7% of the total time...
I checked again, with similar results. This time I ran in safe mode (to make sure I got a different memory layout) and got only a slightly smaller difference in time. The speedup actually increased to 8.11% due to everything speeding up in safe mode.

I'm don't doubt you about the extra instructions not taking that much time. Given that, my guess is that the memory footprint of the new compile fits my computer's cache better; unless Jim did something different when he made the single CPU version.
Is everything else exactly the same? IE running in the same directory so that you use the same .craftyrc... testing on the same exact position... etc. I don't see enough difference in SMP vs non-SMP to matter. I only keep the non-SMP option around so that I can do things like the old SPEC version where SMP is not usable...
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Problem found, SMP version now 1% faster!

Post by bob »

Dirt wrote:
bob wrote:<stuff>
To test I had just removed the crafty.rc file from my Crafty directory and compared it (using the bench command) against the Crafty in the directory created by unzipping the single CPU distribution. What I had overlooked is that Jim included a crafty.rc in his distribution, which gave his version an advantage.
OK. I was reading the first response first and suggested checking to make sure everything is exactly the same. Looks like you found the issue...
Guetti

Re: Crafty 21.6

Post by Guetti »

Tony Thomas wrote:
Guetti wrote:I have a problem that one thread doesn't get killed when I quit crafty while it is searching. This happens only when 4 threads are used. Could somebody try this on another system? It could be specific to my setup with OS X.
May be you should read the rest of the thread, that's exactly what they are talking about. By using the command BOB mentioned, you will be able to get around the problem, in version 21.7.
Forget it, I can't even reproduce it.
But They are talking about:
Can Crafty 21.6 play vs another engine with 4 threads on the same quad-core computer without using cpu-time on the opponents move?
My problem was different, in that one of the for threads continued to run as a ghost thread after completely quitting crafty until I pulled the plug of my computer...
Tony Thomas

Re: Crafty 21.6

Post by Tony Thomas »

Guetti wrote:
Tony Thomas wrote:
Guetti wrote:I have a problem that one thread doesn't get killed when I quit crafty while it is searching. This happens only when 4 threads are used. Could somebody try this on another system? It could be specific to my setup with OS X.
May be you should read the rest of the thread, that's exactly what they are talking about. By using the command BOB mentioned, you will be able to get around the problem, in version 21.7.
Forget it, I can't even reproduce it.
But They are talking about:
Can Crafty 21.6 play vs another engine with 4 threads on the same quad-core computer without using cpu-time on the opponents move?
My problem was different, in that one of the for threads continued to run as a ghost thread after completely quitting crafty until I pulled the plug of my computer...
I have no clue what's going on in your case. Did you try to end the task using task manager? Crafty always used 1 thread during opponents time with ponder off, I see that your case is indeed different. If it is reproduceable, then it does sounds like a bug.