Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] corefine crash with emscripten

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] corefine crash with emscripten


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] corefine crash with emscripten
  • Date: Wed, 21 Oct 2020 14:37:13 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:kbtq8BSppQ+FAvb+1acsBT9PMdpsv+yvbD5Q0YIujvd0So/mwa67ZB2Bt8tkgFKBZ4jH8fUM07OQ7/m/HzNdqsrb+Fk5M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aFRrwLxd6KfroEYDOkcu3y/qy+5rOaAlUmTaxe7x/IAi0oAnLtMQbgYRuJ6kvxhDUvnZGZuNayH9yK1mOhRj8/MCw/JBi8yRUpf0s8tNLXLv5caolU7FWFSwqPG8p6sLlsxnDVhaP6WAHUmoKiBpIAhPK4w/8U5zsryb1rOt92C2dPc3rUbA5XCmp4ql3RBP0jioMKjg0+3zVhMNtlqJWuA+vqQJxw4DUY4+bOvRxcazfctwGSmRMRdpRWi9bD4+gc4cCAegMMOBFpIf9vVsOqh6+CBGiCO3y1DBHnWX53bYm0+QgDw7G2hErEdQJsHTOrdX1M7sSWv2xwKfJ0zrDaPZW1inh6IjSchEvoeuDUq5sccrW00kuFwbJgluNooHiJDOV0uMNs3Ka7+pnSeKjkWsnqwVqrzigw8cjkIjJhoYPxl/Y8iV5xZ84KNulQ0F0fdCqCoFftz2GN4RoWMMiRXlltDo6x7MJuZC2ciYExYojyhPfdvCJfJSE7x3/WOufPTp1mXZodbK9ihqs/0Wty/DxW8m63VtUoCRIktbCu2wM2hHV98OJRPx9/kK71jaO0QDe8uBEIUYularaMZEt2LAwloAVvE/eHSH2gF37gLGKekgg4OSl6OTqbq/7qpOCNIJ4kADzP6c2lsChG+s0LhUCUm2F9uigzrLu+FP1TKlXgvAznKTWqo7WKdgeq6O3GQBY3Jsv5hOkADqmytsVnnwKIExYdB+FioXmIV7DLf76APq5nl+iii1kx+rcMb3kGpjNLmbMkLPmfbtl7k5T0gszzdRG65NaD7ENPev/WkHwudHbFBM5PAu0w+HoCNV5yIwSQ36AAqicMK/KsF+I4PwgI/WUaYMLpDrwL+Ip6v3ugHMjhFMRY6qk0YEWZX27BvhmJl+WYXvogtcPC2cKuQ8+QfTxiF2GVj5TfXeyX6Ug5j0hDYKmCZzORo+ogLOb3Se7GodaaXxBClCJCXvobZmLW+8QaCKOJc9siiALVbe7RI8lzB2hqQ76y6F7IerJ4S0Yronu1MN15u3WjRE97yZ4D8Wb02GXTmF7hHkERzEs3PM3nEpm113W0bRkm+cKUptI9vZRW0E7M4Tdxqp0EZfpSwfZd5CITlihBd6pCDV0QtMqyMIVeBVAHc6/hCzOzzb/A6MJj6fZQ9sv46fE1j7wIdx8wjDIzu46nlw+S4xOM2OhwaVw/gyWC4/SmFiCjPWWcvEX0yfJsWuC1mGTp1pwUQhqUKyDU2pMSFHRqIGz3U7IRqSyCLkhei9G08+FNuMKRdDuiFhaXubNMd/CZHig2i34UQ2MwamNa5asfmE10yDUCUxCmAcWqyXVfTMiDzus9jqNRAdlEkjiNhu1rbtO7UijR0px9DmkKlV73uPsqBEQjP2YDfgU2+Bc4XZzm3BPBF+4munuJZ+Frgtlcr9bZIpkslhC3GPd8Qd6O875dv0wthslaw1y+njW+VB3B4FHy5V4qXoryE9tLPvd3g0RMTyf2p/0N/vcLWygpB0=

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




Archive powered by MHonArc 2.6.19+.

Top of Page