Skip to content

Running the worker on macOS

dav1312 edited this page Aug 21, 2023 · 9 revisions

Read Running the worker before installing the worker.

Install the developer tools from Apple

The command line developer tools include a C++ compiler (Clang) which is needed to compile Stockfish. The tools are automatically installed if you download Xcode from Apple, however Xcode takes up quite a bit of disk space (over 4 GB) and a long time to download. It is kind of pointless to install Xcode if you are only going to use the command line for Stockfish. The following page gives nice instructions if you want to install the command line developer tools without Xcode:

https://mac-how-to.gadgethacks.com/how-to/install-command-line-developer-tools-without-xcode-0168115/

Minimal worker setup

You can download fishtest directly from Github at: https://github.com/official-stockfish/fishtest/archive/master.zip

Or, in case you have a git installation, you can clone it from the command line.

git clone https://github.com/official-stockfish/fishtest.git

Launching the worker

To launch the worker, open a Terminal 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 chosen on fishnet. Use single quotes wrapping your username and password if your username or password has special characters.

python3 worker.py YOUR_USERNAME YOUR_PASSWORD --concurrency NUMBER_OF_CORES

or, after the first access, a simple

python3 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 cores machine, I use --concurrency 3.

On CPUs with different core types, such as Apple M1 with high-performance "Firestorm" cores and energy-efficient but slower "Icestorm" cores, you should additionally implement the requirements about running the worker on CPUs with different core types.