[Gmsh] gmsh 2.0.8 aborts or segfaults

magpar magpar at magnet.atp.tuwien.ac.at
Mon Oct 29 18:37:45 CET 2007


Hello Christophe,
Hello all gmsh users,

I am the author of "magpar" a "Parallel Finite Element Micromagnetics 
Package"

http://magnet.atp.tuwien.ac.at/scholz/magpar/

and I am trying to use gmsh to generate the geometry and finite element 
mesh of a nanocrystalline magnetic thin film.

First of all, my sincere thanks to Christophe for gmsh, which is a great 
meshing tool and very helpful for free open source finite element 
applications like my own. Especially its parametric and scripting 
capabilites are very useful.

I use Qhull to generate a 2D Voronoi construction of random seed points 
(with minimum distance between the seeds), convert the geometry 
information (points and edges of the Voronoi cells) into a gmsh script 
with commands to generate the surfaces (in the x-y plane), extrude them 
(once in positive and once in negative z direction) and generate 2 
physical volumes for each Voronoi cell.

I have to disable AutoCoherence because otherwise gmsh renumbers the 
unused points and duplicate points and lines while it imports the 
geometry, which messes up the definition of the lines in the remainder 
of my geo script. These duplicate points and lines are generated by 
Qhull/qvoronoi and am trying to avoid to write a script and remove them 
by hand myself.
At the end of my geo script I delete all points (gmsh removes only the 
unused points anyway), call "Coherence" to remove all duplicate 
geometric entities and generate a png snapshot (see attached examples).

The procedure outlined above works very well with both mesh generators, 
Tetgen and Netgen, up to 200 cells. When I try to generate 300 or more, 
gmsh unexpectedly aborts or I get segmentation violations.

Interestingly, gmsh usually throws a segmentation fault after meshing 
the last volume with Tetgen (Mesh.Algorithm3D=1) while it fails much 
earlier with Netgen (Mesh.Algorithm3D=4).

When I remove the commands after the last "Physical Volume" (deleting 
points, coherence command, printing) I get a simple "Abort" during 
meshing of the surfaces instead of the segmentation faults.

Now my questions:

What could cause these problems? The geometries do not get more 
"complicated" as I increase the number of Voronoi cells, I am just 
generating more cells (relatively simple extruded volumes). Thus, it is 
my suspicion that the problems are caused by gmsh itself rather than the 
meshers (Tetgen or Netgen).

Are there any fixed size internal arrays which could cause these 
segmentation violations due to overflow? If so I would be grateful for 
any hints where in the gmsh code they are defined, so I can increase the 
array sizes.

Or are these problems indeed caused by the meshers, which might have 
similar array overflow problems?

I am using Gmsh 2.0.8

gmsh-2.0.8-Linux.tgz
precompiled Linux (Intel, glibc 2.3) binary from Gmsh website

and also a gmsh version without GUI compiled from gmsh-2.0.8-source.tgz with

gcc (GCC) 4.2.3 20071014 (prerelease) (Debian 4.2.2-3)

./configure --disable-gui
(including Tetgen)

on Debian testing (lenny/sid).

Both binaries throw the same errors.


Any helpful comments or suggestions are greatly appreciated.


Thanks and kind regards,

Werner Scholz




Description of attachments and error messages:

media_o01.geo (this example works fine)
-------------
298 volumes

works with both Tetgen and Netgen:
Mesh.Algorithm3D=4;
Mesh.Algorithm3D=1;

media_p01.geo (this example causes seg. faults)
-------------
580 volumes

Mesh.Algorithm3D=1;

gmsh media_p01.geo  -3

Info    : Meshing volume 580 (Delaunay)
Fatal   : Segmentation violation (invalid memory reference)

Mesh.Algorithm3D=4;

gmsh media_p01.geo  -3

Info    : Meshing volume 59 (Netgen)
Fatal   : Segmentation violation (invalid memory reference)

media_p04.geo (not attached)
-------------
deleting of points, coherence command, printing removed at the end

Mesh.Algorithm3D=1;

gmsh media_p04.geo  -3

Info    : Meshing surface 236 (Plane, MeshAdapt+Delaunay)
Info    : Meshing surface 237 (Plane, MeshAdapt+Delaunay)
Info    : Meshing surface 1428 (Ruled surface, MeshAdapt+Delaunay)
Aborted

Mesh.Algorithm3D=4;

gmsh media_p04.geo  -3

Info    : Meshing surface 236 (Plane, MeshAdapt+Delaunay)
Info    : Meshing surface 237 (Plane, MeshAdapt+Delaunay)
Info    : Meshing surface 1428 (Ruled surface, MeshAdapt+Delaunay)
Aborted

-- 
magpar - Parallel Finite Element Micromagnetics Package
WWW:    http://magnet.atp.tuwien.ac.at/scholz/magpar/
email:  magpar at magnet.atp.tuwien.ac.at
list:   majordomo at magnet.atp.tuwien.ac.at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: media_o01.geo.gz
Type: application/x-tar
Size: 19072 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20071029/c415f2c1/attachment.gz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: media_p01.geo.gz
Type: application/x-tar
Size: 34231 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20071029/c415f2c1/attachment-0001.gz>