diff --git a/src/cluster.cpp b/src/cluster.cpp index 342c1831..44a830b0 100644 --- a/src/cluster.cpp +++ b/src/cluster.cpp @@ -58,8 +58,7 @@ static void BestMove(void* in, void* inout, int* len, MPI_Datatype* datatype) { MoveInfo* r = static_cast(inout); for (int i=0; i < *len; ++i) { - if ( (l[i].depth > r[i].depth || (l[i].depth == r[i].depth && l[i].rank < r[i].rank)) - && (l[i].score >= r[i].score)) + if (l[i].depth >= r[i].depth && l[i].score >= r[i].score) r[i] = l[i]; } } diff --git a/src/search.cpp b/src/search.cpp index 8cf78713..805040e8 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -297,7 +297,7 @@ void MainThread::search() { if (mi.rank == Cluster::rank()) { // Send again PV info if we have a new best thread - if (bestThread != this) + if (!Cluster::is_root() || bestThread != this) sync_cout << UCI::pv(bestThread->rootPos, bestThread->completedDepth, -VALUE_INFINITE, VALUE_INFINITE) << sync_endl; sync_cout << "bestmove " << UCI::move(bestThread->rootMoves[0].pv[0], rootPos.is_chess960());