Subject: CGAL users discussion list
List archive
- From: Andreas Fabri <>
- To:
- Subject: Re: [cgal-discuss] Heap corruption when constructing AABB tree with OPENMP
- Date: Sat, 22 Feb 2020 23:25:27 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=None
- Ironport-phdr: 9a23:X9HqChSO7pdhEFnDiUoq+Gk+qNpsv+yvbD5Q0YIujvd0So/mwa67ZB2Pt8tkgFKBZ4jH8fUM07OQ7/m8Hzxeqs/c4TgrS99laVwssY0uhQsuAcqIWwXQDcXBSGgEJvlET0Jv5HqhMEJYS47UblzWpWCuv3ZJQk2sfQV6Kf7oFYHMks+5y/69+4HJYwVPmTGxfa5+IA+5oAnMucQam4hvJ6c+xhfUonZFf/ldyH91K16Ugxvz6cC88YJ5/S9Nofwh7clAUav7f6Q8U7NVCSktPn426sP2qxTNVBOD6XQAXGoYlBpIGBXF4wrhXpjtqCv6t/Fy1zecMMbrUL07QzWi76NsSB/1lCcKMiMy/W/LhsBsiq9QvRSsrAF9zYHJeoGYLOdwcL3Tfd0aRmRPUMheWCNDDYygdIYAFfYNMPxCooXhqVYDrx2zDhSsCuP1zT9Ig2f70LE80+s8CwHJwhYvH8kTu3rUttr6L70SUeGox6TP1zrDae5Z2S3j54fSaRAtu/+MUqhrfsrLyEkiDAzFgUuXqYzgITyVyv4NsmiV7+V6Se2vl2knqxtxozS12sgsjYzJi5sTx1vZ+yt5x4M1Kse5SE59edOrDJRQuDueN4dsRcMiWW5otD4/yr0HpZG7Zi8KyI8gxx7Rd/yLaZSH4hXmVOuXPDx2h2pldaqwihuz60Ss1/HwW8mu3FtIoSdJiMTAu38O2hDL7sWLVuFx80S71TqRyQze6ftILV0wmKfYM5It3qQ8moYJvUjfBCP6hEP7h7KIe0Ug5+io8Pjnbav8ppGBNo91ix/xP7wylsG5HO82KBIBX3KB9uS5zLDj/VP2QLFNjvAuj6XVrIrWJcEcpqKkAQJY3Jwv6xOlADen1NQUhH4HLE9ZeB6diIjpJVHOLOr+Dfihn1SgiDZrx/bYMb39GpjAIXnOnK38cbph60NQ0gg+wN9F655JBbwMI+r/Wkrru9zZCh85PRa0w+HiCNhlzIweX3+AArWHP6zIql+E/OwvLPOXa48PuTbwMPcl6ODpjX88h1AdYbOp3JsZaH+iAvtmP0KZYWDsg9sbDWgKuQ8+QPTwiFKeST5Te2qyX6Uk6z4nB4KpF4PDSpmwj7yAxye0AoBWZntdCl2XCnfpd4CEW+8WZy6II89hlCYEVbm7RIM72xGurhf2y79gLuXJ5CIVrYnj1N1p5+3LjB0y8iF0D9iF32GNUW50mmQISicu3KB7u0N8ykmM0bJ6jvFbEdFf/fNJXR0gOZ7b0ex6C8r+WgTfcdeVUFqmQ9OmDi8tTt8p39MCeVpxF8++ghzZwyamG6UVmKCTBJwo7qLc2GD8KNpyy3nc0KktlkQpQspUNWK6m65/7BPTCpXIk0WfjaaqdL4T0DTD9GeZniKyuxRTXwd0FKnERnsCfVD+rNLj50qEQaX9J64gN15oz8KYJ6JRIvPgh09HDKPqPtjEbmuq3Wm5DwyJ7ryBa4/nZ38M0izWFE8egkYY+nPQZlt2PTuov2+LVG8mLlnoeU65qbAj+kP+dVc9ykSxV2Mk17ex/URK16XEDfYUh+1f/iIoqjExG0uhmdXIC5yGqhYzJPwAM+N4209O0CfijyI4JoapdfkwiVMZdglrpVLg3h5rDZ9R18MtqSFylVsgGeejyFpEMgig89X1M7zTJHP1+Ur2OaHb3VTTzMyH9K4E9PMiuhPouwT7Tkc=
You could determine what primitives intersect in parallel with Epic and
OutputIterator CGAL::AABB_tree< Tr >::all_intersected_primitives | ( | const Query & | query, |
OutputIterator | out | ||
) | const |
https://doc.cgal.org/latest/AABB_tree/classCGAL_1_1AABB__tree.html#a9f40594599eded5f9a79f74186710697
and then in a sequential pass compute the intersections.
By the way, did you have a look at the slicer:
https://doc.cgal.org/latest/Polygon_mesh_processing/index.html#title52
Best,
Andreas
On Feb 22, 2020, at 10:28 PM, Andreas Fabri <> wrote:
Epec is currently not multi-threading safe.
The AABB Tree does not need exact constructions, so we should think
about a way to use the points/triangles/planes for Epic, together with
the face handles of the Polyhedron parameterized with Epec.andreas
On 2/22/2020 9:55 PM, Yifang Zhao wrote:
I am using EPEC Kernel.
Sent from Mail for Windows 10
From: Andreas Fabri
Sent: 2020年2月22日 21:54
To:
Subject: Re: [cgal-discuss] Heap corruption when constructing AABB tree with OPENMP
What kernel do you use?
On 2/22/2020 9:51 PM, Yifang Zhao wrote:
I have a for loop containing approximately 1,000,000 iterations of calling AABBTree.all_intersections() method. Thus, I use #pragma omp parallel for to speed up the program. However, I got an error as "A heap has been corrupted". The cpp file is roughly like the following:Polyhedron polyhedron;
Facet_tree m_facet_tree(faces(m_polyhedron).first, faces(m_polyhedron).second, m_polyhedon);
#pragma omp parallel for
for (int i = 0; i<100; ++i){
Plane plane = Plane(1, 0, 0, 0);
// Compute intersections
typedef std::vector<Facet_tree::Object_and_primitive_id> Intersections;
Intersections intersections;
m_facet_tree.all_intersections(plane, std::back_inserter(intersections));
Finally, The program will break here:}
~Handle()
{
if ( PTR && (--PTR->count == 0))
delete PTR;
What are the possible reasons that cause this problem? Thanks a lot!}
Kind Regards,
Yifang Zhao.
Sent from Mail for Windows 10
-- Andreas Fabri, PhD Chief Officer, GeometryFactory Editor, The CGAL Project phone: +33.492.954.912 skype: andreas.fabri
-- Andreas Fabri, PhD Chief Officer, GeometryFactory Editor, The CGAL Project phone: +33.492.954.912 skype: andreas.fabri
-- Andreas Fabri, PhD Chief Officer, GeometryFactory Editor, The CGAL Project phone: +33.492.954.912 skype: andreas.fabri
- [cgal-discuss] Heap corruption when constructing AABB tree with OPENMP, Yifang Zhao, 02/22/2020
- Re: [cgal-discuss] Heap corruption when constructing AABB tree with OPENMP, Andreas Fabri, 02/22/2020
- RE: [cgal-discuss] Heap corruption when constructing AABB tree with OPENMP, Yifang Zhao, 02/22/2020
- Re: [cgal-discuss] Heap corruption when constructing AABB tree with OPENMP, Andreas Fabri, 02/22/2020
- Re: [cgal-discuss] Heap corruption when constructing AABB tree with OPENMP, Yifang Zhao, 02/22/2020
- Re: [cgal-discuss] Heap corruption when constructing AABB tree with OPENMP, Andreas Fabri, 02/22/2020
- Re: [cgal-discuss] Heap corruption when constructing AABB tree with OPENMP, Yifang Zhao, 02/23/2020
- Re: [cgal-discuss] Heap corruption when constructing AABB tree with OPENMP, Andreas Fabri, 02/22/2020
- Re: [cgal-discuss] Heap corruption when constructing AABB tree with OPENMP, Yifang Zhao, 02/22/2020
- Re: [cgal-discuss] Heap corruption when constructing AABB tree with OPENMP, Andreas Fabri, 02/22/2020
- RE: [cgal-discuss] Heap corruption when constructing AABB tree with OPENMP, Yifang Zhao, 02/22/2020
- Re: [cgal-discuss] Heap corruption when constructing AABB tree with OPENMP, Andreas Fabri, 02/22/2020
Archive powered by MHonArc 2.6.18.