X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fbenchmark.cpp;h=136c6e80f5bc9ee7f4d86683194fc553e29f8c2d;hb=32c504076f5a1d5c84f88c2d30a11c25ea2e5a6e;hp=4735729add884116f27a981bf7736e55b1d2eb75;hpb=161c6b025e763d6bcc8339a614be312f2b173437;p=stockfish diff --git a/src/benchmark.cpp b/src/benchmark.cpp index 4735729a..136c6e80 100644 --- a/src/benchmark.cpp +++ b/src/benchmark.cpp @@ -72,16 +72,15 @@ void benchmark(int argc, char* argv[]) { Options["Hash"] = ttSize; Options["Threads"] = threads; - Options["OwnBook"] = false; if (valType == "time") - limits.maxTime = 1000 * atoi(valStr.c_str()); // maxTime is in ms + limits.movetime = 1000 * atoi(valStr.c_str()); // movetime is in ms else if (valType == "nodes") - limits.maxNodes = atoi(valStr.c_str()); + limits.nodes = atoi(valStr.c_str()); else - limits.maxDepth = atoi(valStr.c_str()); + limits.depth = atoi(valStr.c_str()); if (fenFile != "default") { @@ -113,13 +112,14 @@ void benchmark(int argc, char* argv[]) { if (valType == "perft") { - int64_t cnt = Search::perft(pos, limits.maxDepth * ONE_PLY); - cerr << "\nPerft " << limits.maxDepth << " leaf nodes: " << cnt << endl; + int64_t cnt = Search::perft(pos, limits.depth * ONE_PLY); + cerr << "\nPerft " << limits.depth << " leaf nodes: " << cnt << endl; nodes += cnt; } else { - Threads.start_thinking(pos, limits); + Threads.start_searching(pos, limits); + Threads.wait_for_search_finished(); nodes += Search::RootPosition.nodes_searched(); } }