Subject: CGAL users discussion list
List archive
- From: Marcel <>
- To:
- Subject: [cgal-discuss] Straight Skeleton - Thread Safe
- Date: Fri, 10 Jul 2015 10:22:03 +0200
Dear all,
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;
std::vector<Polygon_2<Kernel>> polygons; // non empty set of polygons ;)
#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).
Is this a known issue? Is there a work around?
Thanks for your great work and kind regards
Marcel
System Details:
OpenSuse 13.2 (Harlequin) x86_64
Intel (R) Xeon (R) CPU E5430 @ 2.66Ghz
GCC 4.8.3, flags: -frounding-math -std=c++11 -O0 -g -gdwarf-3 -W -Wall
-Wextra -pedantic -fopenmp
CGAL 4.6.1 - compiled in debug mode, no further flags
[1] https://sympa.inria.fr/sympa/arc/cgal-discuss/2015-01/msg00073.html
- [cgal-discuss] Straight Skeleton - Thread Safe, Marcel, 07/10/2015
- Re: [cgal-discuss] Straight Skeleton - Thread Safe, Marc Glisse, 07/10/2015
Archive powered by MHonArc 2.6.18.