BoundingBoxTree.py tests fails with GCC 4.8

Issue #133 resolved
Prof Garth Wells created an issue
FAIL: test_compute_closest_entity_3d (__main__.BoundingBoxTreeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "BoundingBoxTree.py", line 372, in test_compute_closest_entity_3d
    self.assertEqual(entity, reference[0])
AssertionError: 4 != 2

This problem causes a bunch of demos to fail too.

Comments (12)

  1. Prof Garth Wells reporter

    No. The demos that use the geometry code are failing, e.g.

    demo/documented/auto-adaptive-poisson
    
  2. Anders Logg (Chalmers)

    In what way? I don't have gcc 4.8. I assume it's in Ubuntu 13.10 which I haven't upgraded to yet.

  3. Prof Garth Wells reporter

    Here's one (demo/undocumented/auto-adaptive-navier-stokes/cpp) of a considerable number of failures:

    terminate called after throwing an instance of 'std::runtime_error'
      what():  
    
    *** -------------------------------------------------------------------------
    *** DOLFIN encountered an error. If you are not able to resolve this issue
    *** using the information listed below, you can ask for help at
    ***
    ***     fenics@fenicsproject.org
    ***
    *** Remember to include the error message listed below and, if possible,
    *** include a *minimal* running example to reproduce the error.
    ***
    *** -------------------------------------------------------------------------
    *** Error:   Unable to complete call to function compute_closest_entity().
    *** Reason:  Assertion closest_entity < std::numeric_limits<unsigned int>::max() failed.
    *** Where:   This error was encountered inside /home/garth/code/fenics/dev/dolfin.d/dolfin-master/dolfin/geometry/GenericBoundingBoxTree.cpp (line 235).
    *** Process: 0
    *** -------------------------------------------------------------------------
    
  4. Anders Logg (Chalmers)

    After spending 8 hours tracking down this bug, I finally found it. The bug is in std::nth_element, more specifically in /usr/include/c++/4.8/bits/stl_algo.h.

    So not my fault this time! :-)

    The bug is fixed in gcc 4.8.3. I don't know when it will enter Ubuntu, but until then the fix is to edit the file above and replace -2 by -1 in lines 2282 and 2294.

  5. Log in to comment