working source for stockfish 1.6.2
Moderators: hgm, Rebel, chrisw
-
- Posts: 658
- Joined: Wed Mar 08, 2006 8:58 pm
Re: working source for stockfish 1.6.2
I posted the complete output.
As the compiler produced an executable it also must have done the linking phase. It is reasonable to suppose that your suggestion will not work.
Anyway I will give it a try - at Monday.
You know that there was an issue with stockfish 1.6.2 an the g++ compiler.
Now there is an issue with stockfish 1.6.2 and the intel compiler.
I wouldn't think that stockfish is right and both compilers are wrong.
kind regards
Bernhard
As the compiler produced an executable it also must have done the linking phase. It is reasonable to suppose that your suggestion will not work.
Anyway I will give it a try - at Monday.
You know that there was an issue with stockfish 1.6.2 an the g++ compiler.
Now there is an issue with stockfish 1.6.2 and the intel compiler.
I wouldn't think that stockfish is right and both compilers are wrong.
kind regards
Bernhard
-
- Posts: 6442
- Joined: Tue Jan 09, 2007 12:31 am
- Location: PA USA
- Full name: Louis Zulli
Re: working source for stockfish 1.6.2
I built a working binary using Jim Ablett's source and the Mac version of icc.BBauer wrote: Now there is an issue with stockfish 1.6.2 and the intel compiler.
Bernhard
I used optimization and even pgo.
I have since upgraded my OS and no longer have icc, so I cannot redo it on this computer.
I'll try a clean build later at home, using icc on my MacBook.
-
- Posts: 2684
- Joined: Sat Jun 14, 2008 9:17 pm
Re: working source for stockfish 1.6.2
Please go in the directory with SF sources open a terminal and give the following commands:BBauer wrote:I posted the complete output.
Code: Select all
make clean
make icc > tmp.txt
Code: Select all
g++ -msse -MM application.cpp bitboard.cpp pawns.cpp material.cpp endgame.cpp evaluate.cpp main.cpp misc.cpp move.cpp movegen.cpp history.cpp movepick.cpp search.cpp piece.cpp position.cpp direction.cpp tt.cpp value.cpp uci.cpp ucioption.cpp mersenne.cpp book.cpp bitbase.cpp san.cpp benchmark.cpp > .depend
make \
CXX='icpc' \
CXXFLAGS="-fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503" \
all
make[1]: Entering directory `/home/marco/programmi/stockfish/src'
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o application.o application.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o bitboard.o bitboard.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o pawns.o pawns.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o material.o material.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o endgame.o endgame.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o evaluate.o evaluate.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o main.o main.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o misc.o misc.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o move.o move.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o movegen.o movegen.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o history.o history.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o movepick.o movepick.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o search.o search.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o piece.o piece.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o position.o position.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o direction.o direction.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o tt.o tt.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o value.o value.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o uci.o uci.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o ucioption.o ucioption.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o mersenne.o mersenne.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o book.o book.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o bitbase.o bitbase.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o san.o san.cpp
icpc -fast -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 -c -o benchmark.o benchmark.cpp
icpc -lpthread -o stockfish application.o bitboard.o pawns.o material.o endgame.o evaluate.o main.o misc.o move.o movegen.o history.o movepick.o search.o piece.o position.o direction.o tt.o value.o uci.o ucioption.o mersenne.o book.o bitbase.o san.o benchmark.o
make[1]: Leaving directory `/home/marco/programmi/stockfish/src'
Please, do _EXACTLY_ what I suggested to you, no more no less, it is very important you follow the steps carefully, otherwise we could miss something.
Thanks in advance for your patience.
Re: working source for stockfish 1.6.2
It works fine here too.
Host: i7 920 with Fedora 12 x86_64
Compiler: icc (ICC) 11.1 20091130
Host: i7 920 with Fedora 12 x86_64
Compiler: icc (ICC) 11.1 20091130
Code: Select all
$ make icc
$ ./stockfish
Stockfish 1.6.2 64bit. By Tord Romstad, Marco Costalba, Joona Kiiski.
Good! CPU has hardware POPCNT. We will use it.
-
- Posts: 2684
- Joined: Sat Jun 14, 2008 9:17 pm
Re: working source for stockfish 1.6.2
You have a nice system, I suggest to recompile:ldesnogu wrote:It works fine here too.
Host: i7 920 with Fedora 12 x86_64
Compiler: icc (ICC) 11.1 20091130
Code: Select all
$ make icc $ ./stockfish Stockfish 1.6.2 64bit. By Tord Romstad, Marco Costalba, Joona Kiiski. Good! CPU has hardware POPCNT. We will use it.
Code: Select all
make clean
make icc-profile-popcnt
Re: working source for stockfish 1.6.2
Thanks. It was on this system that I first tried popcnt with Glaurung, but that was at a time when Tord wasn't working on it a lot. Glad to see he changed his mindmcostalba wrote:You have a nice system,
Is there a "standard" way of testing speed-ups?I suggest to recompile:
It will be sensibly faster.Code: Select all
make clean make icc-profile-popcnt
Re: working source for stockfish 1.6.2
Either the internal benchmark is misleading or gcc beats icc:
gcc is 4.4.2.
Code: Select all
$ ./stockfish-gcc bench 32 1 10 default depth >/dev/null
Total time (ms) : 3272
Nodes searched : 4569519
Nodes/second : 1396552
$ ./stockfish-icc bench 32 1 10 default depth >/dev/null
Total time (ms) : 3692
Nodes searched : 4569519
Nodes/second : 1237681
$ ./stockfish-icc-profile-popcnt bench 32 1 10 default depth >/dev/null
Total time (ms) : 3489
Nodes searched : 4569519
Nodes/second : 1309693
-
- Posts: 2684
- Joined: Sat Jun 14, 2008 9:17 pm
Re: working source for stockfish 1.6.2
This is interesting, on my PC icc is faster, please try with a bit longer test like:
Code: Select all
$ ./stockfish bench 256 1 13 default depth >/dev/null
Re: working source for stockfish 1.6.2
Same:
What versions of icc and gcc did you compare?
I've had mixed results with icc in the past, and most were in favour of gcc. The only recent exception is Richard Delorme EDAX that gains about 5% with icc.
Code: Select all
$ for i in stockfish-*; do echo "**** $i"; ./$i bench 256 1 13 default depth 2>&1 | tail -4; done
**** stockfish-gcc
Total time (ms) : 29638
Nodes searched : 42390880
Nodes/second : 1430288
**** stockfish-icc
Total time (ms) : 33152
Nodes searched : 42390880
Nodes/second : 1278682
**** stockfish-icc-profile-popcnt
Total time (ms) : 31206
Nodes searched : 42390880
Nodes/second : 1358420
I've had mixed results with icc in the past, and most were in favour of gcc. The only recent exception is Richard Delorme EDAX that gains about 5% with icc.
-
- Posts: 2684
- Joined: Sat Jun 14, 2008 9:17 pm
Re: working source for stockfish 1.6.2
I have icc 11.0 and gcc 4.3.2ldesnogu wrote: What versions of icc and gcc did you compare?
I've had mixed results with icc in the past, and most were in favour of gcc. The only recent exception is Richard Delorme EDAX that gains about 5% with icc.
Did you compile gcc with -DUSE_POPCNT ?
For instance please try to apply this to Makefile:
Code: Select all
--- a/src/Makefile
+++ b/src/Makefile
@@ -26,7 +26,7 @@ EXE = stockfish
### Compiler speed switches for both GCC and ICC. These settings are generally
### fast on a broad range of systems, but may be changed experimentally
### ==========================================================================
-GCCFLAGS = -O3 -msse
+GCCFLAGS = -O3 -msse -DUSE_POPCNT
ICCFLAGS = -fast -msse
ICCFLAGS-OSX = -fast -mdynamic-no-pic