-
Notifications
You must be signed in to change notification settings - Fork 0
Running the worker on Windows
The following instructions are for fishtest installation on a Windows machine that will run test matches (a worker). Other sources of information on the same subject include windows-step-by-step-installation.txt and the video https://www.youtube.com/watch?v=jePuj9-T4oU .
If you are an experienced Linux user and you have a supported Windows platform, you can run the worker:
- enabling Windows Subsystem for Linux, and
- simply following the Running the worker on Linux
- in case of a GCC 5 linker bug (with Creator Update), simply install a newer GCC using this instructions
Astonishingly Stockfish got a little speedup (3-4%) when running as Linux application in WSL respect to when running as Windows application.
If you are not a Linux user, better to use A portable fishtest worker for Windows 64 bit or the following instructions to do a manual installation.
On Windows you will need to install Python 2.7.x (not 3.x series), choose 32 or 64 bit according your Windows version:
You can download fishtest directly from Github:
https://github.com/glinscott/fishtest/archive/master.zip
or, in case you have a git installation, you can clone it.
git clone https://github.com/glinscott/fishtest.git
In case you have not done so already, get a new account/password:
http://tests.stockfishchess.org/signup
Please mind that after the registration you will be automatically redirected to the login page. The message "Permission Required. Creating or modifying tests requires you to be logged in. If you don't have an account, please Register." is an information, not an error message.
To launch the worker open a console window in fishtest-master/worker directory and run the following command (after changing concurrency to the correct value for your system, see below), providing username and password you've been given.
python worker.py --concurrency <n_cores> <username> <password>
or, after the first access, a simple
python worker.py
Option concurrency refers to the number of available cores in your system (not
including Hyperthreaded cores!), leaving one core for the OS. For example,
on my 4 core machine, I use --concurrency 3
.
Once launched, fishtest will automatically connect to host, download the book, the cutechess-cli game manager and the test applications base.exe and stockfish.exe compiled by the official Windows builder. If the official Windows builder is down, fishtest download the engine sources that will be compiled according to the type of worker platform. If default make command is not suitable for you, for instance if you need to use some other compiler than gcc/mingw, then you can create a custom_make.txt
file in fishtest-master/worker directory, containing a single line command that fishtest will run to compile the sources.
You can install MinGW-w64 (GCC compiler for Windows 64 & 32 bit) to have the worker building the stockfish executables during occasional outages of the official Windows builder machine.
Below the instructions to install MinGW-w64 or with MSYS (default in Fishtest for historical reason) or with the more actively developed MSYS2.
MSYS is a collection of GNU utilities such as bash, make, gawk and grep to allow building of applications and programs which depend on traditionally UNIX tools to be present. It is intended to supplement MinGW and the deficiencies of the cmd Windows shell.
-
download and install MinGW (32-bit), use the default settings. When the installation is completed select Continue to start the MinGW Installation Manager:
-
in the packages section, right click on the package msys-base (the last package) and select Mark for Installation
-
in the menu Installation (upper left corner) select the voice Apply changes
-
select Apply in the following window
-
when the installation is finished, close the MinGW Installation Manager
-
check to have the directory C:\MinGW\msys\1.0\bin
-
install MinGW-w64 (64 bit or 32 bit according your operating system):
- 64 bit Windows: download MinGW-w64 (64-bit) GCC 7.2.0 and extract the mingw64 folder to C:\MinGW, check to have the directory C:\MinGW\mingw64\bin
- 32 bit Windows: download MinGW-w64 (32-bit) GCC 7.2.0 and extract the mingw32 folder to C:\MinGW, check to have the directory C:\MinGW\mingw32\bin
- in fishtest-master\worker directory, create a text file named fishtest.bat and copy in it the text below (write the <n_cores> that you want dedicate to fishtest, and your fishtest's <username> and <password>)
- 64 bit Windows:
@echo off
SET PATH=C:\MinGW\mingw64\bin;C:\MinGW\msys\1.0\bin;%PATH%
cmd /k C:\Python27\python.exe -i C:\fishtest-master\worker\worker.py --concurrency <n_cores> <username> <password>
- 32 bit Windows:
@echo off
SET PATH=C:\MinGW\mingw32\bin;C:\MinGW\msys\1.0\bin;%PATH%
cmd /k C:\Python27\python.exe -i C:\fishtest-master\worker\worker.py --concurrency <n_cores> <username> <password>
- start the worker executing fishtest.bat (e.g. double click on fishtest.bat)
-
the worker's script uses the compiling directive
mingw32-make ARCH=x86-64-modern ...
. This can be a problem because:-
mingw32-make
does not work with Windows XP and Windows Server 2003, you need to usemake
-
ARCH=x86-64-modern
does not work with CPU older than Sandy Bridge or with 32 bit Windows
In these cases you MUST override the default settings writing a
custom_make.txt
file in fishtest-master\worker directory, according the architecture of your CPU and/or your OS (you can also add the flag-j <n_jobs>
to lower the compile time): -
-
32 bit Windows:
make profile-build ARCH=x86-32 COMP=mingw
-
old CPU:
make profile-build ARCH=x86-64 COMP=mingw
-
Sandy Bridge and Ivy Bridge CPU:
make profile-build ARCH=x86-64-modern COMP=mingw
-
Haswell and later CPU:
make profile-build ARCH=x86-64-bmi2 COMP=mingw
MSYS2 is an independent rewrite of MSYS, based on modern Cygwin (POSIX compatibility layer) and MinGW-w64. Warning: MSYS2 might not work with Windows XP and Windows Server 2003.
-
download and install MSYS2 using the default settings. Use the 64 bit or 32 bit installer according your operating system and follow the official instruction to update the MSYS2 packages.
-
install make and MinGW packages (64 bit or 32 bit according your operating system):
- 64 bit: at prompt run
pacman -S make mingw-w64-x86_64-gcc
- 32 bit: at prompt run
pacman -S make mingw-w64-i686-gcc
- in fishtest-master/worker directory, create a text file named fishtest.bat and copy in it the text below (write the <n_cores> that you want dedicate to fishtest, and your fishtest's <username> and <password>)
- 64 bit Windows:
@echo off
SET PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%
cmd /k C:\Python27\python.exe -i C:\fishtest-master\worker\worker.py --concurrency <n_cores> <username> <password>
- 32 bit Windows:
@echo off
SET PATH=C:\msys32\mingw32\bin;C:\msys32\usr\bin;%PATH%
cmd /k C:\Python27\python.exe -i C:\fishtest-master\worker\worker.py --concurrency <n_cores> <username> <password>
- you MUST override the default
mingw32-make
command (the non standard MSYS's make command used by the worker) writing acustom_make.txt
file in fishtest-master\worker directory, according the architecture of your CPU (you can also add the flag-j <n_jobs>
to lower the compile time):
-
32 bit Windows:
make profile-build ARCH=x86-32 COMP=mingw
-
old CPU:
make profile-build ARCH=x86-64 COMP=mingw
-
Sandy Bridge and Ivy Bridge CPU:
make profile-build ARCH=x86-64-modern COMP=mingw
-
Haswell and later CPU:
make profile-build ARCH=x86-64-bmi2 COMP=mingw
- start the worker executing fishtest.bat (e.g double click on fishtest.bat)