X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=Readme.md;h=fcdd30a19f93bc26a4172fb5244aa7acbaddd4fd;hb=8a9d2698555f11eedf870a3292a6eaedc38568c0;hp=10ffdeae4ff34736171eed3b5155812d8f443487;hpb=12d58adc68b1aa084d383d06bc47abbb3495ce3e;p=stockfish diff --git a/Readme.md b/Readme.md index 10ffdeae..fcdd30a1 100644 --- a/Readme.md +++ b/Readme.md @@ -138,6 +138,34 @@ more compact than Nalimov tablebases, while still storing all information needed for optimal play and in addition being able to take into account the 50-move rule. +## Stockfish on distributed memory systems + +The cluster branch allows for running Stockfish on a cluster of servers (nodes) +that are connected with a high-speed and low-latency network, using the message +passing interface (MPI). In this case, one MPI process should be run per node, +and UCI options can be used to set the number of threads/hash per node as usual. +Typically, the engine will be invoked as +``` +mpirun -np N /path/to/stockfish +``` +where ```N``` stands for the number of MPI processes used (alternatives to ```mpirun```, +include ```mpiexec```, ```srun```). Use 1 mpi rank per node, and employ threading +according to the cores per node. To build the cluster +branch, it is sufficient to specify ```COMPILER=mpicxx``` on the make command line, +and do a clean build: +``` +make -j ARCH=x86-64-modern clean build COMPILER=mpicxx +``` +If the name of the compiler wrapper (typically mpicxx, but sometimes e.g. CC) does +not match ```mpi``` an edit to the Makefile is required. Make sure that the MPI +installation is configured to support ```MPI_THREAD_MULTIPLE```, this might require +adding system specific compiler options to the Makefile. Stockfish employs +non-blocking (asynchronous) communication, and benefits from an MPI +implementation that efficiently supports this. Some MPI implentations might benefit +from leaving 1 core/thread free for these asynchronous communications, and might require +setting additional environment variables. ```mpirun``` should forward stdin/stdout +to ```rank 0``` only (e.g. ```srun --input=0 --output=0```). + Refer to your MPI documentation for more info. ## Compiling Stockfish yourself from the sources