Octochess r5178 released

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

Moderators: hgm, Rebel, chrisw

User avatar
JuLieN
Posts: 2949
Joined: Mon May 05, 2008 12:16 pm
Location: Bordeaux (France)
Full name: Julien Marcel

Re: Octochess r5178 released

Post by JuLieN »

Codesquid wrote:OS X is weird :(

For the first error, #include <sys/sysctl.h> and replace the entire function body with this:

Code: Select all

int get_system_memory&#40;)
&#123;
	uint64_t v;size_t l=8;sysctlbyname&#40;"hw.memsize",&v,&l,0,0&#41;;return v / 1024 / 1024;
&#125;
For the second error, replace MAP_ANONYMOUS with MAP_ANON.

I don't have access to a decent compiler on OS X, so haven't tested it myself.

After finishing compiling Octochess, make sure to run octochess test to run the selftest routines. It has to pass, otherwise the build is bad. If you then execute octochess --threads 1 --depth 18 --memory 1 --moves 1 auto, 51954300 needs to be the total number of nodes printed at the very end.
It solved the problems, but a few other ones occurred. First I had to get rid of the -static switch, as it didn't work. Explanation in the man page:
This option will not work on Mac OS X unless all libraries (including libgcc.a) have also been compiled with -static. Since neither a static version of libSystem.dylib nor crt0.o are provided, this option is not useful to most people.
Then every file compiled without problems, until the final linkage :

Code: Select all

g++ -O3 -g -pipe -march=corei7 -Wall -Wextra -flto -m64 -std=gnu++0x -pthread -o octochess util/logger.o util/mutex_unix.o util/platform.o util/string.o util/thread.o util/time.o calc.o config.o context.o detect_check.o endgame.o epd.o eval.o eval_values.o fen.o hash.o history.o magic.o moves.o pawn_structure_hash_table.o pgn.o phased_move_generator.o position.o pvlist.o pv_move_picker.o random.o score.o see.o seen_positions.o selftest.o simple_book.o statistics.o tables.o tweak.o util.o zobrist.o chess.o xboard.o uci/info.o uci/minimalistic_uci_protocol.o uci/octochess_impl.o uci/runner.o uci/time_calculation.o
lto1&#58; internal compiler error&#58; in lhd_decl_printable_name, at langhooks.c&#58;221

lto1&#58; internal compiler error&#58; Abort trap&#58; 6
g++&#58; internal compiler error&#58; Abort trap&#58; 6 &#40;program lto1&#41;
lto-wrapper&#58; g++ terminated with signal 6 &#91;Abort trap&#58; 6&#93;
collect2&#58; error&#58; lto-wrapper returned 1 exit status
make&#58; *** &#91;octochess&#93; Error 1
:( :cry: Any idea how to fix this ?
"The only good bug is a dead bug." (Don Dailey)
[Blog: http://tinyurl.com/predateur ] [Facebook: http://tinyurl.com/fbpredateur ] [MacEngines: http://tinyurl.com/macengines ]
User avatar
Codesquid
Posts: 138
Joined: Tue Aug 23, 2011 10:25 pm
Location: Germany

Re: Octochess r5178 released

Post by Codesquid »

Bug in the compiler :(

Which GCC version do you use? Update to 4.8.1 if it is any older.
nanos gigantium humeris insidentes
Modern Times
Posts: 3546
Joined: Thu Jun 07, 2012 11:02 pm

Re: Octochess r5178 released

Post by Modern Times »

If anyone plays chess960 with this under ChessGUI, it needs the "960_OO" setting rather than the more usual "960_HAha" setting for UCI engines. That means it probably won't work under Shredder GUI, but probably will under Arena.
User avatar
Codesquid
Posts: 138
Joined: Tue Aug 23, 2011 10:25 pm
Location: Germany

Re: Octochess r5178 released

Post by Codesquid »

Modern Times wrote:If anyone plays chess960 with this under ChessGUI, it needs the "960_OO" setting rather than the more usual "960_HAha" setting for UCI engines. That means it probably won't work under Shredder GUI, but probably will under Arena.
What's the difference?
nanos gigantium humeris insidentes
User avatar
JuLieN
Posts: 2949
Joined: Mon May 05, 2008 12:16 pm
Location: Bordeaux (France)
Full name: Julien Marcel

Re: Octochess r5178 released

Post by JuLieN »

Codesquid wrote:Bug in the compiler :(

Which GCC version do you use? Update to 4.8.1 if it is any older.
I do use gcc-4.8.1 :

Code: Select all

gcc version 4.8.1 &#40;MacPorts gcc48 4.8.1_1&#41; 
"The only good bug is a dead bug." (Don Dailey)
[Blog: http://tinyurl.com/predateur ] [Facebook: http://tinyurl.com/fbpredateur ] [MacEngines: http://tinyurl.com/macengines ]
Modern Times
Posts: 3546
Joined: Thu Jun 07, 2012 11:02 pm

Re: Octochess r5178 released

Post by Modern Times »

Codesquid wrote:
Modern Times wrote:If anyone plays chess960 with this under ChessGUI, it needs the "960_OO" setting rather than the more usual "960_HAha" setting for UCI engines. That means it probably won't work under Shredder GUI, but probably will under Arena.
What's the difference?
Matthias or HG can explain better than me.
User avatar
JuLieN
Posts: 2949
Joined: Mon May 05, 2008 12:16 pm
Location: Bordeaux (France)
Full name: Julien Marcel

Re: Octochess r5178 released

Post by JuLieN »

Ok, I finally produced a working binary! I had to get rid of the -flto switch in order to do so. Also, at first the binary threw an exception :

Code: Select all

MBP&#58;chess julienmarcel$ sudo ./octochess 
terminate called after throwing an instance of 'std&#58;&#58;runtime_error'
  what&#40;)&#58;  locale&#58;&#58;facet&#58;&#58;_S_create_c_locale name not valid
After googling a bit, I found the solution : I had to type the following line in the terminal :

Code: Select all

export LC_ALL=C
And now octochess works well:

Code: Select all

Octochess

uci
id name Octochess
id author Tim Kosse
option name Hash type spin default 2730 min 4 max 1048576
option name Threads type spin default 8 min 1 max 8
option name OwnBook type check default false
option name Ponder type check default true
option name MultiPV type spin default 1 min 1 max 99
option name UCI_Chess960 type check default false
uciok
ucinewgame
perft 5
unknown command when connected&#58; perft 5
go depth 20
info depth 1 seldepth 0 nodes 0 multipv 1 score cp 9 time 0 pv b1c3  
info depth 2 seldepth 2 nodes 99 multipv 1 score cp 67 time 3 nps 30669 pv b1c3 b8c6  
info depth 3 seldepth 3 nodes 337 multipv 1 score cp 9 time 4 nps 79368 pv b1c3 b8c6 g1f3  
info depth 4 seldepth 5 nodes 1030 multipv 1 score cp 15 time 6 nps 147437 pv b1c3 b8c6 g1f3 g8f6  
info depth 5 seldepth 6 nodes 2086 multipv 1 score cp 9 time 9 nps 209542 pv b1c3 b8c6 g1f3 g8f6 d2d4  
info depth 6 seldepth 6 nodes 4194 multipv 1 score cp 26 time 15 nps 264355 pv b1c3 b8c6 g1f3 g8f6 d2d4 d7d5  
info depth 7 seldepth 8 nodes 7104 multipv 1 score cp 9 time 21 nps 329285 pv b1c3 b8c6 g1f3 g8f6 d2d4 d7d5 c1f4  
info depth 8 seldepth 12 nodes 39522 multipv 1 score cp 6 time 63 nps 619389 pv b1c3 d7d5 g1f3 b8c6 d2d4 g8f6 c1f4 c8f5  
info depth 8 seldepth 12 nodes 67163 multipv 1 score cp 23 time 93 nps 715527 pv e2e3 b8c6 g1f3 g8f6 b1c3 d7d5 f1d3 c6b4  
info depth 9 seldepth 12 nodes 74819 multipv 1 score cp -1 time 103 nps 723826 pv e2e3 b8c6 g1f3 g8f6 b1c3 d7d5 f1d3 c6b4 f3e5  
info depth 9 seldepth 12 nodes 82633 multipv 1 score cp 9 time 111 nps 738045 pv b1c3 d7d5 g1f3 b8c6 d2d4 g8f6 c1f4 c8f5 a2a3  
info depth 10 seldepth 15 nodes 199733 multipv 1 score cp 26 time 232 nps 857506 pv b1c3 g8f6 g1f3 d7d5 d2d4 b8c6 e2e3 c8d7 f1d3 c6b4  
info depth 11 seldepth 17 nodes 300603 multipv 1 score cp 23 time 328 nps 914994 pv b1c3 g8f6 g1f3 b8c6 d2d4 d7d5 e2e3 c8d7 f1d3 c6b4 f3e5  
info depth 12 seldepth 17 nodes 506462 multipv 1 score cp 38 time 468 nps 1080440 pv b1c3 g8f6 g1f3 b8c6 d2d4 d7d5 e2e3 c8d7 f1d3 c6b4 f3e5 d7e6  
info depth 13 seldepth 20 nodes 710919 multipv 1 score cp 35 time 582 nps 1219764 pv b1c3 g8f6 g1f3 b8c6 d2d4 d7d5 e2e3 c8d7 f1d3 e7e6 e1g1 c6b4 d3e2  
info depth 14 seldepth 20 nodes 1102856 multipv 1 score cp 23 time 764 nps 1443358 pv b1c3 g8f6 g1f3 b8c6 d2d4 d7d5 e2e3 c8d7 f1d3 e7e6 e1g1 f8d6 c3b5 e8g8  
info depth 15 seldepth 20 nodes 1938442 multipv 1 score cp 19 time 1493 nps 1297667 pv b1c3 g8f6 g1f3 b8c6 d2d4 d7d5 e2e3 c8d7 f1d3 e7e6 e1g1 f8d6 c3b5 c6b4 b5d6  
info depth 16 seldepth 25 nodes 3798510 multipv 1 score cp 18 time 2173 nps 1747643 pv b1c3 g8f6 g1f3 b8c6 d2d4 d7d5 e2e3 e7e6 f1d3 f8d6 c3b5 c6b4 b5d6 c7d6 c1d2 d8b6  
info depth 16 seldepth 26 nodes 12609951 multipv 1 score cp 40 time 4797 nps 2628676 pv e2e4 e7e6 g1f3 d7d5 e4d5 e6d5 d2d4 g8f6 f1b5 c7c6 b5d3 f8b4 c2c3 d8e7 c1e3 b4d6  
info depth 17 seldepth 26 nodes 17044063 multipv 1 score cp 38 time 5921 nps 2878187 pv e2e4 e7e6 g1f3 d7d5 e4d5 e6d5 d2d4 g8f6 f1b5 c7c6 b5d3 f8b4 c2c3 d8e7 c1e3 b4d6 e1g1  
info depth 18 seldepth 33 nodes 31162790 multipv 1 score cp 38 time 9384 nps 3320765 pv e2e4 e7e6 g1f3 d7d5 b1c3 g8f6 e4e5 f6e4 f1d3 e4c3 d2c3 f8e7 e1g1 b8c6 c1e3 e8g8 d1d2 c8d7  
info depth 19 seldepth 33 nodes 57674749 multipv 1 score cp 19 time 16009 nps 3602574 pv e2e4 e7e5 g1f3 b8c6 b1c3 g8f6 d2d4 e5d4 f3d4 f8b4 d4c6 b4c3 b2c3 b7c6 f1d3 d7d6 e1g1 e8g8 c1e3  
info depth 20 seldepth 34 nodes 86279954 multipv 1 score cp 25 time 23503 nps 3670961 pv e2e4 e7e5 g1f3 b8c6 b1c3 g8f6 f1c4 f8c5 e1g1 d7d6 d2d3 e8g8 c3a4 c5b6 c2c3 c8e6 c4e6 f7e6 b2b4 d8e7  

Node stats&#58;
  Total&#58;               102532919
  Full-width&#58;           35414857
  Busiest/max depth&#58;     11 / 34
  Quiescence&#58;           67118062
  Nodes per second&#58;      3672920
  Time per node&#58;          272 ns

Transposition table stats&#58;
- Number of entries&#58;    55953449 &#40;41.6886%)
- Lookup misses&#58;        69051923 &#40;67.1596%)
- Lookup hits&#58;          25036151 &#40;24.35%)
- Lookup best moves&#58;     8729584 &#40;8.49035%)
- Index collisions&#58;      2144849

Pawn structure hash table stats&#58;
- Hits&#58;        49542720 &#40;95.2914%)
- Misses&#58;       2448038 &#40;4.7086%)

bestmove e2e4 ponder e7e5
Elapsed&#58; 27915 ms
I'll put an archive together and upload it to my mac engines repository soon.
"The only good bug is a dead bug." (Don Dailey)
[Blog: http://tinyurl.com/predateur ] [Facebook: http://tinyurl.com/fbpredateur ] [MacEngines: http://tinyurl.com/macengines ]
User avatar
Codesquid
Posts: 138
Joined: Tue Aug 23, 2011 10:25 pm
Location: Germany

Re: Octochess r5178 released

Post by Codesquid »

Thanks Julien. I've committed two changes to the repository to fix the compile errors in util/unix.cpp and to catch the locale exception.

I would be glad if you could checkout https://svn.filezilla-project.org/svn/chess/ and check whether it compiles on your machine.
nanos gigantium humeris insidentes
User avatar
JuLieN
Posts: 2949
Joined: Mon May 05, 2008 12:16 pm
Location: Bordeaux (France)
Full name: Julien Marcel

Re: Octochess r5178 released

Post by JuLieN »

Codesquid wrote:Thanks Julien. I've committed two changes to the repository to fix the compile errors in util/unix.cpp and to catch the locale exception.

I would be glad if you could checkout https://svn.filezilla-project.org/svn/chess/ and check whether it compiles on your machine.
I still had to turn off the -static and -flto switches, but appart from that everything went fine. :)

I added Octochess to my batch of new compiles : http://www.talkchess.com/forum/viewtopic.php?p=531702
"The only good bug is a dead bug." (Don Dailey)
[Blog: http://tinyurl.com/predateur ] [Facebook: http://tinyurl.com/fbpredateur ] [MacEngines: http://tinyurl.com/macengines ]
Modern Times
Posts: 3546
Joined: Thu Jun 07, 2012 11:02 pm

Re: Octochess r5178 released

Post by Modern Times »

Chess960 support is solid. It has played 300 games so far, error-free.