Netgen segfaults tetmeshing on Redhat EL5

  • Nobody/Anonymous

    I have netgen 4.9.13 installed on two machines.  On one, a package was installed from the Ubuntu Software Center on Ubuntu 11.04 (kernel 2.6.39 x86_64), and on the other it was compiled from the latest source on Red Hat Enterprise Linux Client release 5 (Tikanga) (kernel 2.6.18-8.el5 x86_64).  I used Togl 1.7, tcl 8.4, and tk 8.4.  (I had to get sources
    for libXmu and libXext as well.)  Netgen meshes a complex geometry perfectly on the ubuntu machine using coarse settings, run in batchmode.  When running on the redhat workstation, however, some
    geometries fail inexplicably with a seg fault while tet meshing.  Those geometries can be meshed on the ubuntu install just fine, but they consistently segfault on the redhat workstation (which has twice the RAM). 

    The end of the console messages (returned from my script's log) are:

    Surface 288 / 288
     Optimize Surface
     Meshing subdomain 1 of 283
     Delaunay meshing
     start tetmeshing
    netgen -batchmode -coarse -
    geofile=arena_job15700_distmembrane.geo -
    meshfile=arena_job15700_distmembrane.mesh: Segmentation fault

    running gdb and attaching to the running process:

    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 46912506037952 (LWP 21785)]
    netgen::MeshOptimize3d::SwapImprove (this=<value optimized out>, 
        goal=netgen::OPT_REST, working_elements=0x0)
        at ../include/../gprim/geom3d.hpp:89
    warning: Source file is more recent than executable.
    89        x[i] = p2(i);
    (gdb) list
    84      { x[0] = p2.x[0]; x[1] = p2.x[1]; x[2] = p2.x[2]; }
    86    Point3d (const Point<3> & p2)
    87    {
    88      for (int i = 0; i < 3; i++)
    89        x[i] = p2(i);
    90    }
    92    ///
    93    Point3d & operator= (const Point3d & p2)
    (gdb) backtrace
    #0  netgen::MeshOptimize3d::SwapImprove (this=<value optimized out>, 
        mesh=@0x37130d0, goal=netgen::OPT_REST, 
        at ../include/../gprim/geom3d.hpp:89
    #1  0x00000000005d6f1e in netgen::MeshVolume (mp=@0x923280, 
        at meshfunc.cpp:275
    #2  0x00000000004b7f23 in netgen::CSGGenerateMesh 
        mesh=@0x9211c0, perfstepsstart=1, perfstepsend=6, 
        optstr=0x2aaac278b010 " \023\217") at genmesh.cpp:802
    #3  0x000000000045b13d in netgen::MeshingDummy () at 
    #4  0x0000000000456bb6 in RunParallel (
        fun=0x45af50 <netgen::MeshingDummy(void*)>, in=0x0) at 
    #5  0x00000000004594f2 in netgen::Ng_GenerateMesh 
        interp=0x3698ee0, argc=3, argv=0x7fff017f9250) at ngpkg.cpp:2273
    #6  0x00002aaaaace4589 in TclInvokeStringCommand () from 
    #7  0x00002aaaaace5c73 in TclEvalObjvInternal () from 
    #8  0x00002aaaaad0ec21 in Tcl_ExprObj () from /usr/lib64/
    #9  0x00002aaaaad1207e in TclCompEvalObj () from 
    #10 0x00002aaaaace6b70 in Tcl_EvalObjEx () from 
    #11 0x00002aaaaacf1e51 in Tcl_IfObjCmd () from /usr/lib64/
    #12 0x00002aaaaace5c73 in TclEvalObjvInternal () from 
    #13 0x00002aaaaace616b in Tcl_EvalEx () from /usr/lib64/
    #14 0x00002aaaaad29167 in Tcl_FSEvalFile () from 
    #15 0x00002aaaaad2924f in Tcl_EvalFile () from /usr/lib64/
    #16 0x0000000000454d34 in main (argc=4, argv=<value optimized 
        at ngappinit.cpp:254


    Finally, the netgen version installed from a package notes that the OpenCascade geometry kernel is included, whereas my compiled redhat binary does not.  It appears as if OpenCascade libraries are hard to come by for redhat, but I'm not sure if this is an important difference.

    Any ideas?  Thanks!

  • djvictoid

    djvictoid - 2011-06-11

    Oops, wasn't properly logged in when posting the above!

  • djvictoid

    djvictoid - 2011-06-14

    Just to follow up, I found that the segfault could often be avoided by removing the '-coarse' tag from the command line arguments.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks