[gecode-users] Naive CCP ask in Gecode

Guido Tack tack at ps.uni-sb.de
Mon Mar 10 13:20:12 CET 2008


Mauricio Toro wrote:

> I am trying to do a naive CCP ask in Gecode and
> I am getting "Bus error".
>
> The idea is doing this process inside a thread
> ask (a = 1) do tell( b = 1)
>
> I am doing it like this:
>
>  while ( not root[i].assigned() ){ };
>    if (root[i].val() == 1)
>       rel(this, root[j], IRT_EQ, 1);
>
> Any clues why I am getting "Bus error",

Most probably because Gecode is quite simply not thread safe!  You  
cannot use the same space in two threads, concurrently performing  
operations on it (like propagation or querying of values).  Gecode was  
very consciously designed like this.  The only way multiple threads  
can safely access Gecode is if they operate on different spaces that  
have no shared data.

Cheers,
	Guido

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2436 bytes
Desc: not available
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20080310/613f00d7/attachment.bin>


More information about the gecode-users mailing list