Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] CGAL::Assertion_exception -CGAL_IA_MUL(-1.1, 10.1) != CGAL_IA_MUL(1.1, 10.1)

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] CGAL::Assertion_exception -CGAL_IA_MUL(-1.1, 10.1) != CGAL_IA_MUL(1.1, 10.1)


Chronological Thread 
  • From: Philipp Moeller <>
  • To:
  • Cc:
  • Subject: Re: [cgal-discuss] CGAL::Assertion_exception -CGAL_IA_MUL(-1.1, 10.1) != CGAL_IA_MUL(1.1, 10.1)
  • Date: Sun, 17 Jun 2012 01:51:07 +0200
  • Organization: GeometryFactory

Vero
<>
writes:

> Hi,
>
> I hope you can please help me with this.
>
> I just compiled CGAL 3.9 in Scientific Linux, with
> gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3).
> Linux x86_64
>
> I compiled CGAL following this steps:
>
> cmake -DCMAKE_INSTALL_PREFIX=/data/.../CGAL-3.9/build
> -DCGAL_CXX_FLAGS=-frounding-math .
> make VERBOSE=1
> make install
>
> The compilation messages indicate the use of -frounding-math during
> the process. (I even tried adding it to the compilation of my own
> program)
>
> I have the same version in Ubuntu 10, working perfectly well with the
> same code, but my program fails in this other machine. When trying to
> run any program I get:
>
> bash-4.1$ ./tests/CGALTest
> 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: /data/.../CGAL-3.9/build/include/CGAL/Interval_nt.h
> Line: 159
> Explanation: Wrong rounding: did you forget the -frounding-math
> option if you use GCC (or -fp-model strict for Intel)?
> Aborted
>
> ... snip ...
>
> Compiled with:
>
> ##
> ## CGALTest
> ##
> CGALTEST = CGALTest
> $(CGALTEST)_HPP = include/massspring/Mass_Spring_Graph.hpp
> include/massspring/Mass_Spring_mesh_face_base.hpp
> include/massspring/Mass_Spring_vertex_base.hpp
> $(CGALTEST) : tests/src/$(CGALTEST).cpp $($(CGALTEST)_HPP)
> $(CXX) $(CPPFLAGS) tests/src/$(CGALTEST).cpp -o $(CGALTEST) -Iinclude
> $(CGALREQS)
> mv $(CGALTEST) tests/
>
> Thank you for your attention

Your executable needs to be compiled with -frounding-math as well. Just
compiling the CGAL libraries isn't enough as most of our code resides in
headers.

$(CGALTEST) : tests/src/$(CGALTEST).cpp $($(CGALTEST)_HPP)
$(CXX) $(CPPFLAGS) -frounding-math tests/src/$(CGALTEST).cpp -o
$(CGALTEST) -Iinclude

should do the trick, but you probably want to integrate this a little
better into your build-system.



Archive powered by MHonArc 2.6.18.

Top of Page