Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Bump: CGAL and Threadsafety

Subject: CGAL users discussion list

List archive

[cgal-discuss] Bump: CGAL and Threadsafety


Chronological Thread 
  • From: "Thomas Zangl - Home" <>
  • To: "cgal-discuss" <>
  • Subject: [cgal-discuss] Bump: CGAL and Threadsafety
  • Date: Thu, 26 Jun 2008 18:02:48 +0200


Am Sun, 8 Jun 2008 13:06:53 +0200, schrieb "Thomas Zangl - Home"
<>:

Hi all!

I wrote the mail below on 8th June and did not receive any reply. Maybe
someone can comment on it? This would *greatly* help. Thank you!

>I want to use CGAL´s Delaunay Triangulation inside multiple threads
>where each thread can run on a different CPU. I use boost::thread and the
>threadpool from threadpool.sf.net.
>
>What do I need to obey if I want to use CGAL with multiple threads? How
>threadsafe are the triangulatione etc.?
>
>I get various signal 11 errors when I e.g. ask for the dual of a Delaunay
>Triangulation face and so on. Errors like this:
>*** glibc detected *** corrupted double-linked list: 0x0d1f81b8 ***
>
>Core dump says:
>#0 0x0819dbac in _int_malloc ()
>#1 0x0819f7e6 in malloc ()
>#2 0x08172af8 in operator new ()
>#3 0x080d3e04 in
>CGAL::Lazy_construction<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
> CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
>CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
>CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
>CGAL::To_interval<CGAL::Gmpq> > >,
>CGAL::CommonKernelFunctors::Construct_segment_3<CGAL::Simple_cartesian<CGAL::Interval_nt<false>
> > >,
>CGAL::CommonKernelFunctors::Construct_segment_3<CGAL::Simple_cartesian<CGAL::Gmpq>
> >
>>::operator()<CGAL::Point_3<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
> CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
>CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
>CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
>CGAL::To_interval<CGAL::Gmpq> > > >,
>CGAL::Point_3<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
>CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
>CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
>CGAL::Simple_cartesian<CGAL::Interval_nt<fals
> e> >, CGAL::To_interval<CGAL::Gmpq> > > > > ()
>#4 0x080d7cb6 in
>CGAL::DT3<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
>CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
>CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
>CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
>CGAL::To_interval<CGAL::Gmpq> > >,
>CGAL::TDS3<CGAL::TH_vb3<CGAL::Triangulation_vertex_base_with_info_3<boost::shared_ptr<Isp>,
> CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
>CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
>CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
>CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
>CGAL::To_interval<CGAL::Gmpq> > >,
>CGAL::T_vb3<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
>CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
>CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
>CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
>CGAL::To_interval<CGAL::Gmpq> > >, CGAL::TDS_vb3<void> > > >,
>CGAL::Triangulation_cell_base_with_info_3<boost::shared_ptr<DCellPropert
> y>, CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
> CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
> CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
> CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
> CGAL::To_interval<CGAL::Gmpq> > >,
> CGAL::T_cb3<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
> CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
> CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
> CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
> CGAL::To_interval<CGAL::Gmpq> > >, CGAL::TDS_cb3<void> > > > >::dual ()
>#5 0x080cafd0 in DFacetProperty::setDual ()
>#6 0x080d9143 in DCellProperty::insertFacets ()
>#7 0x080dd258 in CComponent::dtriangulate ()
>#8 0x080ddafa in CComponent::doWork ()
>#9 0x0805d4bc in boost::function0<void,
>std::allocator<boost::function_base> >::operator() ()
>#10 0x0805d955 in
>boost::threadpool::detail::worker_thread<boost::threadpool::detail::pool_core<boost::function0<void,
> std::allocator<boost::function_base> >, boost::threadpool::fifo_scheduler,
>boost::threadpool::static_size, boost::threadpool::resize_controller,
>boost::threadpool::wait_for_all_tasks> >::run ()
>#11 0x0805d4bc in boost::function0<void,
>std::allocator<boost::function_base> >::operator() ()
>#12 0x080f94de in thread_proxy ()
>#13 0x0817e8f4 in pthread_start_thread (arg=0x13966840) at manager.c:310
>#14 0x081ae73a in clone ()
>
>Any ideas what can be wrong? (It works very fine if the code runs with
>multiple threads on ONE CPU, but it starts failing if the threads are
>distributed among 2 or more CPUs)


Best regards,
--
,yours Thomas Zangl, Bakk.rer.soc.oec. -

-
- Freelancer - IT Consulting & Software Development -
- Student of Software Development-Economy (Master) -
- http://blog.tzis.net -



Archive powered by MHonArc 2.6.16.

Top of Page