1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-01 09:13:08 +00:00

Remove "Max Threads per Split Point" UCI option

Experimental patch to verify if drop of nps
in endgames at very long TC is due to this.

Suggested by Ronald de Man.

bench: 7451319
This commit is contained in:
Marco Costalba 2014-03-15 21:13:43 +01:00
parent 6e4b4c42ed
commit a1a7bc84da
4 changed files with 6 additions and 10 deletions

View file

@ -30,7 +30,6 @@ Space = 100
Aggressiveness = 100 Aggressiveness = 100
Cowardice = 100 Cowardice = 100
Min Split Depth = 0 Min Split Depth = 0
Max Threads per Split Point = 5
Threads = 1 Threads = 1
Idle Threads Sleep = true Idle Threads Sleep = true
Hash = 128 Hash = 128

View file

@ -88,7 +88,7 @@ Thread::Thread() /* : splitPoints() */ { // Value-initialization bug in MSVC
maxPly = splitPointsSize = 0; maxPly = splitPointsSize = 0;
activeSplitPoint = NULL; activeSplitPoint = NULL;
activePosition = NULL; activePosition = NULL;
idx = Threads.size(); idx = Threads.size(); // Starts from 0
} }
@ -213,7 +213,6 @@ void ThreadPool::exit() {
void ThreadPool::read_uci_options() { void ThreadPool::read_uci_options() {
maxThreadsPerSplitPoint = Options["Max Threads per Split Point"];
minimumSplitDepth = Options["Min Split Depth"] * ONE_PLY; minimumSplitDepth = Options["Min Split Depth"] * ONE_PLY;
size_t requested = Options["Threads"]; size_t requested = Options["Threads"];
@ -297,12 +296,12 @@ void Thread::split(Position& pos, const Stack* ss, Value alpha, Value beta, Valu
activeSplitPoint = &sp; activeSplitPoint = &sp;
activePosition = NULL; activePosition = NULL;
size_t slavesCnt = 1; // This thread is always included int slavesCnt = 1; // This thread is always included
Thread* slave; Thread* slave;
while ( (slave = Threads.available_slave(this)) != NULL while (!Fake && (slave = Threads.available_slave(this)) != NULL)
&& ++slavesCnt <= Threads.maxThreadsPerSplitPoint && !Fake)
{ {
++slavesCnt;
sp.slavesMask |= 1ULL << slave->idx; sp.slavesMask |= 1ULL << slave->idx;
slave->activeSplitPoint = &sp; slave->activeSplitPoint = &sp;
slave->searching = true; // Slave leaves idle_loop() slave->searching = true; // Slave leaves idle_loop()

View file

@ -166,7 +166,6 @@ struct ThreadPool : public std::vector<Thread*> {
bool sleepWhileIdle; bool sleepWhileIdle;
Depth minimumSplitDepth; Depth minimumSplitDepth;
size_t maxThreadsPerSplitPoint;
Mutex mutex; Mutex mutex;
ConditionVariable sleepCondition; ConditionVariable sleepCondition;
TimerThread* timer; TimerThread* timer;

View file

@ -70,7 +70,6 @@ void init(OptionsMap& o) {
o["Aggressiveness"] = Option(100, 0, 200, on_eval); o["Aggressiveness"] = Option(100, 0, 200, on_eval);
o["Cowardice"] = Option(100, 0, 200, on_eval); o["Cowardice"] = Option(100, 0, 200, on_eval);
o["Min Split Depth"] = Option(0, 0, 12, on_threads); o["Min Split Depth"] = Option(0, 0, 12, on_threads);
o["Max Threads per Split Point"] = Option(5, 4, 8, on_threads);
o["Threads"] = Option(1, 1, MAX_THREADS, on_threads); o["Threads"] = Option(1, 1, MAX_THREADS, on_threads);
o["Idle Threads Sleep"] = Option(true); o["Idle Threads Sleep"] = Option(true);
o["Hash"] = Option(32, 1, 16384, on_hash_size); o["Hash"] = Option(32, 1, 16384, on_hash_size);