Stockfish 9

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

Moderators: hgm, Dann Corbit, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
foolnotion
Posts: 4
Joined: Wed Nov 30, 2016 12:50 pm

Re: Stockfish 9

Post by foolnotion » Sat Feb 03, 2018 4:04 pm

syzygy wrote: Did you have a problem compiling cfish with pgo? (Or is "pgo" just missing from the name?)

It surprises me that clang generates faster code for you (at least with SF).
Ah no I just somehow overlooked it, sorry. I was more concerned that non profiled stockfish is that much slower. I'll add it to the results when it's ready.

leavenfish
Posts: 282
Joined: Mon Sep 02, 2013 6:23 am

Re: Stockfish 9

Post by leavenfish » Sat Feb 03, 2018 4:30 pm

Nordlandia wrote:
Ron Langeveld wrote:That depends on the context of use. The worth of default contempt in an analysis context may actually be negative.

I bet the playchess engine game fanboys really love the elo jump though, even when they are well below top tier 'competitors' and should actually disable it since they all use the same engine anyway ;)
It still boggles my mind why permanent brain can't be activated in playchess engine matches.
It 'boggles my mind' that people get off on engine matches. For testing, sure, but otherwise.... :roll:

foolnotion
Posts: 4
Joined: Wed Nov 30, 2016 12:50 pm

Re: Stockfish 9

Post by foolnotion » Sat Feb 03, 2018 4:34 pm

syzygy wrote:
foolnotion wrote:Here's a summary of my benchmarks (stockfish vs cfish vs asmfish)
https://i.imgur.com/FLjHVmy.png

pgo = profile optimized builds
compiler versions: clang-5.0, gcc-7.2
Did you have a problem compiling cfish with pgo? (Or is "pgo" just missing from the name?)

It surprises me that clang generates faster code for you (at least with SF).
Cfish profile build with clang failed: https://pastebin.com/Pmzb801b
The new results: https://i.imgur.com/f09Dnzg.png
Raw data: https://pastebin.com/9XqyK7D5

I forgot to mention my cpu is Haswell i7 4790k

ICfish looks amazingly good in multithreading, I think i will need to retest it.
I am using https://github.com/sharkdp/hyperfine for benchmarking.

syzygy
Posts: 4906
Joined: Tue Feb 28, 2012 10:56 pm

Re: Stockfish 9

Post by syzygy » Sat Feb 03, 2018 5:19 pm

foolnotion wrote:
syzygy wrote:
foolnotion wrote:Here's a summary of my benchmarks (stockfish vs cfish vs asmfish)
https://i.imgur.com/FLjHVmy.png

pgo = profile optimized builds
compiler versions: clang-5.0, gcc-7.2
Did you have a problem compiling cfish with pgo? (Or is "pgo" just missing from the name?)

It surprises me that clang generates faster code for you (at least with SF).
Cfish profile build with clang failed: https://pastebin.com/Pmzb801b
I've seen these error messages myself. I guess I should have a look at the Makefile.
The new results: https://i.imgur.com/f09Dnzg.png
Raw data: https://pastebin.com/9XqyK7D5

I forgot to mention my cpu is Haswell i7 4790k

ICfish looks amazingly good in multithreading, I think i will need to retest it.
I am using https://github.com/sharkdp/hyperfine for benchmarking.
Surprising results again! Thanks for testing.

asmFish is still not up to date, so it can be tricky to compare. But a depth 20 bench probably evens things out pretty well.

syzygy
Posts: 4906
Joined: Tue Feb 28, 2012 10:56 pm

Re: Stockfish 9

Post by syzygy » Sun Feb 04, 2018 12:24 am

syzygy wrote:
foolnotion wrote:
syzygy wrote:
foolnotion wrote:Here's a summary of my benchmarks (stockfish vs cfish vs asmfish)
https://i.imgur.com/FLjHVmy.png

pgo = profile optimized builds
compiler versions: clang-5.0, gcc-7.2
Did you have a problem compiling cfish with pgo? (Or is "pgo" just missing from the name?)

It surprises me that clang generates faster code for you (at least with SF).
Cfish profile build with clang failed: https://pastebin.com/Pmzb801b
I've seen these error messages myself. I guess I should have a look at the Makefile.
This should now be fixed. (Add COMP=mingw to the build command. Add lto=yes to enable LTO.)

On a related note, am I correct in thinking that the Stockfish Makefile does not use LTO (link-time optimization) when compiling with clang?

zullil
Posts: 6442
Joined: Mon Jan 08, 2007 11:31 pm
Location: PA USA
Full name: Louis Zulli

Re: Stockfish 9

Post by zullil » Sun Feb 04, 2018 12:32 am

syzygy wrote:
syzygy wrote:
foolnotion wrote:
syzygy wrote:
foolnotion wrote:Here's a summary of my benchmarks (stockfish vs cfish vs asmfish)
https://i.imgur.com/FLjHVmy.png

pgo = profile optimized builds
compiler versions: clang-5.0, gcc-7.2
Did you have a problem compiling cfish with pgo? (Or is "pgo" just missing from the name?)

It surprises me that clang generates faster code for you (at least with SF).
Cfish profile build with clang failed: https://pastebin.com/Pmzb801b
I've seen these error messages myself. I guess I should have a look at the Makefile.
This should now be fixed. (Add COMP=mingw to the build command. Add lto=yes to enable LTO.)

On a related note, am I correct in thinking that the Stockfish Makefile does not use LTO (link-time optimization) when compiling with clang?
LTO is only used with gcc and with mingw running under linux.

syzygy
Posts: 4906
Joined: Tue Feb 28, 2012 10:56 pm

Re: Stockfish 9

Post by syzygy » Sun Feb 04, 2018 2:05 am

zullil wrote:
syzygy wrote:On a related note, am I correct in thinking that the Stockfish Makefile does not use LTO (link-time optimization) when compiling with clang?
LTO is only used with gcc and with mingw running under linux.
And there seems to be no good reason for that.

foolnotion
Posts: 4
Joined: Wed Nov 30, 2016 12:50 pm

Re: Stockfish 9

Post by foolnotion » Sun Feb 04, 2018 4:34 pm

syzygy wrote:
syzygy wrote:
foolnotion wrote:
syzygy wrote:
foolnotion wrote:Here's a summary of my benchmarks (stockfish vs cfish vs asmfish)
https://i.imgur.com/FLjHVmy.png

pgo = profile optimized builds
compiler versions: clang-5.0, gcc-7.2
Did you have a problem compiling cfish with pgo? (Or is "pgo" just missing from the name?)

It surprises me that clang generates faster code for you (at least with SF).
Cfish profile build with clang failed: https://pastebin.com/Pmzb801b
I've seen these error messages myself. I guess I should have a look at the Makefile.
This should now be fixed. (Add COMP=mingw to the build command. Add lto=yes to enable LTO.)

On a related note, am I correct in thinking that the Stockfish Makefile does not use LTO (link-time optimization) when compiling with clang?
Thanks for fixing the Makefile, I've included the bench results for the cfish clang pgo build. I also tested with lto=yes but there was no improvement so I left those out.

Chart: https://i.imgur.com/RW8mhOR.png
Chart data: https://pastebin.com/zi7eghQa

It's still surprising for me that cfish gains that much speed in multi-threading thanks to PGO. Sorry if this is a stupid question, but is it possible that PGO optimizes for the specific positions being benched?

syzygy
Posts: 4906
Joined: Tue Feb 28, 2012 10:56 pm

Re: Stockfish 9

Post by syzygy » Sun Feb 04, 2018 5:15 pm

foolnotion wrote:It's still surprising for me that cfish gains that much speed in multi-threading thanks to PGO. Sorry if this is a stupid question, but is it possible that PGO optimizes for the specific positions being benched?
PGO does a first pass to collect statistics on what parts of the program are executed the most and on how often branches are taken. The second pass then uses this information to make more educated guesses on how to optimize the program. Since the statistics are collected by doing a bench, there is some amount of optimisation for those bench positions. But I don't think this is a big factor. Move generation, search and evaluation aren't that different from position to position, and the bench positions themselves are meant to be representative of typical positions that occur in a typical game.

I also find it surprising that PGO has such an effect on multi-threaded speed. It may have to do with a smaller cache footprint of Cfish which on your machine only starts to make a difference with multiple threads. But why this effect is absent without PGO is not clear to me.

Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 10:41 am

Re: Stockfish 9

Post by Lyudmil Tsvetkov » Sun Feb 04, 2018 10:24 pm

Thank you, Marco!
Sorry, I am so busy, that just noticed.

Is this stronger or weaker than SF 8?
Anyway, we will soon find out. :D

Anyone accepting bets I will be the person on the Planet who will use SF 9 most?

Post Reply