Interesting machine

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

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

Re: Interesting machine

Post by bob »

syzygy wrote:
bob wrote:Would be one hell of a machine to generate endgame tables..
Indeed...
Just for fun, how long does it normally take to generate through 5 pieces? and then 6 pieces? If it is reasonable, I can give it a whirl just to see how this thing works, if your generator is available?
syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: Interesting machine

Post by syzygy »

bob wrote:
syzygy wrote:
bob wrote:Would be one hell of a machine to generate endgame tables..
Indeed...
Just for fun, how long does it normally take to generate through 5 pieces? and then 6 pieces? If it is reasonable, I can give it a whirl just to see how this thing works, if your generator is available?
5 pieces take about an hour on my machine (i7-3930K at 4.2Ghz, 6 cores / 12 threads). 6 pieces around 100x as long.

My generator is available (see signature), but it expects a little endian machine and it uses a bit of x86 inline assembly for atomically doing updates to the tablebase arrays.

The inline assembly can now be replaced with C11 atomics (if you have a relatively recent gcc). That should not take me much time.

The endianness might be a non-issue, but that is not clear to me. What does the machine / the OS expect? But it can in any case be fixed and I should probably do that anyway at some point.
wgarvin
Posts: 838
Joined: Thu Jul 05, 2007 5:03 pm
Location: British Columbia, Canada

Re: Interesting machine

Post by wgarvin »

syzygy wrote:5 pieces take about an hour on my machine (i7-3930K at 4.2Ghz, 6 cores / 12 threads). 6 pieces around 100x as long.
Just an aside.. its awesome that we now live in a world where someone can generate 6-piece tablebases for chess in less than a week on a single machine costing only a few thousand dollars. (At least using a sufficiently-clever generator, which yours is)
hammerklavier
Posts: 113
Joined: Mon Nov 28, 2011 10:17 am

Re: Interesting machine

Post by hammerklavier »

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

Re: Interesting machine

Post by bob »

hammerklavier wrote:Benchmark! Please Robert!
It is about 80% as fast as the 2660 20 core box I have been using...

I have it running a LONG smp test. When that finishes I will post the bench output for that and the 2660 machine...
lauriet
Posts: 199
Joined: Sun Nov 03, 2013 9:32 am

Re: Interesting machine

Post by lauriet »

Hi bob,
I have an old commadore 64 you can also

:D

:D
lauriet
Posts: 199
Joined: Sun Nov 03, 2013 9:32 am

Re: Interesting machine

Post by lauriet »

Hi bob,
I have an old commadore 64 you can also

:D

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

Re: Interesting machine

Post by bob »

lauriet wrote:Hi bob,
I have an old commadore 64 you can also

:D

:D
This is a bit newer. :) 20 cores, 1 terabyte of DRAM. Got anything close? :)
lauriet
Posts: 199
Joined: Sun Nov 03, 2013 9:32 am

Re: Interesting machine

Post by lauriet »

Well the commadore comes with a nice shinny 5 1/4" drive.
Surely that sweatens the offer ?
syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: Interesting machine

Post by syzygy »

syzygy wrote:
bob wrote:
syzygy wrote:
bob wrote:Would be one hell of a machine to generate endgame tables..
Indeed...
Just for fun, how long does it normally take to generate through 5 pieces? and then 6 pieces? If it is reasonable, I can give it a whirl just to see how this thing works, if your generator is available?
5 pieces take about an hour on my machine (i7-3930K at 4.2Ghz, 6 cores / 12 threads). 6 pieces around 100x as long.

My generator is available (see signature), but it expects a little endian machine and it uses a bit of x86 inline assembly for atomically doing updates to the tablebase arrays.

The inline assembly can now be replaced with C11 atomics (if you have a relatively recent gcc). That should not take me much time.

The endianness might be a non-issue, but that is not clear to me. What does the machine / the OS expect? But it can in any case be fixed and I should probably do that anyway at some point.
OK, if you are interested, you could try this version:
https://github.com/syzygy1/tb/tree/c11
https://github.com/syzygy1/tb/archive/c11.zip
It requires a relatively recent gcc (with c11 atomics support).

- download the zip file and extract
- specify desired number of max threads in src/Makefile (-DMAX_THREADS=N)
- make all
- test, e.g. with 8 threads: ./rtbgen -t 8 KQvK
- see if probing of KQvK works: ./rtbgen -t 8 KQQvK

This should create four files:

Code: Select all

$ md5sum *.rtbw?
21070fc6c230cce12f6f6b615c9f1eb4  KQQvK.rtbw
fccaac715e6b2d5540db71ebe6284b49  KQQvK.rtbz
f06221548404795b6b33469e247b4560  KQvK.rtbw
ac866466e16eb19a4f8c796f8e1abd2b  KQvK.rtbz
File sizes should be 7056, 25936, 272, 5392.
(If the md5sums do not match but the file sizes do, my attempt to port the internal (non-md5) checksum calculation to big endian was not yet fully successful.)

rtbgen creates pawnless tables, rtbgenp creates pawnful tables.

Create all 5-piece TBs:

Code: Select all

$ ./run.pl --generate --threads 160 --min 3 --max 5
Hmmm, run.pl expects rtbgen and rtbgenp to be in your $PATH.

Don't bother with rtbver and rtbverp (or with ./run.pl --verify).

Of course untested on a power 8 machine, so the above is likely to break down at some point ;-).