3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-10 19:27:06 +00:00

make it easier to debug parallel

This commit is contained in:
Nikolaj Bjorner 2021-09-10 07:09:04 +02:00
parent 3e6ff768a5
commit 34f878fb97

View file

@ -503,7 +503,10 @@ private:
cube.append(s.split_cubes(1));
SASSERT(cube.size() <= 1);
IF_VERBOSE(2, verbose_stream() << "(tactic.parallel :split-cube " << cube.size() << ")\n";);
if (!s.cubes().empty()) m_queue.add_task(s.clone());
{
// std::lock_guard<std::mutex> lock(m_mutex);
if (!s.cubes().empty()) m_queue.add_task(s.clone());
}
if (!cube.empty()) {
s.assert_cube(cube.get(0).cube());
vars.reset();
@ -611,8 +614,12 @@ private:
void spawn_cubes(solver_state& s, unsigned width, vector<cube_var>& cubes) {
if (cubes.empty()) return;
add_branches(cubes.size());
s.set_cubes(cubes);
solver_state* s1 = s.clone();
s.set_cubes(cubes);
solver_state* s1 = nullptr;
{
// std::lock_guard<std::mutex> lock(m_mutex);
s1 = s.clone();
}
s1->inc_width(width);
m_queue.add_task(s1);
}