Slightly smoother stockfishes

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

Moderator: Ras

Dann Corbit
Posts: 12791
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Slightly smoother stockfishes

Post by Dann Corbit »

royb wrote:
Dann Corbit wrote:
royb wrote:Dann,

I'll have to wait then. I would not know how to define a macro if my life depended on it. :-)

Roy
If you use GCC, you can supply it on the command line.

Or in the top of the file you can add this line:

#define SMOOTH_REDUCTION 1
I added the line above to search.cpp and then did a 'make' with this output:

<snip...>

g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o movegen.o movegen.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o history.o history.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o movepick.o movepick.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o search.o search.cpp
search.cpp: In function ‘Value<unnamed>::search(Position&, SearchStack*, Value, Depth, int, bool, int, Move)’:
search.cpp:1397: error: ‘max’ was not declared in this scope
value.h: At global scope:
value.h:126: warning: ‘TempoValue’ defined but not used
history.h:70: warning: ‘HistoryMax’ defined but not used
make[2]: *** [search.o] Error 1
make[2]: Leaving directory `/home/roy/chess/test-new/stockfish_1.6'
make[1]: *** [gcc] Error 2
make[1]: Leaving directory `/home/roy/chess/test-new/stockfish_1.6'
make: *** [default] Error 2

Any pointers are greatly appreciated!

Roy
Add also these lines to the top of the file:

#undef max
#define max(a,b) ((a) > (b) ? (a) : (b))
royb
Posts: 566
Joined: Thu Mar 09, 2006 12:53 am

Re: Slightly smoother stockfishes

Post by royb »

Dann Corbit wrote:
royb wrote:
Dann Corbit wrote:
royb wrote:Dann,

I'll have to wait then. I would not know how to define a macro if my life depended on it. :-)

Roy
If you use GCC, you can supply it on the command line.

Or in the top of the file you can add this line:

#define SMOOTH_REDUCTION 1
I added the line above to search.cpp and then did a 'make' with this output:

<snip...>

g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o movegen.o movegen.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o history.o history.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o movepick.o movepick.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o search.o search.cpp
search.cpp: In function ‘Value<unnamed>::search(Position&, SearchStack*, Value, Depth, int, bool, int, Move)’:
search.cpp:1397: error: ‘max’ was not declared in this scope
value.h: At global scope:
value.h:126: warning: ‘TempoValue’ defined but not used
history.h:70: warning: ‘HistoryMax’ defined but not used
make[2]: *** [search.o] Error 1
make[2]: Leaving directory `/home/roy/chess/test-new/stockfish_1.6'
make[1]: *** [gcc] Error 2
make[1]: Leaving directory `/home/roy/chess/test-new/stockfish_1.6'
make: *** [default] Error 2

Any pointers are greatly appreciated!

Roy
Add also these lines to the top of the file:

#undef max
#define max(a,b) ((a) > (b) ? (a) : (b))
OK, changes made and now this output from make:

g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o movegen.o movegen.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o history.o history.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o movepick.o movepick.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o search.o search.cpp
search.cpp: In function ‘Value<unnamed>::search(Position&, SearchStack*, Value, Depth, int, bool, int, Move)’:
search.cpp:1400: error: ‘max’ was not declared in this scope
value.h: At global scope:
value.h:126: warning: ‘TempoValue’ defined but not used
history.h:70: warning: ‘HistoryMax’ defined but not used
make[2]: *** [search.o] Error 1
make[2]: Leaving directory `/home/roy/chess/test-new/stockfish_1.6'
make[1]: *** [gcc] Error 2
make[1]: Leaving directory `/home/roy/chess/test-new/stockfish_1.6'
make: *** [default] Error 2


Thanks again for your help!

Roy
Shaun
Posts: 323
Joined: Wed Mar 08, 2006 9:55 pm
Location: Brighton - UK

Re: Slightly smoother stockfishes

Post by Shaun »

Hi again Dann,

thanks for the reply - I am very glad you 'tossed in a code patch' as you seem to have hit upon a significant if not dramatic improvement!

I will append date/time to the exe's for my testing :lol:

Shaun
Dann Corbit
Posts: 12791
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Slightly smoother stockfishes

Post by Dann Corbit »

royb wrote:
Dann Corbit wrote:
royb wrote:
Dann Corbit wrote:
royb wrote:Dann,

I'll have to wait then. I would not know how to define a macro if my life depended on it. :-)

Roy
If you use GCC, you can supply it on the command line.

Or in the top of the file you can add this line:

#define SMOOTH_REDUCTION 1
I added the line above to search.cpp and then did a 'make' with this output:

<snip...>

g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o movegen.o movegen.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o history.o history.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o movepick.o movepick.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o search.o search.cpp
search.cpp: In function ‘Value<unnamed>::search(Position&, SearchStack*, Value, Depth, int, bool, int, Move)’:
search.cpp:1397: error: ‘max’ was not declared in this scope
value.h: At global scope:
value.h:126: warning: ‘TempoValue’ defined but not used
history.h:70: warning: ‘HistoryMax’ defined but not used
make[2]: *** [search.o] Error 1
make[2]: Leaving directory `/home/roy/chess/test-new/stockfish_1.6'
make[1]: *** [gcc] Error 2
make[1]: Leaving directory `/home/roy/chess/test-new/stockfish_1.6'
make: *** [default] Error 2

Any pointers are greatly appreciated!

Roy
Add also these lines to the top of the file:

#undef max
#define max(a,b) ((a) > (b) ? (a) : (b))
OK, changes made and now this output from make:

g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o movegen.o movegen.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o history.o history.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o movepick.o movepick.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o search.o search.cpp
search.cpp: In function ‘Value<unnamed>::search(Position&, SearchStack*, Value, Depth, int, bool, int, Move)’:
search.cpp:1400: error: ‘max’ was not declared in this scope
value.h: At global scope:
value.h:126: warning: ‘TempoValue’ defined but not used
history.h:70: warning: ‘HistoryMax’ defined but not used
make[2]: *** [search.o] Error 1
make[2]: Leaving directory `/home/roy/chess/test-new/stockfish_1.6'
make[1]: *** [gcc] Error 2
make[1]: Leaving directory `/home/roy/chess/test-new/stockfish_1.6'
make: *** [default] Error 2


Thanks again for your help!

Roy
Did you add those two new lines to the top of search.cpp?
That should have defined the macro max() so that it was in scope.
Dann Corbit
Posts: 12791
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Slightly smoother stockfishes

Post by Dann Corbit »

Shaun wrote:Hi again Dann,

thanks for the reply - I am very glad you 'tossed in a code patch' as you seem to have hit upon a significant if not dramatic improvement!

I will append date/time to the exe's for my testing :lol:

Shaun
I will be keen to see the results of your tests.
It seems that it performs much better for me than for other people.
This is perhaps not surprising, since I profiled it on my machine, and so it may be tuned for my hardware.
royb
Posts: 566
Joined: Thu Mar 09, 2006 12:53 am

Re: Slightly smoother stockfishes

Post by royb »

Dann Corbit wrote:
royb wrote:
Dann Corbit wrote:
royb wrote:
Dann Corbit wrote:
royb wrote:Dann,

I'll have to wait then. I would not know how to define a macro if my life depended on it. :-)

Roy
If you use GCC, you can supply it on the command line.

Or in the top of the file you can add this line:

#define SMOOTH_REDUCTION 1
I added the line above to search.cpp and then did a 'make' with this output:

<snip...>

g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o movegen.o movegen.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o history.o history.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o movepick.o movepick.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o search.o search.cpp
search.cpp: In function ‘Value<unnamed>::search(Position&, SearchStack*, Value, Depth, int, bool, int, Move)’:
search.cpp:1397: error: ‘max’ was not declared in this scope
value.h: At global scope:
value.h:126: warning: ‘TempoValue’ defined but not used
history.h:70: warning: ‘HistoryMax’ defined but not used
make[2]: *** [search.o] Error 1
make[2]: Leaving directory `/home/roy/chess/test-new/stockfish_1.6'
make[1]: *** [gcc] Error 2
make[1]: Leaving directory `/home/roy/chess/test-new/stockfish_1.6'
make: *** [default] Error 2

Any pointers are greatly appreciated!

Roy
Add also these lines to the top of the file:

#undef max
#define max(a,b) ((a) > (b) ? (a) : (b))
OK, changes made and now this output from make:

g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o movegen.o movegen.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o history.o history.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o movepick.o movepick.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o search.o search.cpp
search.cpp: In function ‘Value<unnamed>::search(Position&, SearchStack*, Value, Depth, int, bool, int, Move)’:
search.cpp:1400: error: ‘max’ was not declared in this scope
value.h: At global scope:
value.h:126: warning: ‘TempoValue’ defined but not used
history.h:70: warning: ‘HistoryMax’ defined but not used
make[2]: *** [search.o] Error 1
make[2]: Leaving directory `/home/roy/chess/test-new/stockfish_1.6'
make[1]: *** [gcc] Error 2
make[1]: Leaving directory `/home/roy/chess/test-new/stockfish_1.6'
make: *** [default] Error 2


Thanks again for your help!

Roy
Did you add those two new lines to the top of search.cpp?
That should have defined the macro max() so that it was in scope.
Here is the first few lines of search.cpp now:

#undef max
#define max(a,b) ((a) > (b) ? (a) : (b))

#define SMOOTH_REDUCTION 1

/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
Copyright (C) 2008-2009 Marco Costalba

etc.

Roy
Dann Corbit
Posts: 12791
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Slightly smoother stockfishes

Post by Dann Corbit »

OK, I am very puzzled then.
Do a make clean, and show me the full output from the subsequent make.
royb
Posts: 566
Joined: Thu Mar 09, 2006 12:53 am

Re: Slightly smoother stockfishes

Post by royb »

Dann Corbit wrote:OK, I am very puzzled then.
Do a make clean, and show me the full output from the subsequent make.
Here is the make (after 'make clean'):

roy@ubuntu-roy:~/chess/test-new/stockfish_1.6$ make
Makefile:309: .depend: No such file or directory
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 gcc
make[1]: Entering directory `/home/roy/chess/test-new/stockfish_1.6'
make \
CXX='g++' \
CXXFLAGS="-O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti" \
all
make[2]: Entering directory `/home/roy/chess/test-new/stockfish_1.6'
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o application.o application.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o bitboard.o bitboard.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o pawns.o pawns.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o material.o material.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o endgame.o endgame.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o evaluate.o evaluate.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o main.o main.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o misc.o misc.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o move.o move.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o movegen.o movegen.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o history.o history.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o movepick.o movepick.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o search.o search.cpp
search.cpp: In function ‘Value<unnamed>::search(Position&, SearchStack*, Value, Depth, int, bool, int, Move)’:
search.cpp:1401: error: ‘max’ was not declared in this scope
value.h: At global scope:
value.h:126: warning: ‘TempoValue’ defined but not used
history.h:70: warning: ‘HistoryMax’ defined but not used
make[2]: *** [search.o] Error 1
make[2]: Leaving directory `/home/roy/chess/test-new/stockfish_1.6'
make[1]: *** [gcc] Error 2
make[1]: Leaving directory `/home/roy/chess/test-new/stockfish_1.6'
make: *** [default] Error 2

Ok, I found one problem. '.depend' was not copied over when I made a new directory for Stockfish-1.6 (the DC version). I have now copied that over and after a make clean and moving the MAX macro to line 45 (after the #includes) I get this on a make:

roy@ubuntu-roy:~/chess/test-new/stockfish_1.6$ make
Makefile:309: .depend: No such file or directory
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 gcc
make[1]: Entering directory `/home/roy/chess/test-new/stockfish_1.6'
make \
CXX='g++' \
CXXFLAGS="-O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti" \
all
make[2]: Entering directory `/home/roy/chess/test-new/stockfish_1.6'
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o application.o application.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o bitboard.o bitboard.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o pawns.o pawns.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o material.o material.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o endgame.o endgame.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o evaluate.o evaluate.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o main.o main.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o misc.o misc.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o move.o move.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o movegen.o movegen.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o history.o history.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o movepick.o movepick.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o search.o search.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o piece.o piece.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o position.o position.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o direction.o direction.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o tt.o tt.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o value.o value.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o uci.o uci.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o ucioption.o ucioption.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o mersenne.o mersenne.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o book.o book.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o bitbase.o bitbase.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o san.o san.cpp
g++ -O1 -msse -DNDEBUG -g -Wall -fno-exceptions -fno-rtti -c -o benchmark.o benchmark.cpp
g++ -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
search.o: In function `nodes_searched()':
/home/roy/chess/test-new/stockfish_1.6/search.cpp:649: multiple definition of `nodes_searched()'
misc.o:/home/roy/chess/test-new/stockfish_1.6/misc.cpp:644: first defined here
search.o: In function `SearchStack::init(int)':
/home/roy/chess/test-new/stockfish_1.6/search.cpp:659: multiple definition of `SearchStack::init(int)'
misc.o:/home/roy/chess/test-new/stockfish_1.6/misc.cpp:654: first defined here
search.o: In function `SearchStack::initKillers()':
/home/roy/chess/test-new/stockfish_1.6/search.cpp:666: multiple definition of `SearchStack::initKillers()'
misc.o:/home/roy/chess/test-new/stockfish_1.6/misc.cpp:661: first defined here
search.o: In function `stop_threads()':
/home/roy/chess/test-new/stockfish_1.6/search.cpp:628: multiple definition of `stop_threads()'
misc.o:/home/roy/chess/test-new/stockfish_1.6/misc.cpp:623: first defined here
search.o: In function `init_threads()':
/home/roy/chess/test-new/stockfish_1.6/search.cpp:575: multiple definition of `init_threads()'
misc.o:/home/roy/chess/test-new/stockfish_1.6/misc.cpp:570: first defined here
search.o: In function `perft(Position&, Depth)':
/home/roy/chess/test-new/stockfish_1.6/search.cpp:342: multiple definition of `perft(Position&, Depth)'
misc.o:/home/roy/chess/test-new/stockfish_1.6/misc.cpp:337: first defined here
search.o: In function `think(Position const&, bool, bool, int, int*, int*, int, int, int, int, Move*)':
/home/roy/chess/test-new/stockfish_1.6/search.cpp:375: multiple definition of `think(Position const&, bool, bool, int, int*, int*, int, int, int, int, Move*)'
misc.o:/home/roy/chess/test-new/stockfish_1.6/misc.cpp:370: first defined here
application.o: In function `Application':
/home/roy/chess/test-new/stockfish_1.6/application.cpp:55: undefined reference to `get_system_time()'
/home/roy/chess/test-new/stockfish_1.6/application.cpp:55: undefined reference to `get_system_time()'
evaluate.o: In function `evaluate_pieces<(PieceType)3u, (Color)0u, false>':
/home/roy/chess/test-new/stockfish_1.6/evaluate.cpp:602: undefined reference to `Chess960'
evaluate.o: In function `evaluate_pieces<(PieceType)3u, (Color)1u, false>':
/home/roy/chess/test-new/stockfish_1.6/evaluate.cpp:602: undefined reference to `Chess960'
evaluate.o: In function `evaluate_pieces<(PieceType)3u, (Color)0u, true>':
/home/roy/chess/test-new/stockfish_1.6/evaluate.cpp:602: undefined reference to `Chess960'
evaluate.o: In function `evaluate_pieces<(PieceType)3u, (Color)1u, true>':
/home/roy/chess/test-new/stockfish_1.6/evaluate.cpp:602: undefined reference to `Chess960'
main.o: In function `main':
/home/roy/chess/test-new/stockfish_1.6/main.cpp:81: undefined reference to `engine_name()'
misc.o: In function `(anonymous namespace)::current_search_time()':
misc.cpp:(.text+0xbbe): undefined reference to `get_system_time()'
misc.o: In function `(anonymous namespace)::poll()':
misc.cpp:(.text+0xe02): undefined reference to `Bioskey()'
misc.cpp:(.text+0x104f): undefined reference to `dbg_show_mean'
misc.cpp:(.text+0x1057): undefined reference to `dbg_print_mean()'
misc.cpp:(.text+0x105d): undefined reference to `dbg_show_hit_rate'
misc.cpp:(.text+0x1065): undefined reference to `dbg_print_hit_rate()'
misc.o: In function `(anonymous namespace)::id_loop(Position const&, Move*)':
misc.cpp:(.text+0x57fd): undefined reference to `dbg_show_mean'
misc.cpp:(.text+0x580a): undefined reference to `dbg_print_mean(std::basic_ofstream<char, std::char_traits<char> >&)'
misc.cpp:(.text+0x5810): undefined reference to `dbg_show_hit_rate'
misc.cpp:(.text+0x581d): undefined reference to `dbg_print_hit_rate(std::basic_ofstream<char, std::char_traits<char> >&)'
misc.o: In function `think(Position const&, bool, bool, int, int*, int*, int, int, int, int, Move*)':
misc.cpp:(.text+0x5de9): undefined reference to `get_system_time()'
misc.cpp:(.text+0x6724): undefined reference to `Chess960'
move.o: In function `move_to_string(Move)':
/home/roy/chess/test-new/stockfish_1.6/move.cpp:123: undefined reference to `Chess960'
search.o: In function `(anonymous namespace)::current_search_time()':
search.cpp:(.text+0xbbe): undefined reference to `get_system_time()'
search.o: In function `(anonymous namespace)::poll()':
search.cpp:(.text+0xe02): undefined reference to `Bioskey()'
search.cpp:(.text+0x104f): undefined reference to `dbg_show_mean'
search.cpp:(.text+0x1057): undefined reference to `dbg_print_mean()'
search.cpp:(.text+0x105d): undefined reference to `dbg_show_hit_rate'
search.cpp:(.text+0x1065): undefined reference to `dbg_print_hit_rate()'
search.o: In function `(anonymous namespace)::id_loop(Position const&, Move*)':
search.cpp:(.text+0x585d): undefined reference to `dbg_show_mean'
search.cpp:(.text+0x586a): undefined reference to `dbg_print_mean(std::basic_ofstream<char, std::char_traits<char> >&)'
search.cpp:(.text+0x5870): undefined reference to `dbg_show_hit_rate'
search.cpp:(.text+0x587d): undefined reference to `dbg_print_hit_rate(std::basic_ofstream<char, std::char_traits<char> >&)'
search.o: In function `think(Position const&, bool, bool, int, int*, int*, int, int, int, int, Move*)':
search.cpp:(.text+0x5e49): undefined reference to `get_system_time()'
search.cpp:(.text+0x6784): undefined reference to `Chess960'
uci.o: In function `(anonymous namespace)::perft(std::basic_istringstream<char, std::char_traits<char>, std::allocator<char> >&)':
/home/roy/chess/test-new/stockfish_1.6/uci.cpp:334: undefined reference to `get_system_time()'
/home/roy/chess/test-new/stockfish_1.6/uci.cpp:338: undefined reference to `get_system_time()'
uci.o: In function `(anonymous namespace)::handle_command(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/roy/chess/test-new/stockfish_1.6/uci.cpp:121: undefined reference to `engine_name()'
ucioption.o: In function `init_uci_options()':
/home/roy/chess/test-new/stockfish_1.6/ucioption.cpp:206: undefined reference to `cpu_count()'
/home/roy/chess/test-new/stockfish_1.6/ucioption.cpp:206: undefined reference to `cpu_count()'
/home/roy/chess/test-new/stockfish_1.6/ucioption.cpp:207: undefined reference to `cpu_count()'
/home/roy/chess/test-new/stockfish_1.6/ucioption.cpp:207: undefined reference to `cpu_count()'
benchmark.o: In function `benchmark(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/roy/chess/test-new/stockfish_1.6/benchmark.cpp:148: undefined reference to `get_system_time()'
/home/roy/chess/test-new/stockfish_1.6/benchmark.cpp:163: undefined reference to `get_system_time()'
collect2: ld returned 1 exit status
make[2]: *** [stockfish] Error 1
make[2]: Leaving directory `/home/roy/chess/test-new/stockfish_1.6'
make[1]: *** [gcc] Error 2
make[1]: Leaving directory `/home/roy/chess/test-new/stockfish_1.6'
make: *** [default] Error 2
Last edited by royb on Wed Dec 30, 2009 12:21 am, edited 1 time in total.
noctiferus
Posts: 364
Joined: Sun Oct 04, 2009 1:27 pm
Location: Italy

Re: Slightly smoother stockfishes

Post by noctiferus »

Yes, please, do change the names: I'm not alone in finding some confusion among your updates, and your and Jim's compiles!
viriathus
Posts: 32
Joined: Wed Dec 16, 2009 12:35 am

Re: Slightly smoother stockfishes

Post by viriathus »

I have this:

#undef max
#define max(a,b) ((a) > (b) ? (a) : (b))

at line 45 in search.cpp

and compile OK