Senpai 1.0 (new engine)

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

Moderators: hgm, Rebel, chrisw

phenri
Posts: 284
Joined: Tue Aug 13, 2013 9:44 am

Re: Senpai 1.0 (new engine)

Post by phenri »

For Linux users, no need to install GCC because it is already installed by default in all distributions.
And you could have a much better compilation optimized for your machine, if you compiled yourself with the "native" switch.
To do this, simply run a command line.

http://gcc.gnu.org/onlinedocs/gcc-4.7.3 ... rch=native
Using -march=native enables all instruction subsets supported by the local machine (hence the result might not run on different machines).[/quote]

Code: Select all

g++ -static-libstdc++ -std=c++11 -fno-rtti -pthread -O3 -march=native -Wall -Wextra -Wfatal-errors senpai_10.cpp -o senpai_native -s
sudo chown <user> senpai_native
Here is a small benchmark with a huge difference between SSE3 and SSE4.2

Code: Select all

position fen rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
go depth 19
#nodes 7872303 time 17337 nps 454075

-march=core2
Intel Core2 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3 and SSSE3 instruction set support.

Code: Select all

g++ -static-libstdc++ -std=c++11 -fno-rtti -pthread -O3 -march=core2 -Wall -Wextra -Wfatal-errors senpai_10.cpp -o senpai_core2 -s
#nodes 7872303 time 11447 nps 687717

-march=corei7
Intel Core i7 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1 and SSE4.2 instruction set support.

Code: Select all

g++ -static-libstdc++ -std=c++11 -fno-rtti -pthread -O3 -march=corei7 -Wall -Wextra -Wfatal-errors senpai_10.cpp -o senpai_corei7 -s
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Senpai 1.0 (new engine)

Post by lucasart »

phenri wrote:For Linux users, no need to install GCC because it is already installed by default in all distributions.
No. Only the C compiler is installed by default. The C++ compiler and the hundreds of MB of C++ library that come with it, are not there by default. Anyway, for most distro, it's easy as pie (just install the package called 'g++').
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
phenri
Posts: 284
Joined: Tue Aug 13, 2013 9:44 am

Re: Senpai 1.0 (new engine)

Post by phenri »

lucasart wrote:
phenri wrote:For Linux users, no need to install GCC because it is already installed by default in all distributions.
No. Only the C compiler is installed by default. The C++ compiler and the hundreds of MB of C++ library that come with it, are not there by default. Anyway, for most distro, it's easy as pie (just install the package called 'g++').
I'm not sure because most current distibutions weighs between 800MB and 1.5GB. And it will surprise me a lot that g ++ is not in one of these extremely well compressed packages.
But you are right, it is much easier to choose and to instal gcc in Linux than in Windows.
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Senpai 1.0 (new engine)

Post by zullil »

phenri wrote:
lucasart wrote:
phenri wrote:For Linux users, no need to install GCC because it is already installed by default in all distributions.
No. Only the C compiler is installed by default. The C++ compiler and the hundreds of MB of C++ library that come with it, are not there by default. Anyway, for most distro, it's easy as pie (just install the package called 'g++').
I'm not sure because most current distibutions weighs between 800MB and 1.5GB. And it will surprise me a lot that g ++ is not in one of these extremely well compressed packages.
But you are right, it is much easier to choose and to instal gcc in Linux than in Windows.
I just switched to linux from OS X, and was surprised to discover that I did indeed have to install g++, just as Lucas said.
phenri
Posts: 284
Joined: Tue Aug 13, 2013 9:44 am

Re: Senpai 1.0 (new engine)

Post by phenri »

zullil wrote:
phenri wrote:
lucasart wrote:
phenri wrote:For Linux users, no need to install GCC because it is already installed by default in all distributions.
No. Only the C compiler is installed by default. The C++ compiler and the hundreds of MB of C++ library that come with it, are not there by default. Anyway, for most distro, it's easy as pie (just install the package called 'g++').
I'm not sure because most current distibutions weighs between 800MB and 1.5GB. And it will surprise me a lot that g ++ is not in one of these extremely well compressed packages.
But you are right, it is much easier to choose and to instal gcc in Linux than in Windows.
I just switched to linux from OS X, and was surprised to discover that I did indeed have to install g++, just as Lucas said.
That's right, I remember now that I installed g+ + as a dependency when I build xboard.
User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: Senpai 1.0 (new engine)

Post by michiguel »

lucasart wrote:
phenri wrote:For Linux users, no need to install GCC because it is already installed by default in all distributions.
No. Only the C compiler is installed by default. The C++ compiler and the hundreds of MB of C++ library that come with it, are not there by default. Anyway, for most distro, it's easy as pie (just install the package called 'g++').
Besides, it is needed some of the last versions of g++ that support C++11. If you have installed, for instance, Ubuntu 12.04 LTS (long term service), the proper version is not there. Not only that, if the libraries are not linked statically, the binary won't run in most linux distributions that are not updated to the latest g++.

None of this take into account a pgo compile, which gives a nice boost (that is the binary contained in the official distribution). So, if the people are going to make their own compile, consider including that option.

Miguel
Zhu.Jianzhao
Posts: 59
Joined: Tue Sep 18, 2012 11:30 am
Location: Nanjing, China

Re: Senpai 1.0 (new engine)

Post by Zhu.Jianzhao »

There may be problems regarding the speed of Senpai running at TCEC 7.

The speed is only 1k~2k N/s for the mid and endgame, which is slower than the Senpai running on my laptop using 1 core....

Looking at the ongoing game "Senpai 1 - Komodo 8" at TCEC, the speed of Senpai there (-- running at 16 cores) is much slower than Senpai running on my i7 4700MQ, from position after move 15.
User avatar
Guenther
Posts: 4622
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: Senpai 1.0 (new engine)

Post by Guenther »

Zhu.Jianzhao wrote:There may be problems regarding the speed of Senpai running at TCEC 7.

The speed is only 1k~2k N/s for the mid and endgame, which is slower than the Senpai running on my laptop using 1 core....

Looking at the ongoing game "Senpai 1 - Komodo 8" at TCEC, the speed of Senpai there (-- running at 16 cores) is much slower than Senpai running on my i7 4700MQ, from position after move 15.
Thanks for the report. This forced me to file a bug report myself!

Actually I tested Senpai in March/April and luckily at that time I only used fast tc with 1 thread and 128MB hash under CuteCli and had not much problems(I vaguely remembered unloading problems in various GUIs though).
Now I wanted to reproduce something with more threads after reading your report.
To my surprise there were lots of problems and due to completely different conditions(WB GUI - different hash - different threads number) I needed quite a while to figure out what causes them.

Finally I found out that Senpai crashes before move 1 when threads is set >1 in game mode(around depth 13/14).
Moreover it does not crash in analysis mode but always shows only usage of 1 thread independent from the setting(e.g. 2,4).

NOTE: This is the 32bit compile which was offered in this thread and here it is used under WINXP on a Quadcore from 2011.

Error happens at 0x00035acd and/or 0x00000000 according to the crash reports from windows. Not sure if the second is real.

Code: Select all

Ereignistyp&#58;	Fehler
Ereignisquelle&#58;	Application Error
Ereigniskategorie&#58;	Keine
Ereigniskennung&#58;	1000
Datum&#58;		14.10.2014
Zeit&#58;		13&#58;14&#58;19
Benutzer&#58;		Nicht zutreffend
Computer&#58;	CAPPUCCINO
Beschreibung&#58;
Fehlgeschlagene Anwendung senpai10.exe, Version 0.0.0.0, fehlgeschlagenes Modul senpai10.exe, Version 0.0.0.0, Fehleradresse 0x00035acd.

Weitere Informationen über die Hilfe- und Supportdienste erhalten Sie unter http&#58;//go.microsoft.com/fwlink/events.asp.
Daten&#58;
0000&#58; 41 70 70 6c 69 63 61 74   Applicat
0008&#58; 69 6f 6e 20 46 61 69 6c   ion Fail
0010&#58; 75 72 65 20 20 73 65 6e   ure  sen
0018&#58; 70 61 69 31 30 2e 65 78   pai10.ex
0020&#58; 65 20 30 2e 30 2e 30 2e   e 0.0.0.
0028&#58; 30 20 69 6e 20 73 65 6e   0 in sen
0030&#58; 70 61 69 31 30 2e 65 78   pai10.ex
0038&#58; 65 20 30 2e 30 2e 30 2e   e 0.0.0.
0040&#58; 30 20 61 74 20 6f 66 66   0 at off
0048&#58; 73 65 74 20 30 30 30 33   set 0003
0050&#58; 35 61 63 64 0d 0a         5acd..  

Ereignistyp&#58;	Fehler
Ereignisquelle&#58;	Application Error
Ereigniskategorie&#58;	Keine
Ereigniskennung&#58;	1000
Datum&#58;		14.10.2014
Zeit&#58;		13&#58;12&#58;02
Benutzer&#58;		Nicht zutreffend
Computer&#58;	CAPPUCCINO
Beschreibung&#58;
Fehlgeschlagene Anwendung senpai10.exe, Version 0.0.0.0, fehlgeschlagenes Modul , Version 0.0.0.0, Fehleradresse 0x00000000.

Weitere Informationen über die Hilfe- und Supportdienste erhalten Sie unter http&#58;//go.microsoft.com/fwlink/events.asp.
Daten&#58;
0000&#58; 41 70 70 6c 69 63 61 74   Applicat
0008&#58; 69 6f 6e 20 46 61 69 6c   ion Fail
0010&#58; 75 72 65 20 20 73 65 6e   ure  sen
0018&#58; 70 61 69 31 30 2e 65 78   pai10.ex
0020&#58; 65 20 30 2e 30 2e 30 2e   e 0.0.0.
0028&#58; 30 20 69 6e 20 20 30 2e   0 in  0.
0030&#58; 30 2e 30 2e 30 20 61 74   0.0.0 at
0038&#58; 20 6f 66 66 73 65 74 20    offset 
0040&#58; 30 30 30 30 30 30 30 30   00000000
0048&#58; 0d 0a                     ..      
Are there other 32bit compiles for XP I could test?


Guenther
User avatar
Guenther
Posts: 4622
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: Senpai 1.0 (new engine)

Post by Guenther »

Guenther wrote:
Are there other 32bit compiles for XP I could test?

Guenther
I found three 32 bit compiles from Lucas around a week later than the original Senpai and they all behave as described before.
User avatar
Guenther
Posts: 4622
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: Senpai 1.0 (new engine)

Post by Guenther »

Guenther wrote:
Guenther wrote:
Are there other 32bit compiles for XP I could test?

Guenther
I found three 32 bit compiles from Lucas around a week later than the original Senpai and they all behave as described before.
bump...

Is there really no working Senpai SMP 32 bit available? Fabien?