Skip to Content.
Sympa Menu

cgal-discuss - [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

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


Chronological Thread 
  • From: Vero <>
  • To:
  • Subject: [cgal-discuss] CGAL::Assertion_exception -CGAL_IA_MUL(-1.1, 10.1) != CGAL_IA_MUL(1.1, 10.1)
  • Date: Sat, 16 Jun 2012 17:46:10 +0100

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


Simple source code:

Mass_Spring_Graph.hpp:
#ifndef _MSGRAPH_
#define _MSGRAPH_

#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
#include <CGAL/Delaunay_mesher_2.h>
#include <CGAL/Triangulation_conformer_2.h>
#include "massspring/Mass_Spring_mesh_face_base.hpp"
#include <CGAL/Delaunay_mesh_size_criteria_2.h>

#include <CGAL/Polygon_2_algorithms.h>
#include "massspring/Mass_Spring_vertex_base.hpp"

typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Vector_2<K> Vector;

typedef CGAL::Mass_Spring_vertex_base<Vector, K> Vb; // Info =
velocity of the node
typedef CGAL::Mass_Spring_mesh_face_base<K> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> TDS;
typedef CGAL::Exact_predicates_tag Itag;
typedef CGAL::Constrained_Delaunay_triangulation_2<K, TDS, Itag>
Triangulation;

typedef Triangulation::Vertex_circulator VertexCirculator;
typedef Triangulation::Edge_circulator EdgeCirculator;
typedef Triangulation::Face_circulator FaceCirculator;
typedef Triangulation::Finite_vertices_iterator VerticesIterator;
typedef Triangulation::Finite_edges_iterator EdgesIterator;
typedef Triangulation::Finite_faces_iterator FacesIterator;
typedef Triangulation::Face Face;
typedef Triangulation::Edge Edge;
typedef Triangulation::Point Point;
typedef Triangulation::Vertex Vertex;
typedef Triangulation::Vertex_handle Vertex_handle;
typedef Triangulation::Face_handle Face_handle;

typedef CGAL::Delaunay_mesh_size_criteria_2<Triangulation> Criteria;

typedef std::vector<Point> Points;

#include <CGAL/assertions_behaviour.h>
#include <CGAL/exceptions.h>

#endif

CGALTest.cpp:
#include "massspring/Mass_Spring_Graph.hpp"
#include <iostream>

int main(int argc, char** argv){
Triangulation t;
std::cout << "Triangulation loaded" << std::endl;
}

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

--

Veronica E. Arriola

Room G5 Chemistry West,
School of Computer Science
University of Birmingham
http://www.cs.bham.ac.uk/~vxa855/



Archive powered by MHonArc 2.6.18.

Top of Page