Skip to content

Running the worker on Macintosh

Unai Corzo edited this page Dec 8, 2020 · 34 revisions

Propedeutical steps

Read Running the worker: overview 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/

Setup fishtest

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 from the command line.

git clone https://github.com/glinscott/fishtest.git

Finishing installation on your Macintosh

To terminate installation on your Macintosh, open a Terminal window, navigate to the fishtest-master directory and type the following command. You will be prompted for the password of your Mac user account.

sh  macintosh-INSTALL

Note : if the previous command doesn't work, it may be that you don't have the macintosh-INSTALL script in your fishtest-master directory yet. If that is the case, you can download it first, and then run it, by typing or copying the following two commands in the Terminal window.

curl http://cassio.free.fr/stockfish/macintosh-INSTALL -o macintosh-INSTALL
sh  macintosh-INSTALL

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.

python3 worker.py --concurrency 3 username password

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.