[gecode-users] Naive CCP ask in Gecode

Mikael Zayenz Lagerkvist zayenz at gmail.com
Mon Mar 10 13:24:08 CET 2008


Hi,

If you are using a Gecode Space in a concurrent setting, there are a
couple of things that you must observe.

First of all, a Space is not reentrant. Thus you must serialize all
accesses to the Space object.

Secondly, if you want to manipulate two different Spaces concurrently,
you must make sure that they do not share any data structures. This is
done by passing false as the share argument when cloning a Space.

Cheers,
Mikael

On Mon, Mar 10, 2008 at 12:54 PM, Mauricio Toro <mauriciotorob at gmail.com> wrote:
> Hello,
>
> 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",
>
> Thanks
>
> --
> Mauricio Toro Bermudez
>  Estudiante de Ingeniería de Sistemas
> Pontificia Universidad Javeriana, Colombia
>
> Stagiare à l'Ircam
> 1, place Igor-Stravinsky 75004 Paris,
> France de 2008 à 2009
> _______________________________________________
>  Gecode users mailing list
>  users at gecode.org
>  https://www.gecode.org/mailman/listinfo/gecode-users
>
>



-- 
Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/




More information about the gecode-users mailing list