Subject: CGAL users discussion list
List archive
- From: Alessio Mochi <>
- To: "Sebastien Loriot (GeometryFactory)" <>
- Subject: Re: [cgal-discuss] corefine crash with emscripten
- Date: Wed, 21 Oct 2020 14:03:05 +0000 (UTC)
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:6fZKzhbReKLmZOnORMm40nL/LSx+4OfEezUN459isYplN5qZpsyybR7h7PlgxGXEQZ/co6odzbaP7Oa/BCdcu96oizMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpTEdFQ/iOgVrO+/7BpDdj9it1+C15pbffxhEiCCybL9vLhi6twfcu8kZjYZtNKo61wfErGZPd+lK321jOEidnwz75se+/Z5j9zpftvc8/MNeUqv0Yro1Q6VAADspL2466svrtQLeTQSU/XsTTn8WkhtTDAfb6hzxQ4r8vTH7tup53ymaINH2QLUpUjms86tnVBnlgzoBOjUk8m/Yl9ZwgbpVrhyhuRJxwIzbYI+IOvVxYqzTesgXSnBdUslKTCNMGJ+wYokJAuEcPehYtY79p14WoBaiAQmjGvjvyiRJhn/xwKY01OMhHh3G3AwhAtkDt27brNHrO6cJSuC1za7IwSveY/9L2zrw5ofFfwshoP6WXbJwds3RxVMuFwPZl1idr5HuMDyJ2OoXqWeb8/ZgWvy1i24hswx/oiWiy9kshITUm44Z11LJ+Dt5zos6IdC2RlB3bN6mHZZQtyyXKY97T8E/T2xmtyg317kLtJGlcCUXyJor2xrSZvqaeIaG5RLjUfyeITZ+hH99ebK/gQyy8Um6xeHmWMm0ylBHpTdGnNnUrn0A1R7e5tKZRvZz/UqtwyuD2gLS5+1eP0w4iavWJpg8ybAqjJUTq17MHirulUX2kqCWckIk9/Cz6+TgZLXmp4OTOoFohgz/K6gihNCzDf4kPQgJWWib4uG81Kf58U38WrpKj/k2nrPYsJDAO8gXvK64DBVV0oYk7BazFSup0NMdnXUfLVJFfgyIj5TxNlzMIv30F+mzjlqvnTtx2vzLPLzsDo/TInTfkbrtZbN95FRdyAo3w9Bf/ZVUCrQZLf3pXk/+qsfYDgQ4Mwyz3errFchx24EQVG+AGaKYMLndsV+P5uIoOeWMZZMVtC7nK/c5//7ukWM5mVgFcKa10psYcnS4Eu17LEWYenrjnsoBEXwRvgclV+zriFiCUSZJaHqoXqI84Cs7CIO8AovZSICtmu/J4SGgA5cDZnxaEkveVjDzZoCcUrENbjiTK4lviHsfRL25Qsgg0x+p8wT1wr4iIuvP8TADrsHe0sNo7c3PkBVn9SBoF9/PlCaWXmRslyUJQSU31eZxuwtm21Kb2O95hfJfUtdc7vcMXgYhPoPH1L9HDcvvUD7MbsvcSEq6Ws70RnYqX9cpypkPZVx8EpOslFfYzi+yCvgUkbKMQ5c7+6aZ03nqLNtm0CX60/xrtFQsS9BTNGCgzop47QnUG8aJvEiekqu2b7Uy1SXR832SjCDG6EpXWQo1XaTeVm0EfWPXq8747wXMVen9J64gN15ozcOZMapNIvjuhlVHDKPqPNnFeGO2wT7pWk3U7qKFbI3tPWQBinaOQHMYmhweqC7VfTM1AT2s9jqHUW5eUGn3akapytFQ7XO2SkhvnlORaEtg3OHtpFtP3bqXTPUI26hCvS4gr3N1Bgz7ztvWDN3GrA1kLv0FPYENpWxf3GecjDRTe4S6Jvk61E8XcwNw+ULyhU0uW9dw1PMypXZv9zJcbKeR0VdPbTSdhMiiK7TXLW60/Qz9MqM=
>One solution
>would be to change the interval implementation to not rely on a given
>rounding mode (by always be pessimistic and increase/decrease the bounds
>by one ulp).
>would be to change the interval implementation to not rely on a given
>rounding mode (by always be pessimistic and increase/decrease the bounds
>by one ulp).
Il mercoledì 21 ottobre 2020, 14:38:00 CEST, Sebastien Loriot (GeometryFactory) <> ha scritto:
The piece of code you "by passed" indicates the issue. There is no
rounding mode handling in the _javascript_ version which makes the
filtered predicates non robust anymore.
There is a high chance that the issue is coming from here. One solution
would be to change the interval implementation to not rely on a given
rounding mode (by always be pessimistic and increase/decrease the bounds
by one ulp). No idea what would be the effect on the runtime however.
Best,
Sebastien.
On 10/21/20 11:57 AM, Alessio Mochi ( via
cgal-discuss Mailing List) wrote:
> Hello,
> I tried to compile cgal 5.1 with emscripten and boost 1_62.
>
> I had to bypass a piece of code in Interval_nt.h
>
> #if 0
> CGAL_assertion_msg(-CGAL_IA_MUL(-1.1, 10.1) != CGAL_IA_MUL(1.1,
> 10.1),
> "Wrong rounding: did you forget the
> -frounding-math option if you use GCC (or -fp-model strict for Intel)?");
> CGAL_assertion_msg(-CGAL_IA_DIV(-1., 10) != CGAL_IA_DIV(1., 10),
> "Wrong rounding: did you forget the
> -frounding-math option if you use GCC (or -fp-model strict for Intel)?");
> #endif
>
> and use boost 1_62 to get a correct compilation.
>
> Many example work, but the corefine example crash on one
> CGAL_triangulation_assertion( s != LEFT_TURN );
>
> CGAL-5.1/include/CGAL/Triangulation_2.h at line 928
>
> This is the code where crash happen
>
> Vertex_circulator start = incident_vertices(infinite_vertex());
> Vertex_circulator pc(start);
> Vertex_circulator qc(start); ++qc;
> Vertex_circulator rc(start); ++rc; ++rc;
> do {
> Orientation s = orientation(pc->point(),
> qc->point(),
> rc->point());
> CGAL_triangulation_assertion( s != LEFT_TURN );
> result = result && ( s != LEFT_TURN );
> ++pc ; ++qc ; ++rc;
> } while(pc != start);
>
> does anyone have any idea how to fix this problem?
> Thanks in advance.
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
rounding mode handling in the _javascript_ version which makes the
filtered predicates non robust anymore.
There is a high chance that the issue is coming from here. One solution
would be to change the interval implementation to not rely on a given
rounding mode (by always be pessimistic and increase/decrease the bounds
by one ulp). No idea what would be the effect on the runtime however.
Best,
Sebastien.
On 10/21/20 11:57 AM, Alessio Mochi ( via
cgal-discuss Mailing List) wrote:
> Hello,
> I tried to compile cgal 5.1 with emscripten and boost 1_62.
>
> I had to bypass a piece of code in Interval_nt.h
>
> #if 0
> CGAL_assertion_msg(-CGAL_IA_MUL(-1.1, 10.1) != CGAL_IA_MUL(1.1,
> 10.1),
> "Wrong rounding: did you forget the
> -frounding-math option if you use GCC (or -fp-model strict for Intel)?");
> CGAL_assertion_msg(-CGAL_IA_DIV(-1., 10) != CGAL_IA_DIV(1., 10),
> "Wrong rounding: did you forget the
> -frounding-math option if you use GCC (or -fp-model strict for Intel)?");
> #endif
>
> and use boost 1_62 to get a correct compilation.
>
> Many example work, but the corefine example crash on one
> CGAL_triangulation_assertion( s != LEFT_TURN );
>
> CGAL-5.1/include/CGAL/Triangulation_2.h at line 928
>
> This is the code where crash happen
>
> Vertex_circulator start = incident_vertices(infinite_vertex());
> Vertex_circulator pc(start);
> Vertex_circulator qc(start); ++qc;
> Vertex_circulator rc(start); ++rc; ++rc;
> do {
> Orientation s = orientation(pc->point(),
> qc->point(),
> rc->point());
> CGAL_triangulation_assertion( s != LEFT_TURN );
> result = result && ( s != LEFT_TURN );
> ++pc ; ++qc ; ++rc;
> } while(pc != start);
>
> does anyone have any idea how to fix this problem?
> Thanks in advance.
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
- [cgal-discuss] corefine crash with emscripten, Alessio Mochi, 10/21/2020
- Re: [cgal-discuss] corefine crash with emscripten, Sebastien Loriot (GeometryFactory), 10/21/2020
- Re: [cgal-discuss] corefine crash with emscripten, Alessio Mochi, 10/21/2020
- Re: [cgal-discuss] corefine crash with emscripten, Sebastien Loriot (GeometryFactory), 10/21/2020
Archive powered by MHonArc 2.6.19+.