DiscoCheck 4.0.0 (release candidate)

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

Moderator: Ras

lucasart
Posts: 3242
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: DiscoCheck 4.0.0 (release candidate)

Post by lucasart »

ZirconiumX wrote: Congrats on releasing DC4 - and to think that DC1 was 1947 Elo - you've made a huge amount of progress.

At that rate of development Stockfish might have a new challenger.
Thanks for the kind words. However going from 1900 elo to 2700 elo never felt like I was doing anything particularly smart. It's essentially a matter of doing all the basic stuff, and fixing bugs. But getting from there to to Stockfish's level is a different story...
It's now become very hard to make significant elo improvements with trivial code patches. There are no more low hanging fruits out there :cry:
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
User avatar
Werner
Posts: 2997
Joined: Wed Mar 08, 2006 10:09 pm
Location: Germany
Full name: Werner Schüle

Re: DiscoCheck 4.0.0 (release candidate)

Post by Werner »

Jim Ablett wrote:These are the dll files needed to run Lucas's compile.
https://dl.dropbox.com/u/5047625/libstdc%2B%2B-6.dll
https://dl.dropbox.com/u/5047625/libgcc_s_sjlj-1.dll
I recompiled my binaries again for v 4.0.1. I still wasn't happy with the speed.
These are much faster :)
https://dl.dropbox.com/u/5047625/discocheck-401-ja.zip
Mirror:
http://cl.ly/MSiF/discocheck-401-ja.zip
Android direct link:
https://dl.dropbox.com/u/5047625/discocheck-android-ja
Jim.
Hi Jim,
two remarks:
-here at least the intel popcount compile 4.0.0 is a bit faster than 4.0.1 on my Core I7 920 - don´t know why :)
- Last compile from Lucas still crashes here after starting the engine in a game (I have downloaded both dlls).
I can give in the uci command - but not start the engine in a game or e.g. with the bench command.

At the moment I use your Version 4.0.0 intel popcount here for the tests.
Werner
lucasart
Posts: 3242
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: DiscoCheck 4.0.0 (release candidate)

Post by lucasart »

ZirconiumX wrote: In all of my tests, Clang has performed FASTER than GCC.
Well it looks like the new version GCC 4.8 is a huge improvement then, as it beats the pants of Clang 3.2:
http://www.phoronix.com/scan.php?page=a ... svn1&num=1
Also they've made a lot of effort to make GCC produce understandable error messages. This is especially important in C++
http://gcc.gnu.org/wiki/ClangDiagnosticsComparison
So yes, Clang is moving fast. But GCC is not dead yet. It is still the King of compilers for a while.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
Anton
Posts: 3549
Joined: Sun Mar 26, 2006 5:53 pm

Re: DiscoCheck 4.0.0 (release candidate)

Post by Anton »

Jim Ablett wrote:Ok new proper, faster builds are up.


https://dl.dropbox.com/u/5047625/discocheck-400-ja.zip
Mirror:
http://cl.ly/MScR/discocheck-400-ja.zip

Android direct link:
https://dl.dropbox.com/u/5047625/discoc ... android-ja

Code: Select all

32 bit bench (32 bit system)

signature = 7217665
time = 27.8594


64 bit bench

signature = 7217665
time = 17.9531
I would be interested to know the compiler options you used to build the 64bit Linux AMD popcnt version, your build is getting approx 2.5% speed increase over the non-popcnt version, and approx 2.5% speed increase over the version built here using gcc 4.7.2

Code: Select all

g++ ./src/*.cc -o ./chess -DNDEBUG -std=c++11 -O3 -flto -fno-rtti -Wall -s -march=bdver2 -mtune=bdver2 -mpopcnt
signature = 7217665
time = 5.30099
User avatar
Jim Ablett
Posts: 2330
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: DiscoCheck 4.0.0 (release candidate)

Post by Jim Ablett »

Anton wrote:
Jim Ablett wrote:Ok new proper, faster builds are up.


https://dl.dropbox.com/u/5047625/discocheck-400-ja.zip
Mirror:
http://cl.ly/MScR/discocheck-400-ja.zip

Android direct link:
https://dl.dropbox.com/u/5047625/discoc ... android-ja

Code: Select all

32 bit bench (32 bit system)

signature = 7217665
time = 27.8594


64 bit bench

signature = 7217665
time = 17.9531
I would be interested to know the compiler options you used to build the 64bit Linux AMD popcnt version, your build is getting approx 2.5% speed increase over the non-popcnt version, and approx 2.5% speed increase over the version built here using gcc 4.7.2

Code: Select all

g++ ./src/*.cc -o ./chess -DNDEBUG -std=c++11 -O3 -flto -fno-rtti -Wall -s -march=bdver2 -mtune=bdver2 -mpopcnt
signature = 7217665
time = 5.30099
Hi Anton,

using

Code: Select all

-mpopcnt


will do nothing without a small code change to 'Bitboard.cc' >

Code: Select all

int count_bit_max15(Bitboard b)
{
	
return __builtin_popcountll(b);

}
For AMD (PhenomII etc) that have SSE4a instructions use switches >

Code: Select all

-march=amdfam10 -mtune=amdfam10 -mpopcnt
For INTEL (corei5/i7) that have SSE4.2 instructions use switches >

Code: Select all

-msse4.2 -march=corei7 -mtune=corei7 -mpopcnt

Also you can try using

Code: Select all

-fprofile-generate
&

Code: Select all

-fprofile-use

together with

Code: Select all

-flto
Jim.
Anton
Posts: 3549
Joined: Sun Mar 26, 2006 5:53 pm

Re: DiscoCheck 4.0.0 (release candidate)

Post by Anton »

Thanks for that Jim, I must surely qualify for idiot of the week for using popcnt without changing the code :lol: Changing the code in bitboard.cc gave a nice 6% increase in speed..

signature = 6600551
time = 5.02796


Quickly profiling with "bench 14" gave an additional 7% increase,

g++ ./src/*.cc -o ./chess -DNDEBUG -std=c++11 -O3 -flto -fno-rtti -Wall -s -march=bdver2 -mtune=bdver2 -mpopcnt -fprofile-use -flto

signature = 6600551
time = 4.71872
User avatar
Jim Ablett
Posts: 2330
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: DiscoCheck 4.0.0 (release candidate)

Post by Jim Ablett »

Anton wrote:Thanks for that Jim, I must surely qualify for idiot of the week for using popcnt without changing the code :lol: Changing the code in bitboard.cc gave a nice 6% increase in speed..

signature = 6600551
time = 5.02796


Quickly profiling with "bench 14" gave an additional 7% increase,

g++ ./src/*.cc -o ./chess -DNDEBUG -std=c++11 -O3 -flto -fno-rtti -Wall -s -march=bdver2 -mtune=bdver2 -mpopcnt -fprofile-use -flto

signature = 6600551
time = 4.71872

That signature is bad. should be

Code: Select all

7217665
Julien had that problem with his Osx compile and fixed it by removing -flto

Jim.
Anton
Posts: 3549
Joined: Sun Mar 26, 2006 5:53 pm

Re: DiscoCheck 4.0.0 (release candidate)

Post by Anton »

Jim Ablett wrote:
That signature is bad. should be

Code: Select all

7217665
Julien had that problem with his Osx compile and fixed it by removing -flto

Jim.
Hi Jim,

Ran some more tests with and without -flto, makes no difference to the signature, what it is is the popcnt code(or the way I implemented it in bitboard.cc), reverted back to the original bitboard.cc, and all is fine.

g++ ./src/*.cc -o ./chess -DNDEBUG -std=c++11 -O3 -flto -fno-rtti -Wall -s -march=bdver2 -mtune=bdver2 -fprofile-use

signature = 7217665
time = 5.19121
Last edited by Anton on Fri Feb 01, 2013 10:26 pm, edited 1 time in total.
ZirconiumX
Posts: 1361
Joined: Sun Jul 17, 2011 11:14 am
Full name: Hannah Ravensloft

Re: DiscoCheck 4.0.0 (release candidate)

Post by ZirconiumX »

lucasart wrote:
ZirconiumX wrote: In all of my tests, Clang has performed FASTER than GCC.
Well it looks like the new version GCC 4.8 is a huge improvement then, as it beats the pants of Clang 3.2:
http://www.phoronix.com/scan.php?page=a ... svn1&num=1
Also they've made a lot of effort to make GCC produce understandable error messages. This is especially important in C++
http://gcc.gnu.org/wiki/ClangDiagnosticsComparison
So yes, Clang is moving fast. But GCC is not dead yet. It is still the King of compilers for a while.
The link you quote contains a build of Crafty v23.4 - where Clang takes the lead. GCC may be best for other things, though.

Matthew:out
tu ne cede malis, sed contra audentior ito
Anton
Posts: 3549
Joined: Sun Mar 26, 2006 5:53 pm

Re: DiscoCheck 4.0.0 (release candidate)

Post by Anton »

Anton wrote:
Jim Ablett wrote:
That signature is bad. should be

Code: Select all

7217665
Julien had that problem with his Osx compile and fixed it by removing -flto

Jim.
Hi Jim,

Ran some more tests with and without -flto, makes no difference to the signature, what it is is the popcnt code(or the way I implemented it in bitboard.cc), reverted back to the original bitboard.cc, and all is fine.

g++ ./src/*.cc -o ./chess -DNDEBUG -std=c++11 -O3 -flto -fno-rtti -Wall -s -march=bdver2 -mtune=bdver2 -fprofile-use

signature = 7217665
time = 5.19121
Finally got it right by correctly adding the changes to bitboard.cc, sorry for any confusion caused.
g++ ./src/*.cc -o ./chess -DNDEBUG -std=c++11 -O3 -flto -fno-rtti -Wall -s -march=bdver2 -mtune=bdver2 -fprofile-use -mpopcnt

signature = 7217665
time = 5.06175