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 20:55:52 +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:XaYeFx2pWE1M3P7KsmDT+DRfVm0co7zxezQtwd8ZseIeL/ad9pjvdHbS+e9qxAeQG9mCt7QU1aGP7/qocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfLx/IA+1oAjQucUanIRvJrgswRbVv3VEfPhbymxvKV+PhRj3+92+/IRk8yReuvIh89BPXKDndKkmTrJWESorPXkt6MLkqRfMQw2P5mABUmoNiRpHHxLF7BDhUZjvtCbxq/dw1zObPc3ySrA0RCii4qJ2QxLmlCsLKzg0+3zRh8dtjqxUvQihqgR/zYDKfY+VKPRwcKDTfdwYWWVOUd1cWDZdDoO+dYYDE/YNM+leooLgp1UOtxy+BQy0Ceztyz9IiGX53as10+88Eg7G3BYvH9UTu3nTrtr5LqQdUeCvw6nP1DnPcvBb1Czm6IjUbxAuvO+DXbRsccbL1UkvCh7KgUuUqYzrIzOZzOINs2yC4udmSOmhhWknqwRrrTiuwMchkozJhoMJxVDe8iV524E1JdOkSEJhfdGkF55QuieHPIV1WsMvW3xktSgmxrEcpJK2fTUGxI46yxPRdvCLaYiF7grtVOmPIjp0mHdodbe8ihqv/kWs1OjxW8mp31tJsyVIl9rBuW4T2xHS78WIV+Zy8Vq81juJygvd8PtLIVoumqreM5MhwqA/lp4UsUnbGy/5gkT2jKuNdko64Oio9eXnban4qZOGK490lxzxPboqmsyxHeQ0KA4OX2yD9eS90r3s41H5Ta1XgvA4jqXVqo3WKMUGqqKjHgNY3Jsv5wy/Aju+1dQXh3gHLFZLeBKdiIjpPknDL/LiAfi8g1SjijBry+nbMrDiGZjNNWTDkKr8crlj7U5c1BA/zcxC551JFL4BJPzzWlPruNzeCh81Kxa0zPr/CNVhyoMeXnqCDbOWMKzItV+E//8gI+iXZIAJpTb9MOMl6uX1jX45nF8dZbOm0YEWaHC+BPRmIl+WbWDigtcbQi82uV90R+PjjBiOUCVYem2pd6M6/DAyToy8R8+XTY+khPmN3TywA4ZNTmFAEFGFV3nyIdaqQfAJPROTLMZnnXQ2VbGmA9sQkyOuvQi/kupPNfbJ9iAeqdT/ydR44+PP0xc2o28nR/+B2n2AGjkn1lgDQCU7ifgm/B5Nj2yb2K09uMR2UNxe4/QTDlU/PJ/Y1OFgFdH5V0TdY9uETFi6BNOiU2loEoABhuQWakM4IO2MywjZ1nDyUaQJirCGAoBy7r/Q0nz/O4B7zySejfhzvxwdWsJKcFaeqOt6/gnXCZTOlh/Bxb22aKgR2jKL6HqPwG6AoAdeVFwpXA==

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



Archive powered by MHonArc 2.6.18.

Top of Page