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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Gecode users mailing list
[EMAIL PROTECTED]
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to