White to move (and win?)

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

Moderator: Ras

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

Re: White to move (and win?)

Post by bob »

zullil wrote:
bob wrote:
OK, thanks. That wasn't clear from the output... Pretty quick hardware, I was hitting around 24M on the old 8-core cluster boxes we have had for at least 3 years now...
Dual quad 2.26GHz Nehalem Mac Pro using 2048M hash. The changes you made in 23.2 have increased speeds by about 20% for me, at least in certain positions.
Do you have a hardware popcnt routine? I have one laying around somewhere if you want to try it, although we are not talking a major improvement. Would actually be interesting to see how much it helps. I had trouble measuring speed when I was playing with the Nehalem here since turbo-boost really screws up 1 vs 2 vs 4 vs 8 cpu scaling tests. I turned it off out of sheer disgust...
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: White to move (and win?)

Post by zullil »

bob wrote:
Do you have a hardware popcnt routine? I have one laying around somewhere if you want to try it, although we are not talking a major improvement. Would actually be interesting to see how much it helps. I had trouble measuring speed when I was playing with the Nehalem here since turbo-boost really screws up 1 vs 2 vs 4 vs 8 cpu scaling tests. I turned it off out of sheer disgust...
Yes, the chip(s) supports popcnt. I'm happy to give it a try with Crafty. Just let me know what I need to do. Thanks.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: White to move (and win?)

Post by bob »

zullil wrote:
bob wrote:
Do you have a hardware popcnt routine? I have one laying around somewhere if you want to try it, although we are not talking a major improvement. Would actually be interesting to see how much it helps. I had trouble measuring speed when I was playing with the Nehalem here since turbo-boost really screws up 1 vs 2 vs 4 vs 8 cpu scaling tests. I turned it off out of sheer disgust...
Yes, the chip(s) supports popcnt. I'm happy to give it a try with Crafty. Just let me know what I need to do. Thanks.
I believe all you need to do is re-compile, after adding -DPOPCNT (I assume you are compiling for 64 bits, which uses "inline64.h"...

That will do the trick.
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: White to move (and win?)

Post by zullil »

bob wrote:
I believe all you need to do is re-compile, after adding -DPOPCNT (I assume you are compiling for 64 bits, which uses "inline64.h"...

That will do the trick.
Oh. I didn't realize I could do that. Perhaps -DPOPCNT should be mentioned at the top of the default makefile? I compiled with -DINLINE64, so I guess my binary has a popcnt function written in assembly but not a "one-liner" that uses the popcnt instruction?

I'll have to do some experimentation---just as soon as my (academic) schedule allows. Thanks, Bob.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: White to move (and win?)

Post by bob »

zullil wrote:
bob wrote:
I believe all you need to do is re-compile, after adding -DPOPCNT (I assume you are compiling for 64 bits, which uses "inline64.h"...

That will do the trick.
Oh. I didn't realize I could do that. Perhaps -DPOPCNT should be mentioned at the top of the default makefile? I compiled with -DINLINE64, so I guess my binary has a popcnt function written in assembly but not a "one-liner" that uses the popcnt instruction?

I'll have to do some experimentation---just as soon as my (academic) schedule allows. Thanks, Bob.
Sorry. That was added as an afterthought when I was testing the Dell Nehalem box here last year. I wanted to see if popcnt would affect execution time much, but never thought to make it "official". It definitely works, and I made it an option because our 64 bit clusters all have non-popcnt hardware.

I'll add instructions in the Makefile.

If you don't use -DPOPCNT it uses a simple a&a-1 loop to count the bits, which is still way fast and runs out of cache.