More ways of building Crafty using free tools

Archive of the old Parsimony forum. Some messages couldn't be restored. Limitations: Search for authors does not work, Parsimony specific formats do not work, threaded view does not work properly. Posting is disabled.

More ways of building Crafty using free tools

Postby Paul Hunter » 14 Apr 2004, 23:08

Geschrieben von:/Posted by: Paul Hunter at 15 April 2004 00:08:36:

I now have added ways of building crafty using Borland C/C++ and Watcom C/C++ (OpenWatcom).
http://www.geocities.com/alternativecra ... landc.html
http://www.geocities.com/alternativecra ... atcom.html
The pages give links to where you can get the free compilers.
Both require that a few files be edited for some minor adjustments. Part of this is that both have problems with the egtb source. Even MS-VC has issues with the egtb code, but you can give it a command-line option to use a bigger heap.
The Watcom-built binary works in console mode, but does not work in Winboard yet. I'm debugging that now.
I have been able to build crafty with LCC and DigitalMars C, but the resulting LCC binary crashes and the resulting DigitalMars binary outputs wrongly.
So there you go. Free crafty source. Free build tools. What more can one ask for.
Paul Hunter
 

Re: More ways of building Crafty using free tools

Postby Dann Corbit » 14 Apr 2004, 23:21

Geschrieben von:/Posted by: Dann Corbit at 15 April 2004 00:21:04:
Als Antwort auf:/In reply to: More ways of building Crafty using free tools geschrieben von:/posted by: Paul Hunter at 15 April 2004 00:08:36:
I now have added ways of building crafty using Borland C/C++ and Watcom C/C++ (OpenWatcom).
http://www.geocities.com/alternativecra ... landc.html
http://www.geocities.com/alternativecra ... atcom.html
The pages give links to where you can get the free compilers.
Both require that a few files be edited for some minor adjustments. Part of this is that both have problems with the egtb source. Even MS-VC has issues with the egtb code, but you can give it a command-line option to use a bigger heap.
The Watcom-built binary works in console mode, but does not work in Winboard yet. I'm debugging that now.
I have been able to build crafty with LCC and DigitalMars C, but the resulting LCC binary crashes and the resulting DigitalMars binary outputs wrongly.
So there you go. Free crafty source. Free build tools. What more can one ask for.
What does the crafty bench look like for the free versions?


my ftp site {remove http:// unless you like error messages}
Dann Corbit
 

Re: More ways of building Crafty using free tools

Postby Paul Hunter » 15 Apr 2004, 00:02

Geschrieben von:/Posted by: Paul Hunter at 15 April 2004 01:02:41:
Als Antwort auf:/In reply to: Re: More ways of building Crafty using free tools geschrieben von:/posted by: Dann Corbit at 15 April 2004 00:21:04:
I now have added ways of building crafty using Borland C/C++ and Watcom C/C++ (OpenWatcom).
http://www.geocities.com/alternativecra ... landc.html
http://www.geocities.com/alternativecra ... atcom.html
The pages give links to where you can get the free compilers.
Both require that a few files be edited for some minor adjustments. Part of this is that both have problems with the egtb source. Even MS-VC has issues with the egtb code, but you can give it a command-line option to use a bigger heap.
The Watcom-built binary works in console mode, but does not work in Winboard yet. I'm debugging that now.
I have been able to build crafty with LCC and DigitalMars C, but the resulting LCC binary crashes and the resulting DigitalMars binary outputs wrongly.
So there you go. Free crafty source. Free build tools. What more can one ask for.
What does the crafty bench look like for the free versions?
On a 2.4Ghz P4:
Built with Borland C/C++:
Total nodes: 94189491
Raw nodes per second: 856268
Total elapsed time: 110
SMP time-to-ply measurement: 5.818182
Note that this is without compiler optimization. If you turn-on any optimization (-O1 or -O2), the resulting binary just crashes.
Built with OpenWatcom C/C++:
Total nodes: 94189491
Raw nodes per second: 811978
Total elapsed time: 116
SMP time-to-ply measurement: 5.517241
Built with Mingw:
Total nodes: 94189491
Raw nodes per second: 864123
Total elapsed time: 109
SMP time-to-ply measurement: 5.871560
This mingw build was with -O3 optimization option.
I just realized now that the Mingw and BCC results are almost the same. But BCC compiled really-really fast (literally, at the blink of an eye).
Both however were still beaten by VC7:
Total nodes: 94189491
Raw nodes per second: 1023798
Total elapsed time: 92
SMP time-to-ply measurement: 6.956522
In all cases, the single crafty.c file was used.
Compiler optimizations are:
OpenWatcom: -O2
BorlandC++:
Mingw: -O3
VC7: -Ox
I guess the best things are not free.
Paul Hunter
 

Re: More ways of building Crafty using free tools

Postby Dann Corbit » 15 Apr 2004, 00:21

Geschrieben von:/Posted by: Dann Corbit at 15 April 2004 01:21:44:
Als Antwort auf:/In reply to: Re: More ways of building Crafty using free tools geschrieben von:/posted by: Paul Hunter at 15 April 2004 01:02:41:
I now have added ways of building crafty using Borland C/C++ and Watcom C/C++ (OpenWatcom).
http://www.geocities.com/alternativecra ... landc.html
http://www.geocities.com/alternativecra ... atcom.html
The pages give links to where you can get the free compilers.
Both require that a few files be edited for some minor adjustments. Part of this is that both have problems with the egtb source. Even MS-VC has issues with the egtb code, but you can give it a command-line option to use a bigger heap.
The Watcom-built binary works in console mode, but does not work in Winboard yet. I'm debugging that now.
I have been able to build crafty with LCC and DigitalMars C, but the resulting LCC binary crashes and the resulting DigitalMars binary outputs wrongly.
So there you go. Free crafty source. Free build tools. What more can one ask for.
What does the crafty bench look like for the free versions?
On a 2.4Ghz P4:
Built with Borland C/C++:
Total nodes: 94189491
Raw nodes per second: 856268
Total elapsed time: 110
SMP time-to-ply measurement: 5.818182
Note that this is without compiler optimization. If you turn-on any optimization (-O1 or -O2), the resulting binary just crashes.
Built with OpenWatcom C/C++:
Total nodes: 94189491
Raw nodes per second: 811978
Total elapsed time: 116
SMP time-to-ply measurement: 5.517241
Built with Mingw:
Total nodes: 94189491
Raw nodes per second: 864123
Total elapsed time: 109
SMP time-to-ply measurement: 5.871560
This mingw build was with -O3 optimization option.
I just realized now that the Mingw and BCC results are almost the same. But BCC compiled really-really fast (literally, at the blink of an eye).
Both however were still beaten by VC7:
Total nodes: 94189491
Raw nodes per second: 1023798
Total elapsed time: 92
SMP time-to-ply measurement: 6.956522
In all cases, the single crafty.c file was used.
Compiler optimizations are:
OpenWatcom: -O2
BorlandC++:
Mingw: -O3
VC7: -Ox
I guess the best things are not free.
Probably 10 Elo tops difference between Mingw and MS VC++.NET 2003.
The 2005 version looks like a real barn burner:
http://msdn.microsoft.com/visualc/defau ... zation.asp
But if some poor college student needs something to build chess engines with and doesn't have a bucket of money, alternatives are always nice.
Especially with Watcom the project is interesting because of being open source.



my ftp site {remove http:// unless you like error messages}
Dann Corbit
 

Re: More ways of building Crafty using free tools

Postby Bryan Hofmann » 15 Apr 2004, 13:05

Geschrieben von:/Posted by: Bryan Hofmann at 15 April 2004 14:05:46:
Als Antwort auf:/In reply to: More ways of building Crafty using free tools geschrieben von:/posted by: Paul Hunter at 15 April 2004 00:08:36:
I now have added ways of building crafty using Borland C/C++ and Watcom C/C++ (OpenWatcom).
http://www.geocities.com/alternativecra ... landc.html
http://www.geocities.com/alternativecra ... atcom.html
The pages give links to where you can get the free compilers.
Both require that a few files be edited for some minor adjustments. Part of this is that both have problems with the egtb source. Even MS-VC has issues with the egtb code, but you can give it a command-line option to use a bigger heap.
The Watcom-built binary works in console mode, but does not work in Winboard yet. I'm debugging that now.
I have been able to build crafty with LCC and DigitalMars C, but the resulting LCC binary crashes and the resulting DigitalMars binary outputs wrongly.
So there you go. Free crafty source. Free build tools. What more can one ask for.
For your MingW you might consider the use of the machine independent options I used below that will speed up crafty even more. The below results were attained on a AMD XP 3000+. As you can see the 2 stage profile guided optimze will give you the fastest result. I have added the "prof" file at the end that I used.
--------------------
gcc -c -DNT_i386 -O3 crafty.c
gcc -c -DNT_i386 -O3 egtb.cpp
gcc -o crafty.exe *.o
White(1): bench
Running benchmark. . .
......
Total nodes: 94189491
Raw nodes per second: 914461
Total elapsed time: 103
SMP time-to-ply measurement: 6.213592
--------------------
gcc -c -DNT_i386 -pipe -fomit-frame-pointer -fforce-mem -fno-gcse -O3 crafty.c
gcc -c -DNT_i386 -pipe -fomit-frame-pointer -fforce-mem -fno-gcse -O3 egtb.cpp
gcc -o crafty.exe *.o
Crafty v19.12
White(1): bench
Running benchmark. . .
......
Total nodes: 94189491
Raw nodes per second: 991468
Total elapsed time: 95
SMP time-to-ply measurement: 6.736842
----------------------
gcc -c -DNT_i386 -pipe -fomit-frame-pointer -fforce-mem -fno-gcse -O3 -fprofile-arcs crafty.c
gcc -c -DNT_i386 -pipe -fomit-frame-pointer -fforce-mem -fno-gcse -O3 -fprofile-arcs egtb.cpp
gcc -o crafty.exe *.o
crafty < prof
del crafty.exe
del *.o
gcc -c -DNT_i386 -pipe -fomit-frame-pointer -fforce-mem -fno-gcse -O3 -fbranch-probabilities crafty.c
gcc -c -DNT_i386 -pipe -fomit-frame-pointer -fforce-mem -fno-gcse -O3 -fbranch-probabilities egtb.cpp
gcc -o crafty.exe *.o
Crafty v19.12
White(1): bench
Running benchmark. . .
......
Total nodes: 94189491
Raw nodes per second: 1046549
Total elapsed time: 90
SMP time-to-ply measurement: 7.111111

----begin prof file------------
st=10
ponder=off
display nomoves
setboard rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq
move
book off
setboard rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq
move
setboard 1k1r4/pp1b1R2/3q2pp/4p3/2B5/4Q3/PPP2B2/2K5 b
move
setboard 3r1k2/4npp1/1ppr3p/p6P/P2PPPP1/1NR5/5K2/2R5 w
move
setboard 2q1rr1k/3bbnnp/p2p1pp1/2pPp3/PpP1P1P1/1P2BNNP/2BQ1PRK/7R b
move
setboard rnbqkb1r/p3pppp/1p6/2ppP3/3N4/2P5/PPP1QPPP/R1B1KB1R w KQkq
move
setboard r1b2rk1/2q1b1pp/p2ppn2/1p6/3QP3/1BN1B3/PPP3PP/R4RK1 w
move
setboard 2r3k1/pppR1pp1/4p3/4P1P1/5P2/1P4K1/P1P5/8 w
move
setboard 1nk1r1r1/pp2n1pp/4p3/q2pPp1N/b1pP1P2/B1P2R2/2P1B1PP/R2Q2K1 w
move
setboard 4b3/p3kp2/6p1/3pP2p/2pP1P2/4K1P1/P3N2P/8 w
move
setboard 2kr1bnr/pbpq4/2n1pp2/3p3p/3P1P1B/2N2N1Q/PPP3PP/2KR1B1R w
move
setboard 3rr1k1/pp3pp1/1qn2np1/8/3p4/PP1R1P2/2P1NQPP/R1B3K1 b
move
setboard 2r1nrk1/p2q1ppp/bp1p4/n1pPp3/P1P1P3/2PBB1N1/4QPPP/R4RK1 w
move
setboard r3r1k1/ppqb1ppp/8/4p1NQ/8/2P5/PP3PPP/R3R1K1 b
move
setboard r2q1rk1/4bppp/p2p4/2pP4/3pP3/3Q4/PP1B1PPP/R3R1K1 w
move
setboard rnb2r1k/pp2p2p/2pp2p1/q2P1p2/8/1Pb2NP1/PB2PPBP/R2Q1RK1 w
move
setboard 2r3k1/1p2q1pp/2b1pr2/p1pp4/6Q1/1P1PP1R1/P1PN2PP/5RK1 w
move
setboard r1bqkb1r/4npp1/p1p4p/1p1pP1B1/8/1B6/PPPN1PPP/R2Q1RK1 w kq
move
setboard r2q1rk1/1ppnbppp/p2p1nb1/3Pp3/2P1P1P1/2N2N1P/PPB1QP2/R1B2RK1 b
move
setboard r1bq1rk1/pp2ppbp/2np2p1/2n5/P3PP2/N1P2N2/1PB3PP/R1B1QRK1 b
move
setboard 3rr3/2pq2pk/p2p1pnp/8/2QBPP2/1P6/P5PP/4RRK1 b
move
setboard r4k2/pb2bp1r/1p1qp2p/3pNp2/3P1P2/2N3P1/PPP1Q2P/2KRR3 w
move
setboard 3rn2k/ppb2rpp/2ppqp2/5N2/2P1P3/1P5Q/PB3PPP/3RR1K1 w
move
setboard 2r2rk1/1bqnbpp1/1p1ppn1p/pP6/N1P1P3/P2B1N1P/1B2QPP1/R2R2K1 b
move
setboard r1bqk2r/pp2bppp/2p5/3pP3/P2Q1P2/2N1B3/1PP3PP/R4RK1 b kq
move
setboard r2qnrnk/p2b2b1/1p1p2pp/2pPpp2/1PP1P3/PRNBB3/3QNPPP/5RK1 w
move
setboard /k/3p/p2P1p/P2P1P///K/ w
move
setboard /k/rnn////5RBB/K/ w
move
quit
-----end prof file-----------
Bryan Hofmann
 

Re: More ways of building Crafty using free tools

Postby Bryan Hofmann » 15 Apr 2004, 13:44

Geschrieben von:/Posted by: Bryan Hofmann at 15 April 2004 14:44:48:
Als Antwort auf:/In reply to: Re: More ways of building Crafty using free tools geschrieben von:/posted by: Bryan Hofmann at 15 April 2004 14:05:46:

I forgot about the INLINE_ASM define which will give a tad bit better preformance. The compiler will give warnings about static declarations following non-static but this will not effect the operation of Crafty.

gcc -c -DNT_i386 -DINLINE_ASM -pipe -fomit-frame-pointer -fforce-mem -fno-gcse -O3 -fprofile-arcs crafty.c
gcc -c -DNT_i386 -pipe -fomit-frame-pointer -fforce-mem -fno-gcse -O3 -fprofile-arcs egtb.cpp
gcc -o crafty.exe *.o
crafty < prof
del crafty.exe
del *.o
gcc -c -DNT_i386 -DINLINE_ASM -pipe -fomit-frame-pointer -fforce-mem -fno-gcse -O3 -fbranch-probabilities
crafty.c
gcc -c -DNT_i386 -pipe -fomit-frame-pointer -fforce-mem -fno-gcse -O3 -fbranch-probabilities egtb.cpp
gcc -o crafty.exe *.o

Crafty v19.12
White(1): bench
Running benchmark. . .
......
Total nodes: 94189491
Raw nodes per second: 1058308
Total elapsed time: 89
SMP time-to-ply measurement: 7.191011
Bryan Hofmann
 

Re: More ways of building Crafty using free tools

Postby Paul Hunter » 15 Apr 2004, 22:56

Geschrieben von:/Posted by: Paul Hunter at 15 April 2004 23:56:55:
Als Antwort auf:/In reply to: Re: More ways of building Crafty using free tools geschrieben von:/posted by: Bryan Hofmann at 15 April 2004 14:44:48:
I forgot about the INLINE_ASM define which will give a tad bit better preformance. The compiler will give warnings about static declarations following non-static but this will not effect the operation of Crafty.

gcc -c -DNT_i386 -DINLINE_ASM -pipe -fomit-frame-pointer -fforce-mem -fno-gcse -O3 -fprofile-arcs crafty.c
gcc -c -DNT_i386 -pipe -fomit-frame-pointer -fforce-mem -fno-gcse -O3 -fprofile-arcs egtb.cpp
gcc -o crafty.exe *.o
crafty < prof
del crafty.exe
del *.o
gcc -c -DNT_i386 -DINLINE_ASM -pipe -fomit-frame-pointer -fforce-mem -fno-gcse -O3 -fbranch-probabilities
crafty.c
gcc -c -DNT_i386 -pipe -fomit-frame-pointer -fforce-mem -fno-gcse -O3 -fbranch-probabilities egtb.cpp
gcc -o crafty.exe *.o

Crafty v19.12
White(1): bench
Running benchmark. . .
......
Total nodes: 94189491
Raw nodes per second: 1058308
Total elapsed time: 89
SMP time-to-ply measurement: 7.191011
Thanks. Very nice indeed. I'll put them on my page.
Paul Hunter
 

Re: More ways of building Crafty using free tools

Postby Pallav Nawani » 17 Apr 2004, 20:00

Geschrieben von:/Posted by: Pallav Nawani at 17 April 2004 21:00:55:
Als Antwort auf:/In reply to: Re: More ways of building Crafty using free tools geschrieben von:/posted by: Paul Hunter at 15 April 2004 01:02:41:
Total elapsed time: 92
SMP time-to-ply measurement: 6.956522
In all cases, the single crafty.c file was used.
Compiler optimizations are:
OpenWatcom: -O2
BorlandC++:
Mingw: -O3
VC7: -Ox
I guess the best things are not free.
I use the following command line for compiling Natwarlal (Mingw):
g++ -O3 -Wall -o natwarlal -fforce-addr -fomit-frame-pointer -finline-functions -foptimize-register-move -ffast-math -fstrength-reduce -frerun-loop-opt -frerun-cse-after-loop -fschedule-insns -fschedule-insns2 -fmove-all-movables -fno-rtti -fpeephole -malign-functions=2 -march=pentiumpro *.cc
I have never checked whether this gives any improvement over just -O3, but It could help. Remove -fno-rtti for C only programs. Also the intel compiler is free for Linux for non commerical usage. So Linux versions of crafty can be the fastest, and using a free compiler too!
Pallav Nawani
 


Return to Archive (Old Parsimony Forum)

Who is online

Users browsing this forum: No registered users and 20 guests

cron