Linux port of newer versions of TogaII

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
krazyken

Re: Linux port of newer versions of TogaII

Post by krazyken » Mon Oct 20, 2008 12:08 am

Seems to be 100% on the second non-book move. Or on move 2 if you take away the book. These latest tests were with 1.41SE, but I get same stuff with 1.45bc as well.

Michel
Posts: 2210
Joined: Sun Sep 28, 2008 11:50 pm

Re: Linux port of newer versions of TogaII

Post by Michel » Mon Oct 20, 2008 7:08 am

Thanks for the info,

You didn't specify if your computer is 32/64 bit. How many CPU's?

Unfortunately for the moment I cannot reproduce the problem on Linux. But it must definitely be a bug in the toga sources which must be squashed. I will try to think about what it can possibly be.

For the record, and if you have time, could you run polgyglot with a log file and post the exact UCI commands leading to the crash? Since as you say the crash occurs at ply 2 there should be only a few. Then I can try to run Toga under a memory debugger to see if that reproduces the problem.

Even the single threaded version of Toga 1.4.1SE is still substantially stronger than 1.3.4 accoding to the CCRL. So there is still a point in compiling the latest Toga's for the Mac.

Regards,
Michel

krazyken

Re: Linux port of newer versions of TogaII

Post by krazyken » Mon Oct 20, 2008 8:00 am

My system is 64-bit, 8 cpus. Number of threads used when compiling hasn't made a difference, compiling 32 bit or 64 bit doesn't make a difference either. I do have 3.1.2SE compiled for single thread which is very similar in strength 1.4.1SE.

What might be interesting would be to see if the crash is reproducible on a BSD system.

Polyglot log does not tell too much:

Code: Select all

POLYGLOT *** START ***
POLYGLOT INI file "polyglot.ini"
POLYGLOT Dir "/Chess/ChessApps/TogaII/"
POLYGLOT Command "./Toga2"
> ENGINE uci
< ENGINE Toga II 1.4.1SE UCI based on Fruit 2.1 by Thomas Gaksch and Fabien Letouzey. Settings by Dieter Eberle
< ENGINE Experimental engine by Chris Formula. Code was based on Toga II 1.4 Beta5c by Thomas Gaksch
< ENGINE EgbbProbe not Loaded!
< ENGINE id name Toga II 1.4.1SE
< ENGINE id author Thomas Gaksch and Fabien Letouzey
< ENGINE option name Hash type spin default 16 min 4 max 1024
< ENGINE option name Search Time type spin default 0 min 0 max 3600
< ENGINE option name Search Depth type spin default 0 min 0 max 20
< ENGINE option name Ponder type check default false
< ENGINE option name OwnBook type check default true
< ENGINE option name BookFile type string default performance.bin
< ENGINE option name Bitbases Path type string default c&#58;/egbb/
< ENGINE option name Bitbases Cache Size type spin default 16 min 16 max 1024
< ENGINE option name MultiPV type spin default 1 min 1 max 10
< ENGINE option name NullMove Pruning type combo default Always var Always var Fail High var Never
< ENGINE option name NullMove Reduction type spin default 3 min 1 max 4
< ENGINE option name Verification Search type combo default Always var Always var Endgame var Never
< ENGINE option name Verification Reduction type spin default 5 min 1 max 6
< ENGINE option name History Pruning type check default true
< ENGINE option name History Threshold type spin default 70 min 0 max 100
< ENGINE option name Futility Pruning type check default true
< ENGINE option name Futility Margin type spin default 100 min 0 max 500
< ENGINE option name Extended Futility Margin type spin default 200 min 0 max 900
< ENGINE option name Delta Pruning type check default true
< ENGINE option name Delta Margin type spin default 50 min 0 max 500
< ENGINE option name Quiescence Check Plies type spin default 1 min 0 max 2
< ENGINE option name Material type spin default 100 min 0 max 400
< ENGINE option name Piece Activity type spin default 100 min 0 max 400
< ENGINE option name Piece Square Activity type spin default 100 min 0 max 400
< ENGINE option name King Safety type spin default 100 min 0 max 400
< ENGINE option name Pawn Structure type spin default 100 min 0 max 400
< ENGINE option name Passed Pawns type spin default 100 min 0 max 400
< ENGINE option name Toga Lazy Eval type check default true
< ENGINE option name Toga Lazy Eval Margin type spin default 200 min 0 max 900
< ENGINE option name Toga King Safety type check default false
< ENGINE option name Toga King Safety Margin type spin default 1700 min 500 max 3000
< ENGINE option name Toga Extended History Pruning type check default false
< ENGINE uciok
> ENGINE setoption name Hash value 64
> ENGINE isready
< XBOARD xboard
< XBOARD protover 2
> XBOARD feature done=0
> XBOARD feature analyze=1
> XBOARD feature colors=0
> XBOARD feature draw=1
> XBOARD feature ics=1
> XBOARD feature myname="Toga II 1.4.1SE"
> XBOARD feature name=1
> XBOARD feature pause=0
> XBOARD feature ping=1
> XBOARD feature playother=1
> XBOARD feature reuse=1
> XBOARD feature san=0
> XBOARD feature setboard=1
> XBOARD feature sigint=0
> XBOARD feature sigterm=0
> XBOARD feature time=1
> XBOARD feature usermove=1
> XBOARD feature variants="normal"
< XBOARD accepted done
< XBOARD accepted analyze
< XBOARD accepted colors
< XBOARD accepted draw
< XBOARD accepted ics
< XBOARD accepted myname
< XBOARD accepted name
< XBOARD accepted pause
< XBOARD accepted ping
< XBOARD accepted playother
< XBOARD accepted reuse
< XBOARD accepted san
< XBOARD accepted setboard
< XBOARD accepted sigint
< XBOARD accepted sigterm
< XBOARD accepted time
< XBOARD accepted usermove
< XBOARD accepted variants
< ENGINE readyok
> XBOARD feature done=1
< XBOARD accepted done
< XBOARD new
POLYGLOT NEW GAME
POLYGLOT WAIT
> ENGINE ucinewgame
< XBOARD random
< XBOARD ics -
< XBOARD level 40 1 0
< XBOARD post
< XBOARD hard
POLYGLOT WAIT
< XBOARD easy
POLYGLOT WAIT
< XBOARD ping 1
> XBOARD pong 1
< XBOARD force
POLYGLOT WAIT
< XBOARD computer
< XBOARD name Xpdnt 080927
< XBOARD time 6000
< XBOARD otim 6000
< XBOARD usermove g1f3
POLYGLOT MOVE Nf3
POLYGLOT WAIT
< XBOARD go
POLYGLOT THINK
POLYGLOT START SEARCH
POLYGLOT FEN rnbqkbnr/pppppppp/8/8/8/5N2/PPPPPPPP/RNBQKB1R b KQkq - 1 1
> ENGINE position startpos moves g1f3
> ENGINE go wtime 60000 btime 60000 movestogo 40
< ENGINE info depth 1
< ENGINE info multipv 1 depth 1 seldepth 1 score cp -70 time 0 nodes 2 pv a7a5
> XBOARD 1 -70 0 2 a5
< ENGINE info multipv 1 depth 1 seldepth 1 score cp -64 time 0 nodes 4 pv b7b5
> XBOARD 1 -64 0 4 b5
< ENGINE info multipv 1 depth 1 seldepth 1 score cp -14 time 0 nodes 8 pv d7d5
> XBOARD 1 -14 0 8 d5
< ENGINE info depth 1 seldepth 2 time 0 nodes 46 nps 0
< ENGINE info depth 2
< ENGINE info multipv 1 depth 2 seldepth 2 score cp -34 time 0 nodes 50 pv d7d5 d2d4
> XBOARD 2 -34 0 50 d5 d4
< ENGINE info depth 2 seldepth 8 time 1 nodes 214 nps 0
< ENGINE info depth 3
< ENGINE info multipv 1 depth 3 seldepth 9 score cp -20 time 1 nodes 230 pv d7d5 d2d4 g8f6
> XBOARD 3 -20 0 230 d5 d4 Nf6
< ENGINE info depth 3 seldepth 9 time 1 nodes 814 nps 0
< ENGINE info depth 4
< ENGINE info multipv 1 depth 4 seldepth 9 score cp -30 time 1 nodes 661 pv d7d5 d2d4 g8f6 b1c3
> XBOARD 4 -30 0 661 d5 d4 Nf6 Nc3
< ENGINE info depth 4 seldepth 9 time 3 nodes 3062 nps 0
< ENGINE info depth 5
< ENGINE info multipv 1 depth 5 seldepth 11 score cp -20 time 4 nodes 2327 pv d7d5 d2d4 g8f6 b1c3 b8c6
> XBOARD 5 -20 0 2327 d5 d4 Nf6 Nc3 Nc6
< ENGINE info depth 5 seldepth 11 time 5 nodes 5534 nps 0
< ENGINE info depth 6
< ENGINE info multipv 1 depth 6 seldepth 11 score cp -20 time 8 nodes 4554 pv d7d5 d2d4 g8f6 b1c3 b8c6 c1f4
> XBOARD 6 -20 1 4554 d5 d4 Nf6 Nc3 Nc6 Bf4
< ENGINE info depth 6 seldepth 13 time 13 nodes 14358 nps 0
< ENGINE info depth 7
< ENGINE info multipv 1 depth 7 seldepth 13 score cp -20 time 17 nodes 10027 pv d7d5 d2d4 g8f6 b1c3 b8c6 c1f4 c8f5
> XBOARD 7 -20 2 10027 d5 d4 Nf6 Nc3 Nc6 Bf4 Bf5
< ENGINE info depth 7 seldepth 13 time 21 nodes 25080 nps 0
< ENGINE info depth 8
< ENGINE info multipv 1 depth 8 seldepth 15 score cp -7 time 31 nodes 19652 pv d7d5 d2d4 g8f6 b1c3 b8c6 d1d3 c8g4 c1f4
> XBOARD 8 -7 3 19652 d5 d4 Nf6 Nc3 Nc6 Qd3 Bg4 Bf4
< ENGINE info depth 8 seldepth 15 time 37 nodes 44480 nps 0
< ENGINE info depth 9
< ENGINE info multipv 1 depth 9 seldepth 16 score cp -23 time 50 nodes 30869 pv d7d5 d2d4 g8f6 b1c3 b8c6 c1f4 g7g6 e2e3
> XBOARD 9 -23 5 30869 d5 d4 Nf6 Nc3 Nc6 Bf4 g6 e3
< ENGINE info depth 9 seldepth 18 time 74 nodes 90872 nps 0
< ENGINE info depth 10
< ENGINE info multipv 1 depth 10 seldepth 20 score cp -23 time 132 nodes 82703 pv d7d5 e2e3 g8f6 b1c3 b8c6 f1b5 d8d6 e1g1 f6g4
> XBOARD 10 -23 13 82703 d5 e3 Nf6 Nc3 Nc6 Bb5 Qd6 O-O Ng4
< ENGINE info depth 10 seldepth 19 time 183 nodes 221678 nps 0
< ENGINE info depth 11
< ENGINE info multipv 1 depth 11 seldepth 24 score cp -27 time 361 nodes 224669 pv d7d5 d2d4 g8f6 c2c4 e7e6 c4d5 e6d5 b1c3 f8b4 d1a4 b8c6 f3e5 e8g8 e5c6 b4c3 b2c3 b7c6 a4c6
> XBOARD 11 -27 36 224669 d5 d4 Nf6 c4 e6 cxd5 exd5 Nc3 Bb4 Qa4+ Nc6 Ne5 O-O Nxc6 Bxc3+ bxc3 bxc6 Qxc6
< ENGINE info depth 11 seldepth 29 time 432 nodes 518196 nps 0
< ENGINE info depth 12
< ENGINE info multipv 1 depth 12 seldepth 30 score cp -17 time 666 nodes 404313 pv d7d5 d2d4 g8f6 c2c4 e7e6 c4d5 e6d5 b1c3 b8c6 d1b3 f8b4 c1f4
> XBOARD 12 -17 67 404313 d5 d4 Nf6 c4 e6 cxd5 exd5 Nc3 Nc6 Qb3 Bb4 Bf4
< ENGINE info multipv 1 depth 12 seldepth 24 score cp -11 time 859 nodes 537704 pv g8f6 d2d4 e7e6 b1c3 d7d5 e2e3 b8c6 f1d3 f8d6 e1g1 e8g8 f3g5
> XBOARD 12 -11 86 537704 Nf6 d4 e6 Nc3 d5 e3 Nc6 Bd3 Bd6 O-O O-O Ng5
< ENGINE info depth 12 seldepth 30 time 949 nodes 1140764 nps 0
< ENGINE info depth 13
< ENGINE info time 1012 nodes 1220000 nps 1205168 cpuload 1000
< ENGINE info hashfull 47
< ENGINE info multipv 1 depth 13 seldepth 30 score cp -29 time 1466 nodes 880682 pv g8f6 d2d4 d7d5 e2e3 b8c6 b1c3 c8g4 f1b5 f6e4 e1g1 e4c3 b2c3 d8d6 a1b1
> XBOARD 13 -29 147 880682 Nf6 d4 d5 e3 Nc6 Nc3 Bg4 Bb5 Ne4 O-O Nxc3 bxc3 Qd6 Rb1
< ENGINE info currmove d7d5 currmovenumber 2
< ENGINE info currmove b8c6 currmovenumber 3
< ENGINE info currmove d7d6 currmovenumber 4
< ENGINE info currmove e7e6 currmovenumber 5
< ENGINE info currmove b8a6 currmovenumber 6
< ENGINE info currmove g8h6 currmovenumber 7
< ENGINE info currmove f7f5 currmovenumber 8
< ENGINE info currmove b7b5 currmovenumber 9
< ENGINE info currmove b7b6 currmovenumber 10
< ENGINE info currmove g7g6 currmovenumber 11
< ENGINE info currmove a7a5 currmovenumber 12
< ENGINE info currmove h7h5 currmovenumber 13
< ENGINE info currmove c7c5 currmovenumber 14
< ENGINE info currmove a7a6 currmovenumber 15
< ENGINE info currmove h7h6 currmovenumber 16
< ENGINE info currmove c7c6 currmovenumber 17
< ENGINE info currmove f7f6 currmovenumber 18
< ENGINE info currmove g7g5 currmovenumber 19
< ENGINE info time 2025 nodes 2400000 nps 1185123 cpuload 1000
< ENGINE info hashfull 93
< ENGINE info currmove e7e5 currmovenumber 20
< ENGINE info depth 13 seldepth 30 time 2077 nodes 2459438 nps 1184092
< ENGINE info time 2077 nodes 2505315 nps 1206261 cpuload 1000
< ENGINE info hashfull 96
< ENGINE bestmove g8f6 ponder d2d4
> XBOARD 13 -29 208 2505315 Nf6 d4 d5 e3 Nc6 Nc3 Bg4 Bb5 Ne4 O-O Nxc3 bxc3 Qd6 Rb1
> XBOARD move g8f6
POLYGLOT MOVE Nf6
POLYGLOT THINK -> WAIT
< XBOARD time 5789
< XBOARD otim 5990
< XBOARD usermove d2d4
POLYGLOT MOVE d4
POLYGLOT WAIT -> THINK
POLYGLOT START SEARCH
POLYGLOT FEN rnbqkb1r/pppppppp/5n2/8/3P4/5N2/PPP1PPPP/RNBQKB1R b KQkq - 0 2
> ENGINE position startpos moves g1f3 g8f6 d2d4
> ENGINE go wtime 59900 btime 57890 movestogo 39
< ENGINE info depth 1
< ENGINE info multipv 1 depth 1 seldepth 1 score cp -20 time 0 nodes 2 pv d7d5
> XBOARD 1 -20 0 2 d5
< ENGINE info depth 1 seldepth 6 time 0 nodes 90 nps 0
< ENGINE info depth 2
< ENGINE info multipv 1 depth 2 seldepth 6 score cp -30 time 0 nodes 80 pv d7d5 b1c3
> XBOARD 2 -30 0 80 d5 Nc3
< ENGINE info depth 2 seldepth 6 time 0 nodes 272 nps 0
< ENGINE info depth 3
< ENGINE info multipv 1 depth 3 seldepth 7 score cp -20 time 1 nodes 275 pv d7d5 b1c3 b8c6
> XBOARD 3 -20 0 275 d5 Nc3 Nc6
< ENGINE info depth 3 seldepth 7 time 1 nodes 592 nps 0
< ENGINE info depth 4
< ENGINE info multipv 1 depth 4 seldepth 9 score cp -20 time 1 nodes 593 pv d7d5 b1c3 b8c6 c1f4
> XBOARD 4 -20 0 593 d5 Nc3 Nc6 Bf4
< ENGINE info depth 4 seldepth 9 time 1 nodes 1228 nps 0
< ENGINE info depth 5
< ENGINE info multipv 1 depth 5 seldepth 9 score cp -20 time 2 nodes 1213 pv d7d5 b1c3 b8c6 c1f4 c8f5
> XBOARD 5 -20 0 1213 d5 Nc3 Nc6 Bf4 Bf5
< ENGINE info depth 5 seldepth 9 time 2 nodes 2468 nps 0
< ENGINE info depth 6
< ENGINE info multipv 1 depth 8 seldepth 16 score cp -20 time 7 nodes 3617 pv d7d5 b1c3 d5d4 c3b5 b8c6 e2e3 e7e5 e3d4 e5d4
> XBOARD 8 -20 1 3617 d5 Nc3
< ENGINE info depth 6 seldepth 16 time 8 nodes 10638 nps 0
< ENGINE info depth 7
< ENGINE info depth 7 seldepth 16 time 9 nodes 12470 nps 0
< ENGINE info depth 8
< ENGINE info multipv 1 depth 9 seldepth 18 score cp -24 time 12 nodes 7282 pv d7d5 e2e3 b8c6 b1c3 c8g4 f1b5 f6e4 e1g1 e4c3 b2c3
> XBOARD 9 -24 1 7282 d5 e3 Nc6 Nc3 Bg4 Bb5 Ne4 O-O Nxc3 bxc3
< ENGINE EOF

krazyken

Re: Linux port of newer versions of TogaII

Post by krazyken » Mon Oct 20, 2008 8:17 am

krazyken wrote:Number of threads used when compiling hasn't made a difference
except of course for the case where threads=1

Michel
Posts: 2210
Joined: Sun Sep 28, 2008 11:50 pm

Re: Linux port of newer versions of TogaII

Post by Michel » Mon Oct 20, 2008 9:11 am

Ok I really can't reproduce this on Linux. Neither valgrind, libefence or gdb notices anything
suspicious when running a 2 thread binary.

These are the commands polyglot sends

Code: Select all

uci
setoption name Hash value 64
isready
ucinewgame
position startpos moves g1f3
go wtime 60000 btime 60000 movestogo 40
position startpos moves g1f3 g8f6 d2d4
go wtime 59900 btime 57890 movestogo 39
If you have time can you compile with -g and produce a backtrace with gdb (don't forget to NOT strip (LDFLAGS+=-s) the binary). Here is what I get

Code: Select all

gdb ./toga2
GNU gdb 6.8-debian
Copyright &#40;C&#41; 2008 Free Software Foundation, Inc.
License GPLv3+&#58; GNU GPL version 3 or later <http&#58;//gnu.org/licenses/gpl.html>
This is free software&#58; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
&#40;gdb&#41; run
Starting program&#58; /home/vdbergh/SRC/Toga141SE_linux/srctest/toga2 
&#91;Thread debugging using libthread_db enabled&#93;
Toga II 1.4.1SE UCI based on Fruit 2.1 by Thomas Gaksch and Fabien Letouzey. Settings by Dieter Eberle
Experimental engine by Chris Formula. Code was based on Toga II 1.4 Beta5c by Thomas Gaksch
EgbbProbe not Loaded!
uci
setoption name Hash value 64
isready
ucinewgame
position startpos moves g1f3
go wtime 60000 btime 60000 movestogo 40
position startpos moves g1f3 g8f6 d2d4
go wtime 59900 btime 57890 movestogo 39id name Toga II 1.4.1SE
id author Thomas Gaksch and Fabien Letouzey
option name Hash type spin default 16 min 4 max 1024
option name Search Time type spin default 0 min 0 max 3600
option name Search Depth type spin default 0 min 0 max 20
option name Ponder type check default false
option name OwnBook type check default true
option name BookFile type string default performance.bin
option name Bitbases Path type string default c&#58;/egbb/
option name Bitbases Cache Size type spin default 16 min 16 max 1024
option name MultiPV type spin default 1 min 1 max 10
option name NullMove Pruning type combo default Always var Always var Fail High var Never
option name NullMove Reduction type spin default 3 min 1 max 4
option name Verification Search type combo default Always var Always var Endgame var Never
option name Verification Reduction type spin default 5 min 1 max 6
option name History Pruning type check default true
option name History Threshold type spin default 70 min 0 max 100
option name Futility Pruning type check default true
option name Futility Margin type spin default 100 min 0 max 500
option name Extended Futility Margin type spin default 200 min 0 max 900
option name Delta Pruning type check default true
option name Delta Margin type spin default 50 min 0 max 500
option name Quiescence Check Plies type spin default 1 min 0 max 2
option name Material type spin default 100 min 0 max 400
option name Piece Activity type spin default 100 min 0 max 400
option name Piece Square Activity type spin default 100 min 0 max 400
option name King Safety type spin default 100 min 0 max 400
option name Pawn Structure type spin default 100 min 0 max 400
option name Passed Pawns type spin default 100 min 0 max 400
option name Toga Lazy Eval type check default true
option name Toga Lazy Eval Margin type spin default 200 min 0 max 900
option name Toga King Safety type check default false
option name Toga King Safety Margin type spin default 1700 min 500 max 3000
option name Toga Extended History Pruning type check default false
uciok
&#91;New Thread 0xb7dc56b0 &#40;LWP 12505&#41;&#93;
&#91;New Thread 0xb3d41b90 &#40;LWP 12514&#41;&#93;
readyok
info multipv 1 depth 1 seldepth 1 score cp -70 time 0 nodes 2 pv a7a5
info multipv 1 depth 1 seldepth 1 score cp -64 time 0 nodes 4 pv b7b5
info multipv 1 depth 1 seldepth 1 score cp -14 time 0 nodes 8 pv d7d5
info multipv 1 depth 2 seldepth 2 score cp -34 time 1 nodes 50 pv d7d5 d2d4
info multipv 1 depth 3 seldepth 9 score cp -20 time 2 nodes 230 pv d7d5 d2d4 g8f6
info multipv 1 depth 4 seldepth 9 score cp -30 time 3 nodes 630 pv d7d5 d2d4 g8f6 b1c3
info multipv 1 depth 5 seldepth 11 score cp -20 time 11 nodes 2300 pv d7d5 d2d4 g8f6 b1c3 b8c6
info multipv 1 depth 6 seldepth 11 score cp -20 time 50 nodes 4635 pv d7d5 d2d4 g8f6 b1c3 b8c6 c1f4
info depth 1
info depth 1 seldepth 2 time 10 nodes 46 nps 0
info depth 2
info depth 2 seldepth 8 time 11 nodes 196 nps 0
info depth 3
info depth 3 seldepth 8 time 11 nodes 336 nps 0
info depth 4
info depth 4 seldepth 8 time 13 nodes 1562 nps 0
info depth 5
info depth 5 seldepth 8 time 13 nodes 1818 nps 0
info depth 6
info depth 6 seldepth 9 time 15 nodes 2564 nps 0
info depth 7
info multipv 1 depth 7 seldepth 13 score cp -20 time 42 nodes 3682 pv d7d5 d2d4 g8f6 b1c3 b8c6 c1f4 c8f5
info depth 7 seldepth 13 time 66 nodes 10566 nps 0
info depth 8
info multipv 1 depth 8 seldepth 15 score cp -7 time 134 nodes 9719 pv d7d5 d2d4 g8f6 b1c3 b8c6 d1d3 c8g4 c1f4
info depth 8 seldepth 15 time 158 nodes 25288 nps 0
info depth 9
info multipv 1 depth 9 seldepth 16 score cp -20 time 286 nodes 22219 pv d7d5 d2d4 g8f6 b1c3 b8c6 d1d3 d8d6 c1g5 c8g4
info depth 9 seldepth 17 time 349 nodes 51256 nps 0
info depth 10
info multipv 1 depth 10 seldepth 19 score cp -20 time 510 nodes 38030 pv d7d5 d2d4 g8f6 b1c3 b8c6 e2e3 g7g6 f1d3 c8f5 d3f5 g6f5
info depth 10 seldepth 19 time 742 nodes 106958 nps 0
info depth 11
info time 1123 nodes 160000 nps 142481 cpuload 677
info hashfull 7
info multipv 1 depth 11 seldepth 20 score cp -20 time 1430 nodes 102181 pv d7d5 d2d4 g8f6 b1c3 e7e6 e2e3 f8d6 f1d3 e8g8 e1g1 b8c6
info currmove b8c6 currmovenumber 2
info currmove g8f6 currmovenumber 3
info currmove d7d6 currmovenumber 4
info currmove e7e6 currmovenumber 5
info currmove b8a6 currmovenumber 6
info currmove g8h6 currmovenumber 7
info currmove f7f5 currmovenumber 8
info currmove b7b5 currmovenumber 9
info currmove b7b6 currmovenumber 10
info currmove g7g6 currmovenumber 11
info currmove a7a5 currmovenumber 12
info currmove h7h5 currmovenumber 13
info currmove c7c5 currmovenumber 14
info currmove a7a6 currmovenumber 15
info currmove h7h6 currmovenumber 16
info currmove c7c6 currmovenumber 17
info currmove f7f6 currmovenumber 18
info currmove g7g5 currmovenumber 19
info currmove e7e5 currmovenumber 20
info depth 11 seldepth 21 time 1859 nodes 257836 nps 138721
info time 1948 nodes 268918 nps 136242 cpuload 678
info hashfull 11
bestmove d7d5 ponder d2d4
As you can nothing special. In your case there should be a segmentation fault and then
you can do "bt" to get a stack trace.

Alternatively I think I have some BSD livecd's lying around. I can play with that but this will
have to wait a bit until I find some free time.

Regards,
Michel

krazyken

Re: Linux port of newer versions of TogaII

Post by krazyken » Mon Oct 20, 2008 11:34 am

Code: Select all

&#40;gdb&#41; run
Starting program&#58; /Users/Kenny/Downloads/src/toga2 
Reading symbols for shared libraries ++. done
Toga II 1.4.1SE UCI based on Fruit 2.1 by Thomas Gaksch and Fabien Letouzey. Settings by Dieter Eberle
Experimental engine by Chris Formula. Code was based on Toga II 1.4 Beta5c by Thomas Gaksch
EgbbProbe not Loaded!
uci
id name Toga II 1.4.1SE
id author Thomas Gaksch and Fabien Letouzey
option name Hash type spin default 16 min 4 max 1024
option name Search Time type spin default 0 min 0 max 3600
option name Search Depth type spin default 0 min 0 max 20
option name Ponder type check default false
option name OwnBook type check default true
option name BookFile type string default performance.bin
option name Bitbases Path type string default c&#58;/egbb/
option name Bitbases Cache Size type spin default 16 min 16 max 1024
option name MultiPV type spin default 1 min 1 max 10
option name NullMove Pruning type combo default Always var Always var Fail High var Never
option name NullMove Reduction type spin default 3 min 1 max 4
option name Verification Search type combo default Always var Always var Endgame var Never
option name Verification Reduction type spin default 5 min 1 max 6
option name History Pruning type check default true
option name History Threshold type spin default 70 min 0 max 100
option name Futility Pruning type check default true
option name Futility Margin type spin default 100 min 0 max 500
option name Extended Futility Margin type spin default 200 min 0 max 900
option name Delta Pruning type check default true
option name Delta Margin type spin default 50 min 0 max 500
option name Quiescence Check Plies type spin default 1 min 0 max 2
option name Material type spin default 100 min 0 max 400
option name Piece Activity type spin default 100 min 0 max 400
option name Piece Square Activity type spin default 100 min 0 max 400
option name King Safety type spin default 100 min 0 max 400
option name Pawn Structure type spin default 100 min 0 max 400
option name Passed Pawns type spin default 100 min 0 max 400
option name Toga Lazy Eval type check default true
option name Toga Lazy Eval Margin type spin default 200 min 0 max 900
option name Toga King Safety type check default false
option name Toga King Safety Margin type spin default 1700 min 500 max 3000
option name Toga Extended History Pruning type check default false
uciok
setoption name Hash value 64
isready
readyok
ucinewgame
position startpos moves g1f3
go wtime 60000 btime 60000 movestogo 40
info depth 1
info multipv 1 depth 1 seldepth 1 score cp -70 time 0 nodes 2 pv a7a5
info multipv 1 depth 1 seldepth 1 score cp -64 time 0 nodes 4 pv b7b5
info multipv 1 depth 1 seldepth 1 score cp -14 time 0 nodes 8 pv d7d5
info depth 1 seldepth 2 time 0 nodes 46 nps 0
info depth 2
info multipv 1 depth 2 seldepth 2 score cp -34 time 0 nodes 50 pv d7d5 d2d4
info depth 2 seldepth 8 time 1 nodes 214 nps 0
info depth 3
info multipv 1 depth 3 seldepth 9 score cp -20 time 1 nodes 230 pv d7d5 d2d4 g8f6
info depth 3 seldepth 9 time 1 nodes 842 nps 0
info depth 4
info multipv 1 depth 4 seldepth 9 score cp -30 time 1 nodes 630 pv d7d5 d2d4 g8f6 b1c3
info depth 4 seldepth 9 time 3 nodes 3136 nps 0
info depth 5
info multipv 1 depth 5 seldepth 9 score cp -20 time 2 nodes 969 pv d7d5 d2d4 g8f6 b1c3 b8c6
info depth 5 seldepth 11 time 13 nodes 4636 nps 0
info depth 6
info multipv 1 depth 6 seldepth 11 score cp -20 time 5 nodes 3396 pv d7d5 d2d4 g8f6 b1c3 b8c6 c1f4
info depth 6 seldepth 11 time 17 nodes 4958 nps 0
info depth 7
info multipv 1 depth 7 seldepth 13 score cp -20 time 20 nodes 5002 pv d7d5 d2d4 g8f6 b1c3 b8c6 c1f4 c8f5
info depth 7 seldepth 13 time 24 nodes 15838 nps 0
info depth 8
info multipv 1 depth 8 seldepth 15 score cp -7 time 32 nodes 18093 pv d7d5 d2d4 g8f6 b1c3 b8c6 d1d3 c8g4 c1f4
info depth 8 seldepth 14 time 39 nodes 30224 nps 0
info depth 9
info multipv 1 depth 9 seldepth 19 score cp -23 time 53 nodes 24986 pv d7d5 d2d4 g8f6 b1c3 b8c6 c1f4 g7g6 e2e3
info depth 9 seldepth 19 time 77 nodes 77534 nps 0
info depth 10
info multipv 1 depth 10 seldepth 19 score cp -20 time 108 nodes 54335 pv d7d5 b1c3 g8f6 d2d4 b8c6 d1d3 d8d6 c1g5 c8g4
info depth 10 seldepth 19 time 151 nodes 167814 nps 0
info depth 11
info multipv 1 depth 11 seldepth 23 score cp -20 time 295 nodes 176948 pv d7d5 d2d4 b8c6 e2e3 g8f6 b1c3 e7e6 f1d3 f8d6 e1g1 e8g8
info depth 11 seldepth 23 time 368 nodes 445654 nps 0
info depth 12
info multipv 1 depth 12 seldepth 27 score cp -23 time 755 nodes 443080 pv d7d5 d2d4 g8f6 c2c4 e7e6 c4d5 e6d5 b1c3 f8b4 f3e5 e8g8 d1c2
info multipv 1 depth 12 seldepth 27 score cp -13 time 990 nodes 556267 pv g8f6 d2d4 e7e6 b1c3 f8b4 c1d2 b8c6 e2e3 e8g8 f1d3 d7d5 e1g1
info currmove b8a6 currmovenumber 6
info currmove g8h6 currmovenumber 7
info currmove f7f5 currmovenumber 8
info currmove b7b5 currmovenumber 9
info currmove b7b6 currmovenumber 10
info currmove g7g6 currmovenumber 11
info time 1023 nodes 1140000 nps 1114748 cpuload 1000
info hashfull 43
info currmove a7a5 currmovenumber 12
info currmove h7h5 currmovenumber 13
info currmove c7c5 currmovenumber 14
info currmove a7a6 currmovenumber 15
info currmove h7h6 currmovenumber 16
info currmove c7c6 currmovenumber 17
info currmove f7f6 currmovenumber 18
info currmove g7g5 currmovenumber 19
info currmove e7e5 currmovenumber 20
info depth 12 seldepth 27 time 1080 nodes 1194750 nps 1105887
info depth 13
info currmove g8f6 currmovenumber 1
info multipv 1 depth 13 seldepth 28 score cp -23 time 1563 nodes 791112 pv g8f6 d2d4 e7e6 b1c3 f8b4 c1d2 b8c6 e2e3 e8g8 f1d3 f6g4 h2h3 g4f6
info currmove d7d5 currmovenumber 2
info currmove b8c6 currmovenumber 3
info currmove d7d6 currmovenumber 4
info currmove e7e6 currmovenumber 5
info currmove b8a6 currmovenumber 6
info currmove g8h6 currmovenumber 7
info currmove f7f5 currmovenumber 8
info currmove b7b5 currmovenumber 9
info currmove b7b6 currmovenumber 10
info currmove g7g6 currmovenumber 11
info currmove a7a5 currmovenumber 12
info currmove h7h5 currmovenumber 13
info currmove c7c5 currmovenumber 14
info currmove a7a6 currmovenumber 15
info currmove h7h6 currmovenumber 16
info currmove c7c6 currmovenumber 17
info currmove f7f6 currmovenumber 18
info currmove g7g5 currmovenumber 19
info currmove e7e5 currmovenumber 20
info time 2037 nodes 2200000 nps 1079804 cpuload 1000
info hashfull 85
info depth 13 seldepth 27 time 2040 nodes 2204012 nps 1080337
info time 2040 nodes 2132971 nps 1046080 cpuload 1000
info hashfull 85
bestmove g8f6 ponder b1c3
position startpos moves g1f3 g8f6 d2d4

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason&#58; KERN_INVALID_ADDRESS at address&#58; 0xb0082000
&#91;Switching to process 82007 thread 0x313&#93;
0x00019d61 in alist_remove &#91;inlined&#93; () at see.cpp&#58;376
376	      alist->square&#91;i&#93; = alist->square&#91;i+1&#93;;
&#40;gdb&#41; bt
#0  0x00019d61 in alist_remove &#91;inlined&#93; () at see.cpp&#58;376
#1  0x00019d61 in see_move &#40;move=236360, board=0x0&#41; at see.cpp&#58;141
#2  0x00000fad in ?? ()
Previous frame inner to this frame &#40;gdb could not unwind past this frame&#41;
&#40;gdb&#41; 


krazyken

Re: Linux port of newer versions of TogaII

Post by krazyken » Mon Oct 20, 2008 11:41 am

with -O2:

Code: Select all

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason&#58; KERN_PROTECTION_FAILURE at address&#58; 0x000f6d9e
&#91;Switching to process 82243 thread 0x313&#93;
0x000146db in quiet_move_value &#40;move=<value temporarily unavailable, due to optimizations>, board=<value temporarily unavailable, due to optimizations>, ThreadId=1&#41; at sort.cpp&#58;749
749	   index = history_index&#40;move,board&#41;;
&#40;gdb&#41; bt
#0  0x000146db in quiet_move_value &#40;move=<value temporarily unavailable, due to optimizations>, board=<value temporarily unavailable, due to optimizations>, ThreadId=1&#41; at sort.cpp&#58;749
#1  0x00014b91 in move_value &#91;inlined&#93; () at sort.cpp&#58;707
#2  0x00014b91 in note_moves &#40;list=0x26280, board=0x32b48, height=0, trans_killer=3372, ThreadId=1&#41; at sort.cpp&#58;601
#3  0x00013d2c in search_full_init &#40;list=0x26280, board=0x32b48, ThreadId=1&#41; at search_full.cpp&#58;225
#4  0x000111f7 in search_smp &#40;ThreadId=1&#41; at search.cpp&#58;362
#5  0x00011658 in search_thread &#40;param=0xd2760&#41; at search.cpp&#58;321
#6  0x90c6d6f5 in _pthread_start ()
#7  0x90c6d5b2 in thread_start ()


krazyken

Re: Linux port of newer versions of TogaII

Post by krazyken » Mon Oct 20, 2008 12:28 pm

and with any -O

Code: Select all

position startpos moves g1f3 g8f6 d2d4
go wtime 59900 btime 57890 movestogo 39
info multipv 1 depth 6 seldepth 11 score cp 0 time 6 nodes 19 pv d7d5 c2c4 d5c4
info depth 1
info depth 1 seldepth 2 time 0 nodes 56 nps 0
info depth 2
info depth 2 seldepth 6 time 1 nodes 252 nps 0
info depth 3
info depth 3 seldepth 12 time 2 nodes 1128 nps 0
info depth 4
info depth 4 seldepth 12 time 4 nodes 2586 nps 0
info depth 5
info depth 5 seldepth 14 time 9 nodes 6580 nps 0
info depth 6
info multipv 1 depth 7 seldepth 20 score cp -29 time 16 nodes 4339 pv d7d5 c2c4 e7e6 b1c3 f8b4 c4d5 f6d5 c1d2
info depth 6 seldepth 19 time 15 nodes 11476 nps 0
info depth 7

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason&#58; KERN_INVALID_ADDRESS at address&#58; 0xfffbb060
&#91;Switching to process 82992 thread 0x313&#93;
0x00019188 in alists_hidden &#40;alists=0xb0080a88, board=0x38b48, from=102920, to=153&#41; at see.cpp&#58;308
308	   inc = DELTA_INC_LINE&#40;to-from&#41;;
&#40;gdb&#41; bt
#0  0x00019188 in alists_hidden &#40;alists=0xb0080a88, board=0x38b48, from=102920, to=153&#41; at see.cpp&#58;308
#1  0x00019424 in see_rec &#40;alists=0xb0080a88, board=0x38b48, colour=-2, to=153, piece_value=0&#41; at see.cpp&#58;217
#2  0x00019809 in see_move &#40;move=4013, board=0x38b48&#41; at see.cpp&#58;145
#3  0x00016899 in full_new_depth &#40;depth=7, move=4013, board=0x38b48, single_reply=false, in_pv=true, height=0, extended=false, cap_extended=0xb0080e53, ThreadId=1&#41; at search_full.cpp&#58;1195
#4  0x000184dc in full_root &#40;list=0x2c280, board=0x38b48, alpha=-29, beta=30000, depth=7, height=0, search_type=0, ThreadId=1&#41; at search_full.cpp&#58;327
#5  0x00018d61 in search_full_root &#40;list=0x2c280, board=0x38b48, depth=7, search_type=0, ThreadId=1&#41; at search_full.cpp&#58;257
#6  0x00015c5a in search_smp &#40;ThreadId=1&#41; at search.cpp&#58;478
#7  0x00015cb8 in search_thread &#40;param=0xd8760&#41; at search.cpp&#58;321
#8  0x90c6d6f5 in _pthread_start ()
#9  0x90c6d5b2 in thread_start ()


Michel
Posts: 2210
Joined: Sun Sep 28, 2008 11:50 pm

Re: Linux port of newer versions of TogaII

Post by Michel » Mon Oct 20, 2008 1:29 pm

It seems gdb is thoroughly confused. Presumably the segfault does not occur at the actual
memory access error
(this very often happens in my experience). To debug this one should link with libefence

http://perens.com/works/software/ElectricFence/

(LDFLAGS+=-lefence).

If you then run gdb (after compiling with -g) you usually get the actual line where the error occurs.

This being said I am starting to be somewhat pessimistic....
Regards,
Michel

Michel
Posts: 2210
Joined: Sun Sep 28, 2008 11:50 pm

Re: Linux port of newer versions of TogaII

Post by Michel » Mon Oct 20, 2008 2:21 pm

It seems the source of libefence needs a small modification to work on MACOSX.

This is supposedly a modified source.

http://www.sanger.ac.uk/Users/lh3/efenc ... 13.tar.bz2

Regards,
Michel

Post Reply