Implement proper stop signalling from root node

Previous behavior was to wait on all nodes to finish their search on their own TM and aggregate to root node via a blocking MPI_Allreduce call. This seems to be problematic.

In this commit a proper non-blocking signalling barrier was implemented to use TM from root node to control the cluster search, and disable TM on all non-root nodes.

Also includes some cosmetic fix to the nodes/NPS display.
This commit is contained in:
noobpwnftw
2018-07-11 09:09:48 +08:00
committed by Stéphane Nicolet
parent 3b7b632aa5
commit 8a95d269eb
6 changed files with 48 additions and 6 deletions
+2 -1
View File
@@ -26,6 +26,7 @@
#include "misc.h"
#include "movepick.h"
#include "types.h"
#include "cluster.h"
class Position;
@@ -89,7 +90,7 @@ struct LimitsType {
}
bool use_time_management() const {
return !(mate | movetime | depth | nodes | perft | infinite);
return Cluster::is_root() && !(mate | movetime | depth | nodes | perft | infinite);
}
std::vector<Move> searchmoves;