This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

CSG-3D geometry demo got wrong information

0 votes

I use FEniCS 1.2.0 with Ubuntu 13.10 and want to run the CSG-3D geometry demo as described in the FEniCS website enter link description here

and got very strange error message as follow:

Compact output of 3D geometry:
((Box(0, 0, 0, 1, 1, 1) + Cone( <Point x = 0 y = 0 z = -1>, <Point x = 0 y = 0 z = 1>, 1, 0.5 )) - Sphere(<Point x = 0 y = 0 z = 0>, 0.3))

Verbose output of 3D geometry:
<Difference>
{
  <Union>
  {
    <Box with first corner at (0, 0, 0) and second corner at (1, 1, 1)>
    <Cone with top at <Point x = 0 y = 0 z = -1>, top radius 1 and bottom at <Point x = 0 y = 0 z = 1>, bottom radius 0.5, with 32 slices>
  }
  <Sphere at <Point x = 0 y = 0 z = 0> with radius 0.3>
}
Convert to nef polyhedron
[zhouyi:07222] *** Process received signal ***
[zhouyi:07222] Signal: Segmentation fault (11)
[zhouyi:07222] Signal code: Address not mapped (1)
[zhouyi:07222] Failing at address: (nil)
[zhouyi:07222] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0xfbb0) [0x7f4e8781dbb0]
[zhouyi:07222] [ 1] /usr/lib/libdolfin.so.1.2(_ZNK4CGAL18Filtered_predicateINS_23CartesianKernelFunctors11Compare_x_3INS_16Simple_cartesianINS_4GmpqEEEEENS2_INS3_INS_11Interval_ntILb0EEEEEEENS_15Exact_converterINS_5EpeckES5_EENS_16Approx_converterISC_S9_EELb1EEclINS_7Point_3ISC_EESJ_EENS_4SignERKT_RKT0_+0x20) [0x7f4e811aab60]
[zhouyi:07222] [ 2] /usr/lib/libdolfin.so.1.2(_ZN4CGAL7K3_treeINS_18SNC_k3_tree_traitsINS_13SNC_decoratorINS_13SNC_structureINS_5EpeckENS_17SNC_indexed_itemsEbEEEEEEE12Smaller_thanIS4_NS_6ObjectENS_8internal22In_place_list_iteratorINS_20SNC_in_place_list_smINS_14SNC_sphere_mapIS4_S5_bEEEESaISH_EEEiEclERKSB_SM_+0xab) [0x7f4e8120f90b]
[zhouyi:07222] [ 3] /usr/lib/libdolfin.so.1.2(_ZSt13__introselectIN9__gnu_cxx17__normal_iteratorIPN4CGAL6ObjectESt6vectorIS3_SaIS3_EEEElNS2_7K3_treeINS2_18SNC_k3_tree_traitsINS2_13SNC_decoratorINS2_13SNC_structureINS2_5EpeckENS2_17SNC_indexed_itemsEbEEEEEEE12Smaller_thanISD_S3_NS2_8internal22In_place_list_iteratorINS2_20SNC_in_place_list_smINS2_14SNC_sphere_mapISD_SE_bEEEESaISP_EEEiEEEvT_ST_ST_T0_T1_+0xde) [0x7f4e81213bce]
[zhouyi:07222] [ 4] /usr/lib/libdolfin.so.1.2(_ZN4CGAL7K3_treeINS_18SNC_k3_tree_traitsINS_13SNC_decoratorINS_13SNC_structureINS_5EpeckENS_17SNC_indexed_itemsEbEEEEEEE25construct_splitting_planeIiEENS_7Plane_3IS4_EEN9__gnu_cxx17__normal_iteratorIPNS_6ObjectESt6vectorISF_SaISF_EEEESK_RSK_T_+0x7b) [0x7f4e81213d9b]
[zhouyi:07222] [ 5] /usr/lib/libdolfin.so.1.2(_ZN4CGAL7K3_treeINS_18SNC_k3_tree_traitsINS_13SNC_decoratorINS_13SNC_structureINS_5EpeckENS_17SNC_indexed_itemsEbEEEEEEE12build_kdtreeIiEEPNS9_4NodeERSt6vectorINS_6ObjectESaISE_EEN9__gnu_cxx17__normal_iteratorIPSE_SG_EET_SC_i+0x89) [0x7f4e81214d49]
[zhouyi:07222] [ 6] /usr/lib/libdolfin.so.1.2(_ZN4CGAL7K3_treeINS_18SNC_k3_tree_traitsINS_13SNC_decoratorINS_13SNC_structureINS_5EpeckENS_17SNC_indexed_itemsEbEEEEEEE12build_kdtreeIiEEPNS9_4NodeERSt6vectorINS_6ObjectESaISE_EEN9__gnu_cxx17__normal_iteratorIPSE_SG_EET_SC_i+0x8bd) [0x7f4e8121557d]
[zhouyi:07222] [ 7] /usr/lib/libdolfin.so.1.2(_ZN4CGAL7K3_treeINS_18SNC_k3_tree_traitsINS_13SNC_decoratorINS_13SNC_structureINS_5EpeckENS_17SNC_indexed_itemsEbEEEEEEE12build_kdtreeIiEEPNS9_4NodeERSt6vectorINS_6ObjectESaISE_EEN9__gnu_cxx17__normal_iteratorIPSE_SG_EET_SC_i+0x887) [0x7f4e81215547]
[zhouyi:07222] [ 8] /usr/lib/libdolfin.so.1.2(_ZN4CGAL7K3_treeINS_18SNC_k3_tree_traitsINS_13SNC_decoratorINS_13SNC_structureINS_5EpeckENS_17SNC_indexed_itemsEbEEEEEEE12build_kdtreeIiEEPNS9_4NodeERSt6vectorINS_6ObjectESaISE_EEN9__gnu_cxx17__normal_iteratorIPSE_SG_EET_SC_i+0x8bd) [0x7f4e8121557d]
[zhouyi:07222] [ 9] /usr/lib/libdolfin.so.1.2(_ZN4CGAL7K3_treeINS_18SNC_k3_tree_traitsINS_13SNC_decoratorINS_13SNC_structureINS_5EpeckENS_17SNC_indexed_itemsEbEEEEEEE12build_kdtreeIiEEPNS9_4NodeERSt6vectorINS_6ObjectESaISE_EEN9__gnu_cxx17__normal_iteratorIPSE_SG_EET_SC_i+0x887) [0x7f4e81215547]
[zhouyi:07222] [10] /usr/lib/libdolfin.so.1.2(_ZN4CGAL7K3_treeINS_18SNC_k3_tree_traitsINS_13SNC_decoratorINS_13SNC_structureINS_5EpeckENS_17SNC_indexed_itemsEbEEEEEEE12build_kdtreeIiEEPNS9_4NodeERSt6vectorINS_6ObjectESaISE_EEN9__gnu_cxx17__normal_iteratorIPSE_SG_EET_SC_i+0x8bd) [0x7f4e8121557d]
[zhouyi:07222] [11] /usr/lib/libdolfin.so.1.2(_ZN4CGAL7K3_treeINS_18SNC_k3_tree_traitsINS_13SNC_decoratorINS_13SNC_structureINS_5EpeckENS_17SNC_indexed_itemsEbEEEEEEE12build_kdtreeIiEEPNS9_4NodeERSt6vectorINS_6ObjectESaISE_EEN9__gnu_cxx17__normal_iteratorIPSE_SG_EET_SC_i+0x887) [0x7f4e81215547]
[zhouyi:07222] [12] /usr/lib/libdolfin.so.1.2(_ZN4CGAL40SNC_point_locator_by_spatial_subdivisionINS_13SNC_decoratorINS_13SNC_structureINS_5EpeckENS_17SNC_indexed_itemsEbEEEEE10initializeEPS5_+0x3e6) [0x7f4e81215b46]
[zhouyi:07222] [13] /usr/lib/libdolfin.so.1.2(_ZN4CGAL27SNC_external_structure_baseIiNS_13SNC_structureINS_5EpeckENS_17SNC_indexed_itemsEbEEE14create_volumesEv+0x38a) [0x7f4e811dca4a]
[zhouyi:07222] [14] /usr/lib/libdolfin.so.1.2(_ZN4CGAL22SNC_external_structureINS_17SNC_indexed_itemsENS_13SNC_structureINS_5EpeckES1_bEEE24build_external_structureEv+0x1e8) [0x7f4e811dd558]
[zhouyi:07222] [15] /usr/lib/libdolfin.so.1.2(_ZN4CGAL16Nef_polyhedron_3INS_5EpeckENS_17SNC_indexed_itemsEbEC1IS1_NS_18Polyhedron_items_3ENS_18HalfedgeDS_defaultESaIiEEERNS_12Polyhedron_3IT_T0_T1_T2_EE+0x1ad) [0x7f4e8120027d]
[zhouyi:07222] [16] /usr/lib/libdolfin.so.1.2(+0x4f3512) [0x7f4e8117b512]
[zhouyi:07222] [17] /usr/lib/libdolfin.so.1.2(+0x4f3625) [0x7f4e8117b625]
[zhouyi:07222] [18] /usr/lib/libdolfin.so.1.2(+0x4f31bc) [0x7f4e8117b1bc]
[zhouyi:07222] [19] /usr/lib/libdolfin.so.1.2(_ZN6dolfin23GeometryToCGALConverter7convertERKNS_11CSGGeometryERN4CGAL12Polyhedron_3INS4_5EpickENS4_6Mesh_321Mesh_polyhedron_itemsIiEENS4_18HalfedgeDS_defaultESaIiEEEb+0xd6) [0x7f4e8117c046]
[zhouyi:07222] [20] /usr/lib/libdolfin.so.1.2(+0x8bde34) [0x7f4e81545e34]
[zhouyi:07222] [21] /usr/lib/libdolfin.so.1.2(_ZN6dolfin23VTKPlottableCSGGeometryC2EN5boost10shared_ptrIKNS_11CSGGeometryEEE+0x19) [0x7f4e81546099]
[zhouyi:07222] [22] /usr/lib/libdolfin.so.1.2(_ZN6dolfin18CreateVTKPlottableEN5boost10shared_ptrIKNS_11CSGGeometryEEE+0x37) [0x7f4e81546177]
[zhouyi:07222] [23] /usr/lib/libdolfin.so.1.2(_ZN6dolfin18CreateVTKPlottableEN5boost10shared_ptrIKNS_8VariableEEE+0x67) [0x7f4e81536587]
[zhouyi:07222] [24] /usr/lib/libdolfin.so.1.2(_ZN6dolfin10VTKPlotterC2EN5boost10shared_ptrIKNS_8VariableEEEP10QVTKWidget+0x55) [0x7f4e81539195]
[zhouyi:07222] [25] /usr/lib/libdolfin.so.1.2(_Z11get_plotterN5boost10shared_ptrIKN6dolfin8VariableEEESs+0x215) [0x7f4e815429e5]
[zhouyi:07222] [26] /usr/lib/libdolfin.so.1.2(_Z11plot_objectN5boost10shared_ptrIKN6dolfin8VariableEEENS0_IKNS1_10ParametersEEESs+0xb6) [0x7f4e81542db6]
[zhouyi:07222] [27] /usr/lib/libdolfin.so.1.2(_ZN6dolfin4plotEN5boost10shared_ptrIKNS_8VariableEEENS1_IKNS_10ParametersEEE+0x71) [0x7f4e815434b1]
[zhouyi:07222] [28] /usr/lib/python2.7/dist-packages/dolfin/cpp/_io.so(+0x2bd4e) [0x7f4e62ab4d4e]
[zhouyi:07222] [29] /usr/lib/python2.7/dist-packages/dolfin/cpp/_io.so(+0x37295) [0x7f4e62ac0295]
[zhouyi:07222] *** End of error message ***
Segmentation fault (core dumped)

Can somebody help?

asked Nov 14, 2013 by kickccat FEniCS Novice (200 points)

it seems it works in my mac with fenics 1.2.

1 Answer

+1 vote

This is due to a STL bug in Ubuntu 13.10. See https://bugs.launchpad.net/bugs/1246802. A fix is on the way from Ubuntu. See https://bugs.launchpad.net/ubuntu/+source/gcc-4.8/+bug/1246802/comments/32 is you want to fix it now.

answered Nov 15, 2013 by Garth N. Wells FEniCS Expert (35,930 points)

Hi,
I patched the package “gcc-4.8” 4.8.1-10ubuntu9, but still failed and got the same error information.

Segfault also for me, used to run ok with older Ubuntu, code snippet at bottom of mail.

Ubuntu 13.10-desktop-amd64, running in VMWare Player 6.0.1 under Windows 8.
32 MB Ram
4 Cores
Fenics 1.2
Recommended update installed: “gcc-4.8” 4.8.1-10ubuntu9

Going back to Ubuntu-12.10-desktop-i386 (all other unchanged) solves the problem.

Kind regards
Jacques de Hooge
Netherlands

BEGIN code snippet

dirichletBoundaryConditions = [DirichletBC (functionSpace, HeartPotentialExpression (), facetMeshFunction, uniqueSourceFacetLabel)]

leftHandSide = sigma * inner (grad (trialFunction), grad (testFunction)) * dx
rightHandSide = Constant (0) * testFunction * dx

A, b = assemble_system (leftHandSide, rightHandSide, dirichletBoundaryConditions, keep_diagonal = True)

solve (A, potential.vector (), b,'gmres', 'default')

END code snippet

Okay, anyway thanks. I found 13.10 is not so stable and return to the precise, then solved the problem.

...