Valgrind

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Valgrind

Bernhard Kornberger
(Sorry, if this is a double post. I have posted this to
cgal-discuss-owner by mistake before)

Hi,

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.

Best
Bernhard

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss

Reply | Threaded
Open this post in threaded view
|

Re: Valgrind

Sylvain Pion
Administrator
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

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss

Reply | Threaded
Open this post in threaded view
|

Re: Valgrind

Bernhard Kornberger
On 2010-07-31 18:12, Sylvain Pion wrote:

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

Thank you for the answer, Sylvain. An unfiltered multiprecision
kernel is certainly enough for debugging. If that works, the
problem is solved.


Best
Bernhard



--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss