Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Heap corruption when constructing AABB tree with OPENMP

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Heap corruption when constructing AABB tree with OPENMP


Chronological Thread 
  • From: Yifang Zhao <>
  • To: "" <>
  • Subject: Re: [cgal-discuss] Heap corruption when constructing AABB tree with OPENMP
  • Date: Sat, 22 Feb 2020 22:12:59 +0000
  • Accept-language: zh-CN, nl-NL, en-US
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:jFVkfR+QOMeDHv9uRHKM819IXTAuvvDOBiVQ1KB32+8cTK2v8tzYMVDF4r011RmVBNmdu6wP0reI+4nbGkU+or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCeybL9oLxi7rArdutQWjIZjN6081gbHrnxUdutZwm9lOUidlAvm6Meq+55j/SVQu/Y/+MNFTK73Yac2Q6FGATo/K2w669HluhfFTQuU+3sTSX4WnQZSAwjE9x71QJH8uTbnu+Vn2SmaOcr2Ta0oWTmn8qxmRgPkhDsBOjUk9mzcl85+g79BoB+5pxJx3ZPaYJ2bOvR9cKPSf88VSmVaU8lLSyBBB5mxY5cTA+cDO+tTsonzp0EJrRu7HQSjBuLvyjFSiX/w0q0xzucuEQHc0wwnAtkDt3bboM/2O6cSS++1y7DEwSjAYv5Nwjf99JXIfQ0/rvGKQbJ8a9bRyVQyGAzbilWQp5DlMymT1uQJqmWW6fdrW+yoi24isQ5xoz6vy98pionImo0V0FfE9T5+wIY7Od20UlJ0YdmhEJZWqiqUNJN2T9s/T2xmpCo20KAKtJ+mcCQQ1ZgqyQPTZ+aHfoSQ7BLsSuWcLSt9iX9ge7+zmhm//Valx+D8S8a500tFoy9Gn9bSqHwA1hne5dWaRfRg40is3yuE2RrJ5eFeO080kLLWK54/zb40kZoeqUHDETX3mEXyl6+ZaF8k+vap6+v7fLrqvIOcN5JphQ7gNqQulNC/Df4+MggKR2Sb+OK826P//UDhXblHgOE6nrPEvJ3bOMgXvLO1DgFI3oo56xuzFzKm384ZnXkDIlJFYhWHj43xNl7MOvz3Dve/jE6rkDty2vzLPabsAo7RLnjejbjuY7B961JGxAov0NBQ+oxbCrUPIPLvQEPxstjYAgcjMwOo2+bnFMl91oQGVG2TDa+WKqfSvUaV6eIuOOmDeJIVuC3mK/U+/P7vjXo5mUcHcqWz3JsXbmq4HvV8LEmDb3rsmIRJLWBf9AExReivhFyZWiNIfF6zWbg973c1EsjuWYzMT4TojL2a1zqgBbVXYHpHAxaCCyG7WZ+DXqI9aSybJMApoDwNUvD1eskT1Rip8Vaq46F7M+bZ/DFeqY/v2dx7+6vVkUdhpnRPE82B3jTVHClPlWQSSmpuhfwtkQlG0l6GlJNArblAD9UJv6FSTho2OJjAifBnB932VB6HeNPbEA/3EOXjOik4S5cK+/FLZk98H9u4iRWZh3ixH6IZmrqXQoAp/q/Y0WS3IcIvki+bhplktEEvR450DUPjhqN78FKPVYvAkkGCmry0dK8RmjLQ+GqHw3bIukUKCAM=

But I need to compute the exact intersections between a plane and the polyhedron. That’s why I am using epec for aabbtree. Is there any solutions to do this? Or it is not possible yet?

Sent from my iPhone

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
222 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



Archive powered by MHonArc 2.6.18.

Top of Page