Subject: CGAL users discussion list
List archive
- From: Marcel <>
- To:
- Subject: [cgal-discuss] Fwd: Re: Straight Skeleton - Thread Safe
- Date: Fri, 10 Jul 2015 15:28:16 +0200
On 10.07.2015 10:52, Marc Glisse wrote:
> On Fri, 10 Jul 2015, Marcel wrote:
>
>> i have some trouble with your Straight Skeleton implementation. I
>> call several independent instances of the straight skeleton
>> implementation in parallel. Unfortunately, with a parallel
>> execution, my program crashes with a segmentation fault, double
>> free or corruption or similar errors. My code basically looks
>> like the following.
>>
>> ###### using CGAL; typedef Simple_cartesian<Gmpq> Kernel;
>
> Can you try with mpq_class instead of Gmpq?
I have tried to use the kernel with the mpq_class and with doubles.
With the mpq_class shows the same behavior. With doubles the program
crashes in the offsetting procedure which succeeds the straight
skeleton computation.
It looks like that the straight skeleton and the offsetting internally
uses the CORE library (BigInt, BigFloat, BigFloatRep etc.). It seems
that the crash is related to the BigInt class. But the behavior is not
really consistent.
>> std::vector<Polygon_2<Kernel>> polygons; // non empty set of
>> polygons ;)
>
> Can the different polygons have some point coordinates in common?
Yes, they can have the same values / coordinates. The polygons
actually correspond to faces of different graphs. Thus, the polygons
can have points with the same coordinates but they do not have to.
>> #pragma omp parallel for for (size_t i = 0; i < polygons.size();
>> ++i) { auto skeleton =
>> create_interior_straight_skeleton_2<Polygon_2<Kernel>,
>> Kernel>(polygons[i],c); } ######
>>
>> A serial execution of my code works flawlessly. Thus, putting
>> the straight skeleton computation in a critical section works as
>> well. I've tried to define the CGAL_HAS_THREADS macro but as far
>> as I can tell, this has no effect. I have incorporated the patch
>> presented in [1] but this does not work as well (Note that I am
>> using CGAL 4.6.1).
>
> Hmm, if you tried that patch then it is probably not the issue I
> was thinking about, but it is still useful to check.
I try to assemble a minimal example. Hopefully this helps to narrow
down the behavior. Until then I am thankful for further ideas.
>> Is this a known issue? Is there a work around?
>
- [cgal-discuss] Fwd: Re: Straight Skeleton - Thread Safe, Marcel, 07/10/2015
- Re: [cgal-discuss] Fwd: Re: Straight Skeleton - Thread Safe, Marc Glisse, 07/10/2015
- Re: [cgal-discuss] Fwd: Re: Straight Skeleton - Thread Safe, Marcel, 07/10/2015
- Re: [cgal-discuss] Fwd: Re: Straight Skeleton - Thread Safe, Marcel, 07/13/2015
- Re: [cgal-discuss] Fwd: Re: Straight Skeleton - Thread Safe, Marc Glisse, 07/14/2015
- Re: [cgal-discuss] Fwd: Re: Straight Skeleton - Thread Safe, Marcel, 07/14/2015
- Re: [cgal-discuss] Fwd: Re: Straight Skeleton - Thread Safe, Marc Glisse, 07/14/2015
- Re: [cgal-discuss] Fwd: Re: Straight Skeleton - Thread Safe, Marcel, 07/13/2015
- Re: [cgal-discuss] Fwd: Re: Straight Skeleton - Thread Safe, Marcel, 07/10/2015
- Re: [cgal-discuss] Fwd: Re: Straight Skeleton - Thread Safe, Marc Glisse, 07/10/2015
Archive powered by MHonArc 2.6.18.