Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] CGAL and valgrind

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] CGAL and valgrind


Chronological Thread 
  • From: Sylvain Pion <>
  • To:
  • Subject: Re: [cgal-discuss] CGAL and valgrind
  • Date: Fri, 28 Nov 2008 14:32:19 +0100
  • Organization: INRIA

Laurent Rineau wrote:
On Friday 28 November 2008 14:17:06 Sylvain Pion wrote:
Jens K. Becker wrote:
The program compiles fine but does
not work (it always crashes when trying to remove halfedges (using
join_facets). If I run it in valgrind, it perfectly works.

Valgrind does not emulate FPU rounding modes which are used to implement
interval arithmetic. The later being used in filtered kernels which you
can find in many places in CGAL. A solution is to used either inexact
fast non-robust, risky, use-at-your-own-risk, may-or-may-not-work-for-you
kernels e.g. Simple_cartesian<double>, or a slow exact kernel, e.g.
Simple_cartesian<Gmpq>. That may be enough for debugging.

The ideal solution would be to ping the valgrind developers (again),
so that they work on supporting this missing feature.

Sylvain, you missed a point: Jens program works only *IN* valgrind, and *that* is strange. What sort of CGAL can work only if rounding mode are never changed?

OK, then I guess we need more details about "does not work".

But valgrind is quite bad at emulating the FPU. For example I think
it emulates 64-bit only FPU instructions, so it truncates the additional
precision on x86. This can affect the result, in which ever direction.
Similarly, not emulating the rounding mode makes all intervals singleton,
which prevents any filter failure, hence no costly computation, and so
might make a program look like it works whereas the too costly computations
might kill it for performance/memory reasons.

Again, more details are needed, but my gut feeling is that it's most
probably something around this problem.

--
Sylvain Pion
INRIA Sophia-Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature




Archive powered by MHonArc 2.6.16.

Top of Page