mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Move info strings once more
Follow up from #5404 ... current location leads to troubles with Aquarium GUI Fixes #5430 Now prints the information on threads and available processors at the beginning of search, where info about the networks is already printed (and is known to work) closes https://github.com/official-stockfish/Stockfish/pull/5433 No functional change.
This commit is contained in:
parent
6b7822119f
commit
ad0f1fecda
2 changed files with 15 additions and 10 deletions
|
@ -297,16 +297,20 @@ std::string Engine::get_numa_config_as_string() const {
|
||||||
|
|
||||||
std::string Engine::numa_config_information_as_string() const {
|
std::string Engine::numa_config_information_as_string() const {
|
||||||
auto cfgStr = get_numa_config_as_string();
|
auto cfgStr = get_numa_config_as_string();
|
||||||
return "Available Processors: " + cfgStr;
|
return "Available processors: " + cfgStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Engine::thread_binding_information_as_string() const {
|
std::string Engine::thread_binding_information_as_string() const {
|
||||||
auto boundThreadsByNode = get_bound_thread_count_by_numa_node();
|
auto boundThreadsByNode = get_bound_thread_count_by_numa_node();
|
||||||
if (boundThreadsByNode.empty())
|
|
||||||
return "";
|
|
||||||
|
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << "NUMA Node Thread Binding: ";
|
|
||||||
|
size_t threadsSize = threads.size();
|
||||||
|
ss << "Using " << threadsSize << (threadsSize > 1 ? " threads" : " thread");
|
||||||
|
|
||||||
|
if (boundThreadsByNode.empty())
|
||||||
|
return ss.str();
|
||||||
|
|
||||||
|
ss << " with NUMA node thread binding: ";
|
||||||
|
|
||||||
bool isFirst = true;
|
bool isFirst = true;
|
||||||
|
|
||||||
|
|
|
@ -109,16 +109,17 @@ void UCIEngine::loop() {
|
||||||
<< engine.get_options() << sync_endl;
|
<< engine.get_options() << sync_endl;
|
||||||
|
|
||||||
sync_cout << "uciok" << sync_endl;
|
sync_cout << "uciok" << sync_endl;
|
||||||
|
|
||||||
// keep info strings after uciok for old GUIs
|
|
||||||
print_info_string(engine.numa_config_information_as_string());
|
|
||||||
print_info_string(engine.thread_binding_information_as_string());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (token == "setoption")
|
else if (token == "setoption")
|
||||||
setoption(is);
|
setoption(is);
|
||||||
else if (token == "go")
|
else if (token == "go")
|
||||||
|
{
|
||||||
|
// send info strings after the go command is sent for old GUIs and python-chess
|
||||||
|
print_info_string(engine.numa_config_information_as_string());
|
||||||
|
print_info_string(engine.thread_binding_information_as_string());
|
||||||
go(is);
|
go(is);
|
||||||
|
}
|
||||||
else if (token == "position")
|
else if (token == "position")
|
||||||
position(is);
|
position(is);
|
||||||
else if (token == "ucinewgame")
|
else if (token == "ucinewgame")
|
||||||
|
|
Loading…
Add table
Reference in a new issue