Turn off CGAL assertions

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

Turn off CGAL assertions

Adam Getchell
Hello all,

I’m trying to turn off the following:

CGAL error: assertion violation!
Expression : false
File       : /usr/local/include/CGAL/Delaunay_triangulation_3.h
Line       : 1973

Which, I believe, relates to the triangulation not being Delaunay after the flip.

I’ve read over https://doc.cgal.org/latest/Manual/devman_checks.html and added the following to CMakeLists in order to turn off all the checks:

set(CGAL_NDEBUG "Turn off all checks")

That hasn’t worked. Do I have to compile CGAL with this flag?

It seems as if there’s a way to turn off the Delaunay package checks using cgal_create_assertions.sh, but I’m not sure where the “proper directory” to place the resulting file would be. Would that be /usr/local/include/CGAL?

--
Adam Getchell
https://keybase.io/adamgetchell


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


Reply | Threaded
Open this post in threaded view
|

Re: Turn off CGAL assertions

Marc Glisse
On Thu, 9 Nov 2017, Adam Getchell wrote:

> Hello all,
>
> I’m trying to turn off the following:
>
> CGAL error: assertion violation!
> Expression : false
> File       : /usr/local/include/CGAL/Delaunay_triangulation_3.h
> Line       : 1973
>
> Which, I believe, relates to the triangulation not being Delaunay after the flip.
>
> I’ve read over https://doc.cgal.org/latest/Manual/devman_checks.html and added the following to CMakeLists in order to turn off all the checks:
>
> set(CGAL_NDEBUG "Turn off all checks")
>
> That hasn’t worked. Do I have to compile CGAL with this flag?

Just use NDEBUG instead? CGAL_NO_ASSERTIONS or
CGAL_TRIANGULATION_NO_ASSERTIONS should work as well.

--
Marc Glisse

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


Reply | Threaded
Open this post in threaded view
|

Re: Turn off CGAL assertions

Adam Getchell
Hi Marc,

Thanks for the suggestion!

Neither: 

set(CGAL_NO_ASSERTIONS TRUE CACHE BOOL “Turn off Triangulation checks” FORCE)

Nor:

set(CGAL_TRIANGULATION_NO_ASSERTIONS CACHE BOOL “Turn off Triangulation checks” FORCE)

Prevent:

CGAL error: assertion violation!
Expression : false
File       : /usr/local/include/CGAL/Delaunay_triangulation_3.h
Line       : 1973
Explanation: 
Refer to the bug-reporting instructions at http://www.cgal.org/bug_report.html

If I run in release mode (NDEBUG), that does work. Unfortunately, it also prevents me from interactively debugging my code.

Am I missing something?

Cheers,
Adam

On Nov 9, 2017, at 9:04 PM, Marc Glisse <[hidden email]> wrote:

On Thu, 9 Nov 2017, Adam Getchell wrote:

Hello all,

I’m trying to turn off the following:

CGAL error: assertion violation!
Expression : false
File       : /usr/local/include/CGAL/Delaunay_triangulation_3.h
Line       : 1973

Which, I believe, relates to the triangulation not being Delaunay after the flip.

I’ve read over https://doc.cgal.org/latest/Manual/devman_checks.html and added the following to CMakeLists in order to turn off all the checks:

set(CGAL_NDEBUG "Turn off all checks")

That hasn’t worked. Do I have to compile CGAL with this flag?

Just use NDEBUG instead? CGAL_NO_ASSERTIONS or CGAL_TRIANGULATION_NO_ASSERTIONS should work as well.

--
Marc Glisse

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



Reply | Threaded
Open this post in threaded view
|

Re: Turn off CGAL assertions

Marc Glisse
On Fri, 10 Nov 2017, Adam Getchell wrote:

> Thanks for the suggestion!
>
> Neither:
>
> set(CGAL_NO_ASSERTIONS TRUE CACHE BOOL “Turn off Triangulation checks” FORCE)
>
> Nor:
>
> set(CGAL_TRIANGULATION_NO_ASSERTIONS CACHE BOOL “Turn off Triangulation checks” FORCE)

Ah, I hadn't noticed, all those (including CGAL_NDEBUG) are not meant as
cmake variables (cmake is the root of all evil), they are preprocessor
variables, so you should add -DCGAL_NO_ASSERTIONS to CXXFLAGS or something
like that.

> Prevent:
>
> CGAL error: assertion violation!
> Expression : false
> File       : /usr/local/include/CGAL/Delaunay_triangulation_3.h
> Line       : 1973
> Explanation:
> Refer to the bug-reporting instructions at http://www.cgal.org/bug_report.html <http://www.cgal.org/bug_report.html>
>
> If I run in release mode (NDEBUG), that does work. Unfortunately, it also prevents me from interactively debugging my code.

CMake has RelWithDebInfo as an alternative to Release or Debug. Don't
know how well that works for CGAL... And nothing prevents you from
adding -DNDEBUG in debug mode.

--
Marc Glisse

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