From 48cfdfcc46f0a149f330586163cbbfa271c46a8c Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sat, 9 Jan 2010 16:45:31 +0100 Subject: [PATCH] Fix threads count setting Was broken after "Optimal tune for 8 cores" patch. Signed-off-by: Marco Costalba --- src/ucioption.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ucioption.cpp b/src/ucioption.cpp index f0e27400..beea76ee 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -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); }