Not logged inCSS-Forum
Forum CSS-Online Help Search Login
CSS-Shop Impressum Datenschutz
Up Topic Hauptforen / CSS-Forum / Stockfish MPI
- - By Clemens Keck Date 2019-02-02 09:16
hallo zusammen

hat jemand Erfahrungen mit der MPI Cluster Version von Stockfish unter windows ?
Gibt es Quellen wo man einen lauffähige halbwegs aktuelle SF-engine MPI  herunterladen kann?

danke für jeden Hinweis
C. K.
Parent - - By Andreas Strangmüller Date 2019-02-02 12:20
Hallo Clemens,

hier sind zumindest mal die Sourcen, eine kompilierte Version (.exe) konnte ich nirgends entdecken.
https://github.com/official-stockfish/Stockfish/tree/cluster

Von der Vorgehensweise sollte es wie bei der Texel MPI Version funktionieren:

Microsoft MPI v10.0 herunterladen und auf jedem Recher installieren:
https://www.microsoft.com/en-us/download/details.aspx?id=57467

Example using MS-MPI and Windows:

If there are two computers called host1 and host2 and MS-MPI is installed on
both computers, proceed as follows:

1. On all computers, log in as the same user.

2. On all computers, add firewall exceptions to allow the programs mpiexec and
smpd (located in C:\Program Files\Microsoft MPI\Bin) to communicate over the network.

3. On all computers, start a command prompt and execute:
smpd -d 0

4. Make sure texel is installed in the same directory on all computers.

5. On the host1 computer, start a command prompt and execute:

   cd /directory/where/texel/is/installed
   mpiexec -hosts 2 host1 host2 texel64cl.exe

Grüße,
Andreas
Parent - - By Andreas Strangmüller Date 2019-02-02 13:09
Hab mal eine popcnt-Version erstellt. Hoffe sie funktioniert:
http://www.fastgm.de/schach/stockfish_x64_modern_cluster.exe
Parent - - By Clemens Keck Date 2019-02-02 16:05
Toll Andreas, danke !

Ich habe von anderen gehört, das man "etwas angleichen" muß, damit es lauffähig wird.
Sollte eigentlich gar nicht im Konsolen Modus starten solange kein MPI installiert ist, oder ?



C.K.

Andreas Strangmüller schrieb:

Hab mal eine popcnt-Version erstellt. Hoffe sie funktioniert:
<a class='urs' href='http://www.fastgm.de/schach/stockfish_x64_modern_cluster.exe'>http://www.fastgm.de/schach/stockfish_x64_modern_cluster.exe</a>
Parent - - By Andreas Strangmüller Date 2019-02-02 20:53 Edited 2019-02-02 20:57
Meines Wissens handelt es sich bei der Source um den Standard Stockfish Code, lediglich erweitert um die Cluster Funktionalität.
Dieser läuft im Konsolen Modus oder auch unter einer GUI wie der ganz normale Stockfish, ist jedoch MPI (Message Passing Interface) im Spiel, wird die Cluster Erweiterung (cluster.cpp + cluster.h) angesprochen.

Auszug aus der cluster.h

/// The Cluster namespace contains functionality required to run on distributed
/// memory architectures using MPI as the message passing interface. On a high level,
/// a 'lazy SMP'-like scheme is implemented where TT saves of sufficient depth are
/// collected on each rank and distributed to, and used by, all other ranks,
/// which search essentially independently.  The root (MPI rank 0) of the cluster
/// is responsible for all I/O and time management, communicating this info to
/// the other ranks as needed. UCI options such as Threads and Hash specify these
/// quantities per MPI rank.  It is recommended to have one rank (MPI process) per node.
/// For the non-MPI case, wrappers that will be compiler-optimized away are provided.

Grüße,
Andreas
Parent - - By Andreas Strangmüller Date 2019-02-02 21:43
So einfach wie ich mir das vorgestellt habe ist es leider doch nicht.

In der Readme-Datei https://github.com/official-stockfish/Stockfish/blob/cluster/Readme.md steht u.a. folgendes:

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. 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. Refer to your MPI documentation for more info.

-----------------------------------------------

Da muss man wohl beim Compilieren doch noch die ein oder andere Feinheit oder Option beachten.
Die von mir bereitgestellte .exe wird wohl so nicht funkionieren. Mal schauen ob ich mit meinem geringen Compiler Wissen weiterkomme.

Grüße,
Andreas
Parent - - By Clemens Keck Date 2019-02-03 10:56
Hallo Andreas

ClusterToga arbeitet auch mit MPI.
Die engine lässt sich nicht im Konsolenmodus starten. Ein Hinweisfenster verweist auf die fehlende  mpich2mpi.dll .

Irgendwie scheint es machbar zu sein, mit Stockfish MPI.
Es gibt Ableger davon, die bei InfinityChess spielen.
Eman ist eine engine davon
Raubfish die andere.
Beide engines sind Abkömmlinge von Stockfish, die Unterschiede zur original engine sind vernachlässigbar.

Ich hoffe ich finde noch eine lauffähige SF-engine.
Aus den ClusterToga Zeiten habe ich noch Infinityband Karten und einen Infinityband switch.
Das dürfte ziemlich intressannt sein, ca 60 cpus (ohne HTT) könnte ich zusammenschalten.

C.K.
Parent - By Andreas Strangmüller Date 2019-02-03 19:15
Hallo Clemens,

im Talkchess-Forum hat jemand Stockfish Cluster MPI compiliert. Hier die Dateien:
https://www.dropbox.com/s/ejmlrevz8nuzkqu/Stockfish-Mpi-Cluster.zip?dl=0

Allerdings ist es mir bisher nicht gelungen sie als Cluster laufen zu lassen.

Vielleicht hast Du ja mehr Glück.

Grüße,
Andreas
- - By Andreas Strangmüller Date 2019-02-08 21:40 Upvotes 1
Nun hat Peter Osterlund, der Autor von Texel, eine funktionierende Version mit Anleitung bereitgestellt:

Hier sein Beitrag im Talkchess-Forum:
http://talkchess.com/forum3/viewtopic.php?f=2&t=69807&sid=4d14f063a487def2a496933b67ce8592#p789240
Parent - By Clemens Keck Date 2019-02-08 23:33
danke Andreas

mal sehen, vielleicht schaff ich es zum laufen zu bringen

C.K.
Parent - - By Clemens Keck Date 2019-02-09 12:00
ein paar Fragen:

ich will 2 Rechner verbinden . einer hat win 10 einer win 7. ich hoffe da macht nichts.

ich starte cmd und starte smpd
bei mir ist der Ordner mit der cluster engine auf C:\Users\Clemens\Desktop\stockfish
dann öffne ich ein neues cmd und starte
cd C:\Users\Clemens\Desktop\stockfish mpiexec -hosts 2 host1 host2 stockfish-cluster.exeow.
ist die endung wirklich exeow??
muss host 1 und host 2 durch die computernamen ersetzt werden?
c.k.
Parent - - By Andreas Strangmüller Date 2019-02-09 12:53 Edited 2019-02-09 12:58 Upvotes 1
Lt. Peter Osterlund geht es mit Windows 7 nicht.

Windows 8 or later is needed to support MPI_THREAD_MULTIPLE which stockfish is using.

Die Endung der Engine ist ganz normal .exe, also stockfish-cluster.exe

mpiexec -hosts 2 host1 host2 stockfish-cluster.exe wird nur auf dem Rechner ausgeführt, auf dem der Cluster kontrolliert wird, bzw. auf der sich die GUI befindet. Der Befehl smpd -d 0 muss auf allen Rechnern ausgeführt werden.
host1 und host2 muss durch den tatsächlichen Rechnernamen ersetzt werden.

Werden drei Rechner zum Cluster verbunden muss der Befehl "mpiexec -hosts 3 host1 host2 host3 stockfish-cluster.exe" lauten, usw.
Der Befehl mpiexec muss in dem Verzeichnis ausgeführt werden, in dem sich auch die stockfish-cluster.exe befindet.
In Deinem Fall C:\Users\Clemens\Desktop\stockfish
Parent - - By Clemens Keck Date 2019-02-09 15:27
bin schon wieder etwas weiter gekommen. Das ganze läuft jetzt auf einem Rechner.
Auf dem 2ten werde ich Win 10 installieren.
mit diesem UCI file läuft es unter Fritz:
Code:
[ENGINE]
Name=Stockfish 060219 64 POPCNT-cluster
Author=T. Romstad, M. Costalba, J. Kiiski, G. Linscott
Filename=C:\Program Files\Microsoft MPI\Bin\mpiexec.exe
Priority=below normal
Parameter=-hosts 1 rechnername C:\Users\Clemens\Desktop\stockfish/stockfish-cluster.exe
[OPTIONS]
UCI_Chess960=true
Threads=15


Jetzt muß ich womöglich nich diue Rechner in der hosts Datei eintagen...muß ich noch rausfinden.

Leider kann ich nicht bei allen GUIs eine zuätzliche Parameter Zeile anfügen (
Bei InfinityChess geht das nicht oder eben anders, und genau da will ich den Cluster ja spielen.

Jemand ne idee?

C.K:
Parent - By Andreas Strangmüller Date 2019-02-09 15:34 Upvotes 1
Peter Osterlund hat dafür ein eigenes Programm geschrieben. Damit kannst Du es als UCI-Engine in jede GUI einbinden.

http://talkchess.com/forum3/viewtopic.php?f=2&t=65339&start=50#p737319
Up Topic Hauptforen / CSS-Forum / Stockfish MPI

Powered by mwForum 2.29.3 © 1999-2014 Markus Wichitill