[gecode-users] multiple non parallel search in different threads
Christian Schulte
cschulte at kth.se
Wed Nov 30 11:26:31 CET 2011
Hi,
You should first try to make independent clones so that you can use them
with different threads:
a) Suppose you have a space s.
b) You compute the fixpoint by s->status(). If s->status() return SS_FAILED
you are done.
c) Create two clones c1 and c2 by c1 = s->clone(false) and c2 =
s->clone(false).
d) Now you can use c1 and c2 in two different threads with the normal DFS
engines.
Christian
--
Christian Schulte, www.ict.kth.se/~cschulte/
-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of TeXitoi
Sent: Wednesday, November 30, 2011 11:21 AM
To: users at gecode.org
Subject: [gecode-users] multiple non parallel search in different threads
Hi!
I use Gecode in a special way:
- first I generate a problem
- then I clone (using space->clone(false)) 2 times the problem
- on each clone, I add some constraints and branching
- then I launch simultaneously a DFS on each clone in parallel in 2
differents threads. The options of the DFS is clone=false (to not
manually delete my manual clone) and default threading mode (so
sequencial search).
It (randomly) segfault inside Gecode (most of the time in _clone()). I
suspect that the search use clone(true), and that there is problems with my
2 simultaneous searchs. After reading MPG, I was thinking that it should
work, but I now suspect that each clone in DFS must use false.
Am I right? How to force clone(false) without doing parallel search in DFS?
Thanks.
--
Guillaume Pinot http://www.texitoi.eu
« Il semble que la perfection soit atteinte non quand il n'y a plus rien à
ajouter, mais quand il n'y a plus rien à retrancher. »
-- Antoine de Saint-Exupéry, Terre des hommes
() ASCII ribbon campaign -- Against HTML e-mail
/\ http://www.asciiribbon.org -- Against proprietary attachments
_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users
More information about the users
mailing list