-
Notifications
You must be signed in to change notification settings - Fork 87
Description
I have a problem running my propagator with several threads.
During ClingoControl::prepare my propagator's ::propagate and ::check methods are called.
In some examples I do use PropagateControl::add_literal to add new literals.
As far as I understand, these literals are thread specific. Since prepare is only executed on the master solver only there these literals are added. So it would be bad if these literals are thread specific and not copied to the other solvers. (We would have clauses talking over literals that are not in the new threads)
When starting the multi-threaded solve operation (ParallelSolve::solveParallel) the threads are copied, but it seems that the variables added via PropagateControl::add_literal are not copied.
While doing SharedContext::attach the master trail is forced on the new solver and it tries to assign these illegal variables (resulting in an array out of bounds exception (solver_types.h ll. 674)).
PS: Still need to work on a showcase example, but maybe you already have some thoughts.