]> git.sesse.net Git - stockfish/blobdiff - src/ucioption.cpp
Fix threads count setting
[stockfish] / 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.
+  assert(options.find("Threads") != options.end());
   assert(options.find("Minimum Split Depth") != options.end());
 
+  Option& thr = options["Threads"];
   Option& msd = options["Minimum Split Depth"];
 
+  thr.defaultValue = thr.currentValue = stringify(cpu_count());
+
   if (cpu_count() >= 8)
       msd.defaultValue = msd.currentValue = stringify(7);
 }