]> git.sesse.net Git - stockfish/commitdiff
Fix threads count setting
authorMarco Costalba <mcostalba@gmail.com>
Sat, 9 Jan 2010 15:45:31 +0000 (16:45 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 9 Jan 2010 15:49:54 +0000 (16:49 +0100)
Was broken after "Optimal tune for 8 cores" patch.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/ucioption.cpp

index 9bcd960b6a157f535d44dfaa030f64d1519849ef..9f1447e19944c42064998321af595af437292471 100644 (file)
@@ -198,10 +198,14 @@ void init_uci_options() {
 
   // Set optimal value for parameter "Minimum Split Depth"
   // according to number of available cores.
 
   // Set optimal value for parameter "Minimum Split Depth"
   // according to number of available cores.
+  assert(options.find("Threads") != options.end());
   assert(options.find("Minimum Split Depth") != options.end());
 
   assert(options.find("Minimum Split Depth") != options.end());
 
+  Option& thr = options["Threads"];
   Option& msd = options["Minimum Split Depth"];
 
   Option& msd = options["Minimum Split Depth"];
 
+  thr.defaultValue = thr.currentValue = stringify(cpu_count());
+
   if (cpu_count() >= 8)
       msd.defaultValue = msd.currentValue = stringify(7);
 }
   if (cpu_count() >= 8)
       msd.defaultValue = msd.currentValue = stringify(7);
 }