Retire "Idle Threads Sleep" UCI option

After last Joona's patch there is no measurable
difference between the option set or unset.

Tested by Andreas Strangmüller with 16 threads
on his Dual Opteron 6376.

After 5000 games at 15+0.05 the result is:

1 Stockfish_14050822_T16_on   : 3003  5000 (+849,=3396,-755), 50.9 %
2 Stockfish_14050822_T16_off  : 2997  5000 (+755,=3396,-849), 49.1 %

bench: 880215
This commit is contained in:
Marco Costalba
2014-05-11 10:13:56 +02:00
parent bfd8704a7d
commit 9f843adf89
5 changed files with 5 additions and 12 deletions

View File

@@ -226,14 +226,12 @@ void Search::think() {
for (size_t i = 0; i < Threads.size(); ++i)
Threads[i]->maxPly = 0;
Threads.sleepWhileIdle = Options["Idle Threads Sleep"];
Threads.timer->run = true;
Threads.timer->notify_one(); // Wake up the recurring timer
id_loop(RootPos); // Let's start searching !
Threads.timer->run = false; // Stop the timer
Threads.sleepWhileIdle = true; // Send idle threads to sleep
if (Options["Write Search Log"])
{
@@ -1462,7 +1460,7 @@ void Thread::idle_loop() {
{
// If we are not searching, wait for a condition to be signaled instead of
// wasting CPU time polling for work.
while ((!searching && Threads.sleepWhileIdle) || exit)
while (!searching || exit)
{
if (exit)
{
@@ -1537,8 +1535,7 @@ void Thread::idle_loop() {
// Wake up the master thread so to allow it to return from the idle
// loop in case we are the last slave of the split point.
if ( Threads.sleepWhileIdle
&& this != sp->masterThread
if ( this != sp->masterThread
&& sp->slavesMask.none())
{
assert(!sp->masterThread->searching);