mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-25 19:46:55 +08:00
Merge branch 'tools' into tools_merge
This commit is contained in:
@@ -16,6 +16,9 @@ case $1 in
|
||||
exeprefix='valgrind --error-exitcode=42 --errors-for-leak-kinds=all --leak-check=full'
|
||||
postfix='1>/dev/null'
|
||||
threads="1"
|
||||
bench_depth=5
|
||||
go_depth=10
|
||||
tt_size=16
|
||||
;;
|
||||
--valgrind-thread)
|
||||
echo "valgrind-thread testing started"
|
||||
@@ -23,6 +26,9 @@ case $1 in
|
||||
exeprefix='valgrind --fair-sched=try --error-exitcode=42'
|
||||
postfix='1>/dev/null'
|
||||
threads="2"
|
||||
bench_depth=5
|
||||
go_depth=10
|
||||
tt_size=16
|
||||
;;
|
||||
--sanitizer-undefined)
|
||||
echo "sanitizer-undefined testing started"
|
||||
@@ -30,6 +36,9 @@ case $1 in
|
||||
exeprefix=''
|
||||
postfix='2>&1 | grep -A50 "runtime error:"'
|
||||
threads="1"
|
||||
bench_depth=8
|
||||
go_depth=20
|
||||
tt_size=128
|
||||
;;
|
||||
--sanitizer-thread)
|
||||
echo "sanitizer-thread testing started"
|
||||
@@ -37,6 +46,9 @@ case $1 in
|
||||
exeprefix=''
|
||||
postfix='2>&1 | grep -A50 "WARNING: ThreadSanitizer:"'
|
||||
threads="2"
|
||||
bench_depth=8
|
||||
go_depth=20
|
||||
tt_size=128
|
||||
|
||||
cat << EOF > tsan.supp
|
||||
race:Stockfish::TTEntry::move
|
||||
@@ -70,7 +82,7 @@ for args in "eval" \
|
||||
"go depth 10" \
|
||||
"go movetime 1000" \
|
||||
"go wtime 8000 btime 8000 winc 500 binc 500" \
|
||||
"bench 128 $threads 8 default depth"
|
||||
"bench $tt_size $threads $bench_depth default depth"
|
||||
do
|
||||
|
||||
echo "$prefix $exeprefix ./stockfish $args $postfix"
|
||||
@@ -121,7 +133,7 @@ cat << EOF > syzygy.exp
|
||||
send "uci\n"
|
||||
send "setoption name SyzygyPath value ../tests/syzygy/\n"
|
||||
expect "info string Found 35 tablebases" {} timeout {exit 1}
|
||||
send "bench 128 1 8 default depth\n"
|
||||
send "bench $tt_size 1 $bench_depth default depth\n"
|
||||
send "quit\n"
|
||||
expect eof
|
||||
|
||||
@@ -130,7 +142,57 @@ cat << EOF > syzygy.exp
|
||||
exit \$value
|
||||
EOF
|
||||
|
||||
for exp in game.exp syzygy.exp
|
||||
# generate_training_data testing 01
|
||||
cat << EOF > data_generation01.exp
|
||||
set timeout 240
|
||||
spawn $exeprefix ./stockfish
|
||||
|
||||
send "uci\n"
|
||||
expect "uciok"
|
||||
|
||||
send "setoption name Threads value $threads\n"
|
||||
send "setoption name Use NNUE value false\n"
|
||||
send "isready\n"
|
||||
send "generate_training_data depth 3 count 100 keep_draws 1 eval_limit 32000 output_file_name training_data/training_data.bin output_format bin\n"
|
||||
expect "INFO: Gensfen finished."
|
||||
send "convert_plain targetfile training_data/training_data.bin output_file_name training_data.txt\n"
|
||||
expect "all done"
|
||||
send "generate_training_data depth 3 count 100 keep_draws 1 eval_limit 32000 output_file_name training_data/training_data.binpack output_format binpack\n"
|
||||
expect "INFO: Gensfen finished."
|
||||
|
||||
send "quit\n"
|
||||
expect eof
|
||||
|
||||
# return error code of the spawned program, useful for valgrind
|
||||
lassign [wait] pid spawnid os_error_flag value
|
||||
exit \$value
|
||||
EOF
|
||||
|
||||
# generate_training_data testing 02
|
||||
cat << EOF > data_generation02.exp
|
||||
set timeout 240
|
||||
spawn $exeprefix ./stockfish
|
||||
|
||||
send "uci\n"
|
||||
expect "uciok"
|
||||
|
||||
send "setoption name Threads value $threads\n"
|
||||
send "setoption name Use NNUE value true\n"
|
||||
send "isready\n"
|
||||
send "generate_training_data depth 4 count 50 keep_draws 1 eval_limit 32000 output_file_name validation_data/validation_data.bin output_format bin\n"
|
||||
expect "INFO: Gensfen finished."
|
||||
send "generate_training_data depth 4 count 50 keep_draws 1 eval_limit 32000 output_file_name validation_data/validation_data.binpack output_format binpack\n"
|
||||
expect "INFO: Gensfen finished."
|
||||
|
||||
send "quit\n"
|
||||
expect eof
|
||||
|
||||
# return error code of the spawned program, useful for valgrind
|
||||
lassign [wait] pid spawnid os_error_flag value
|
||||
exit \$value
|
||||
EOF
|
||||
|
||||
for exp in game.exp data_generation01.exe data_generation02.exp
|
||||
do
|
||||
|
||||
echo "$prefix expect $exp $postfix"
|
||||
|
||||
Reference in New Issue
Block a user