[gecode-users] Multithreading executions crash

Andrea Peano andrea.peano at unife.it
Tue Apr 15 14:35:09 CEST 2014


Hello everyone,
my model is solved by a two-steps search. The first step can be a DFS as
well as a BAB search, the second step is always a DFS.

I implemented this search by following the section "Executing code between
branchers" of the Gecode's guide, like this:
branch(*this, MyModel::post)

The function "post" copies the current space into a local variable, then
instantiates a new DFS engine and finally calls the method "next", in order
to compute only the first solution.

MyModel *inner_model=static_cast<MyModel *>(this->clone(true));
inner_model->status();
...
inner_dfs.next();

The idea is to parallelize the first level of the search... but if I use
only one thread everything works fine, otherwise every time the execution
crashes on a different instruction of the function "post".

Do you have any clue about this behavior?
The worst scenario I see is that this solving architecture is totally
incompatible with the multithreading system implemented in Gecode.

Thanks,
Andrea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20140415/de65e106/attachment.html>


More information about the users mailing list