[cluster] keep track of node counts cluster-wide.

This generalizes exchange of signals between the ranks using a non-blocking all-reduce. It is now used for the stop signal and the node count, but should be easily generalizable (TB hits, and ponder still missing). It avoids having long-lived outstanding non-blocking collectives (removes an early posted Ibarrier). A bit too short a test, but not worse than before:

Score of new-r4-1t vs old-r4-1t: 459 - 401 - 1505  [0.512] 2365
Elo difference: 8.52 +/- 8.43
This commit is contained in:
Joost VandeVondele
2018-12-18 00:00:06 +01:00
committed by Stéphane Nicolet
parent 2f882309d5
commit 87f0fa55a0
7 changed files with 123 additions and 65 deletions
+1 -2
View File
@@ -162,7 +162,7 @@ namespace {
cerr << "\nPosition: " << cnt++ << '/' << num << endl;
go(pos, is, states);
Threads.main()->wait_for_search_finished();
nodes += Threads.nodes_searched();
nodes += Cluster::nodes_searched();
}
else if (token == "setoption") setoption(is);
else if (token == "position") position(pos, is, states);
@@ -173,7 +173,6 @@ namespace {
dbg_print(); // Just before exiting
Cluster::sum(nodes);
if (Cluster::is_root())
cerr << "\n==========================="
<< "\nTotal time (ms) : " << elapsed