X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=09e3c4fa979efd0620d021e14daacbb51ea8034c;hb=c8e5384c3a4a5d9ac709c9b50954907a7f07109c;hp=e6c3cd701485947c1c174b98f037661dca03409e;hpb=05513a66410f96959f3a6e70be9aea72425cf7c7;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index e6c3cd70..09e3c4fa 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -360,9 +360,9 @@ void Thread::search() { multiPV = std::min(multiPV, rootMoves.size()); // Iterative deepening loop until requested to stop or the target depth is reached - while ( (rootDepth = rootDepth + ONE_PLY) < DEPTH_MAX + while ( (rootDepth += ONE_PLY) < DEPTH_MAX && !Signals.stop - && (!Limits.depth || Threads.main()->rootDepth / ONE_PLY <= Limits.depth)) + && !(Limits.depth && mainThread && rootDepth / ONE_PLY > Limits.depth)) { // Distribute search depths across the threads if (idx)