official-stockfish / fishtest

The Stockfish testing framework
https://tests.stockfishchess.org/tests
281 stars 129 forks source link

Problem running fishtest on termux #424

Closed nonsio28 closed 4 years ago

nonsio28 commented 4 years ago

I successfully installed Debian through AnLinux on my Pixel 3a and followed the instructions to run fishtest on Linux. When I run it, I get the following lines: root@localhost:~# python fishtest-master/worker/worker.py --concurrency 6 Username Password Worker started in /root ... Memory: 3765624832 Worker version 69 connecting to http://tests.stockfishchess.org:80 Fetch task... Worker version checked successfully in 0.280579s Task requested in 0.2377s make: [Makefile:539: .depend] Error 1 (ignored) Config: debug: 'no' sanitize: 'no' optimize: 'yes' arch: 'x86_64' bits: '64' kernel: 'Linux' os: 'GNU/Linux' prefetch: 'yes' popcnt: 'yes' sse: 'yes' pext: 'no'
Flags: CXX: g++ CXXFLAGS: -Wall -Wcast-qual -fno-exceptions -std=c++11 -pedantic -Wextra -Wshadow -m64 -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -flto LDFLAGS: -m64 -Wl,--no-as-needed -lpthread -Wall -Wcast-qual -fno-exceptions -std=c++11 -pedantic -Wextra -Wshadow -m64 -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -flto

Testing config sanity. If this fails, try 'make help' ...

Step 1/4. Building instrumented executable ... make ARCH=x86-64-modern COMP=gcc gcc-profile-make make[1]: Entering directory '/root/fishtest-master/worker/tmpfnyE8H/31m059-Stockfish-4b03be1/src' make ARCH=x86-64-modern COMP=gcc \ EXTRACXXFLAGS='-fprofile-generate' \ EXTRALDFLAGS='-lgcov' \ all make[2]: Entering directory '/root/fishtest-master/worker/tmpfnyE8H/31m059-Stockfish-4b03be1/src' g++ -Wall -Wcast-qual -fno-exceptions -std=c++11 -fprofile-generate -pedantic -Wextra -Wshadow -m64 -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o benchmark.o benchmark.cpp g++ -Wall -Wcast-qual -fno-exceptions -std=c++11 -fprofile-generate -pedantic -Wextra -Wshadow -m64 -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o bitbase.o bitbase.cpp g++ -Wall -Wcast-qual -fno-exceptions -std=c++11 -fprofile-generate -pedantic -Wextra -Wshadow -m64 -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o bitboard.o bitboard.cpp g++ -Wall -Wcast-qual -fno-exceptions -std=c++11 -fprofile-generate -pedantic -Wextra -Wshadow -m64 -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -flto -c -o endgame.o endgame.cpp g++: error: unrecognized command line option ‘-m64’ g++: error: unrecognized command line option ‘-msse’; did you mean ‘-fdse’? g++: error: unrecognized command line option ‘-msse3’ g++: error: unrecognized command line option ‘-mpopcnt’ g++: error: unrecognized command line option ‘-m64’ make[2]: [: bitbase.o] Error 1 make[2]: Waiting for unfinished jobs.... g++: error: unrecognized command line option ‘-msse’; did you mean ‘-fdse’? g++: error: unrecognized command line option ‘-msse3’ g++: error: unrecognized command line option ‘-mpopcnt’ g++: error: unrecognized command line option ‘-m64’ g++: error: unrecognized command line option ‘-msse’; did you mean ‘-fdse’? make[2]: [: bitboard.o] Error 1 g++: error: unrecognized command line option ‘-msse3’ g++: error: unrecognized command line option ‘-mpopcnt’ make[2]: [: benchmark.o] Error 1 g++: error: unrecognized command line option ‘-m64’ g++: error: unrecognized command line option ‘-msse’; did you mean ‘-fdse’? g++: error: unrecognized command line option ‘-msse3’ g++: error: unrecognized command line option ‘-mpopcnt’ make[2]: [: endgame.o] Error 1 make[2]: Leaving directory '/root/fishtest-master/worker/tmpfnyE8H/31m059-Stockfish-4b03be1/src' make[1]: [Makefile:516: gcc-profile-make] Error 2 make[1]: Leaving directory '/root/fishtest-master/worker/tmpfnyE8H/31m059-Stockfish-4b03be1/src' make: *** [Makefile:422: profile-build] Error 2

Exception running games: Traceback (most recent call last): File "fishtest-master/worker/worker.py", line 128, in worker File "/root/fishtest-master/worker/games.py", line 405, in run_games setup_engine(new_engine, worker_dir, sha_new, repo_url, worker_info['concurrency']) File "/root/fishtest-master/worker/games.py", line 142, in setup_engine raise Exception('Failed to setup engine for %s' % (sha)) Exception: Failed to setup engine for 4b03be1a96730edd21edc6aa1696747d8719152c Task exited

ppigazzini commented 4 years ago

@nonsio28 that mobile CPU should could be too slow for fishtest.

Anyway that it's an error during the Stockfish compilation https://github.com/official-stockfish/Stockfish/blob/master/src/Makefile

Write a custom_make.txt alongside worker.py:

CXXFLAGS='-march=native' make -j profile-build ARCH=armv7 COMP=gcc
nonsio28 commented 4 years ago

@ppigazzini thank you for your answer. Unfortunately it doesn't work, now I get the following lines:

root@localhost:~# python fishtest-master/worker/worker.py --concurrency 1 Username Password Worker started in /root ... Memory: 3765624832 Worker version 69 connecting to http://tests.stockfishchess.org:80 Fetch task... Worker version checked successfully in 0.209034s Task requested in 0.262325s Verifying signature of stockfish_3e24563f10c93834fe3a3ff2c7117819967ebebc ... Verifying signature of stockfish_7e89a71624e07c735c2230dbbf2c7dbae864916e ... CPU factor : 2.115157 - tc adjusted to 126.91+1.27 Running KPsqtPieceValue vs master ['/root/fishtest-master/worker/testing/cutechess-cli', '-repeat', '-rounds', '250', '-tournament', 'gauntlet', '-pgnout', 'results-1c9cadc1-8413-44cd-8950-b57cfb82b1d8.pgn', '-site', u'http://tests.stockfishchess.org/tests/view/5db81da60ebc5902d1f383b7', '-event', u'Batch 267: KPsqtPieceValue vs master', '-srand', '3053590474', '-resign', 'movecount=3', 'score=400', '-draw', 'movenumber=34', 'movecount=8', 'score=20', '-concurrency', '1', '-openings', u'file=2moves_v1.pgn', u'format=pgn', 'order=random', 'plies=16', '-engine', u'name=New-3e24563', u'cmd=stockfish_3e24563f10c93834fe3a3ff2c7117819967ebebc', u'option.Hash=64', '-engine', u'name=Base-7e89a71', u'cmd=stockfish_7e89a71624e07c735c2230dbbf2c7dbae864916e', u'option.Hash=64', '-each', 'proto=uci', 'tc=126.91+1.27', 'option.Threads=1']

Exception running games: Traceback (most recent call last): File "fishtest-master/worker/worker.py", line 128, in worker File "/root/fishtest-master/worker/games.py", line 485, in run_games task_status = launch_cutechess(cmd, remote, result, spsa_tuning, games_to_play, tc_limit * games_to_play / min(games_to_play, games_concurrency)) File "/root/fishtest-master/worker/games.py", line 318, in launch_cutechess p = subprocess.Popen(cmd, stdout=subprocess.PIPE, universal_newlines=True, bufsize=1, close_fds=not IS_WINDOWS) File "/usr/lib/python2.7/subprocess.py", line 394, in init errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory Task exited

ppigazzini commented 4 years ago

@nonsio28 you need cutechess-cli for ARMv7 in "testing" folder, try searching in Raspberry Pi forums. [EDIT_000] you can also try building cutechess-cli by yourself. Here the project: https://github.com/cutechess/cutechess Here the instructions that I wrote to build cutechess-cli for Windows and Linux: https://github.com/glinscott/fishtest/wiki/Build-cutechess-with-Qt5-static

Please mind that the wiki instructions use QT5 static libraries for portability, you can install QT5 dynamic libraries if you find a version ready to use.

nonsio28 commented 4 years ago

After some research and testing I've finally managed to make fishtest work. That's how I found out that my machine is too slow to run fishtest effectively.