CGAL 3D mesh generator: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range

Issue #59 invalid
Nico Schlömer created an issue

MWE:

#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
import dolfin
import mshr

def create_toy_mesh():

    box = mshr.Box(dolfin.Point(-3, -1, -0.5), dolfin.Point(3, 1, 0.5))

    c1 = mshr.Cylinder(dolfin.Point(0, 0, -2), dolfin.Point(0, 0, 2), 0.6, 0.6)
    b1 = mshr.Box(dolfin.Point(-2.5, -0.5, -2), dolfin.Point(-1.5, 0.5, 2))

    # "triangle"
    t1 = mshr.Polygon([
            dolfin.Point(2.5, -0.5, 0),
            dolfin.Point(2.5,  0.5, 0),
            dolfin.Point(1.5, -0.5, 0)
            ])
    g3d = mshr.Extrude2D(t1, -2)
    g3d = mshr.CSGTranslation(g3d, dolfin.Point(0, 0, 1))

    m = mshr.generate_mesh(box - c1 - b1 - g3d, 40, "cgal")

    return m.coordinates(), m.cells()


if __name__ == '__main__':
    import meshio
    points, cells = create_toy_mesh()
    meshio.write('toy.e', points, {'tetra': cells})

Output:

Generating mesh with CGAL 3D mesh generator
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[0]PETSC ERROR: or see http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind
[0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors
[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run 
[0]PETSC ERROR: to get more information on the crash.
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD 
with errorcode 59.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------

Comments (1)

  1. Nico Schlömer reporter

    Wait, this is probably a bug in VTK via meshio. I had immediately associated the PETSc output with dolfin.

  2. Log in to comment