Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Valgrind

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Valgrind


Chronological Thread 
  • From: Sylvain Pion <>
  • To:
  • Subject: Re: [cgal-discuss] Valgrind
  • Date: Sat, 31 Jul 2010 18:12:48 +0200

Le 31/07/10 17:59, Bernhard Kornberger a écrit :
I'd like to run a CGAL'ed program in Valgrind. As I know already from
the past, this does not work very well. Are any compiler-switches or
Valgrind-options known to overcome the problems? I use gcc (4.4.3) and
CGAL3.6.0 on 64bit Linux:

terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: -CGAL_IA_MUL(-1.1, 10.1) != CGAL_IA_MUL(1.1, 10.1)
File: /opt/CGAL360/include/CGAL/Interval_nt.h
Line: 158
Explanation: Wrong rounding: did you forget the -frounding-math option
if you use GCC?

...where -frounding-math is used, and the program works flawlessly
outside Valgrind.

Hi Bernhard,

Valgrind doesn't handle the FPU rounding modes. So, under valgrind,
the interval arithmetic of CGAL becomes unreliable (so the Filtered_kernel
and the higher levels using it as well).

I don't think that there is any workaround. Depending on what you
are trying to debug, you can maybe use a non-degenerate data set,
and use a non robust kernel. Or use some slow multiprecision kernel
with no interval filtering.

--
Sylvain



Archive powered by MHonArc 2.6.16.

Top of Page