3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-15 11:35:42 +00:00

change calculation of threads to use total threads indicated by parameter or processor count, subtract from worker threads based on backbone and core threads

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2026-06-28 12:43:58 -07:00
parent 6daebef4e4
commit ef66acc6b5
2 changed files with 24 additions and 5 deletions

View file

@ -1950,6 +1950,14 @@ public:
unsigned num_bb_threads = pp.num_bb_threads();
if (num_bb_threads > 2)
throw default_exception("parallel.num_bb_threads must be 0, 1, or 2");
if (num_threads > num_bb_threads + 2)
num_threads -= num_bb_threads;
else
num_bb_threads = 0;
if (core_minimize && num_threads > 2)
num_threads -= 1;
else
core_minimize = false;
unsigned total_threads = num_threads + (core_minimize ? 1 : 0) + num_bb_threads;
IF_VERBOSE(1, verbose_stream() << "Parallel tactical2 with " << total_threads << " threads\n";);