[Gmsh] cgns & hdf5 issues

Maxim Loginov loginov at itam.nsc.ru
Sat Mar 22 09:57:45 CET 2008


Hi all

there are 2 issues I'd like to report

1. it seems to be a bug in configure for cgns check:
if cgns is built with hdf5 backend for data storage, it needs -lhdf5 link
flag to work correctly, currently as workaround I made a crude fix in 
configure:

sed -i 's/LIBS="-lcgns \(.*\)/LIBS="-lcgns -lhdf5 \1/' configure

but IMHO configure should check the cgns dependency on hdf5 by itself 
(unfortunately my autotool skills are not good enough to make an appropriate 
patch). 

2. with above fix configure finds cgns installation and has no problem to 
build with cgnslib, but write in cgns format is failed:

~/tutorial$ gmsh -2 -o t6.cgns -format cgns t6.geo
Info    : Increasing process stack size (8192 kB < 16 MB)
Info    : 'gmsh -2 -o t6.cgns -format cgns t6.geo ' started on Sat Mar 22
13:58:13 2008
Info    : Reading 't6.geo'
Info    : Reading 't1.geo'
Info    : Read 't1.geo'
Info    : Read 't6.geo'
Info    : Meshing 1D...
Info    : Meshing curve 1 (Line)
Info    : Meshing curve 2 (Line)
Info    : Meshing curve 3 (Line)
Info    : Meshing curve 4 (Line)
Info    : Mesh 1D complete (0.006999 s)
Info    : Mesh
Info    : Meshing 2D...
Info    : Meshing surface 6 (transfinite)
Info    : Mesh 2D complete (0.005 s)
Info    : Mesh
Info    : 600 vertices 647 elements
Info    : Writing 't6.cgns'
Working on zone 1  100
*** glibc detected *** gmsh: free(): invalid next size (fast): 0x083b31a0 ***
======= Backtrace: =========
/lib/libc.so.6[0xb7682a00]
/lib/libc.so.6(cfree+0x89)[0xb76846f9]
/usr/lib/libhdf5.so.0(H5MM_xfree+0x1f)[0xb78dec1f]
======= Memory map: ========
08048000-08262000 r-xp 00000000 08:05 5964802    /usr/bin/gmsh
08262000-08263000 r--p 00219000 08:05 5964802    /usr/bin/gmsh
08263000-08270000 rw-p 0021a000 08:05 5964802    /usr/bin/gmsh
08270000-083b8000 rw-p 08270000 00:00 0          [heap]
...

I have no clue if it is related to cgnslibs, hdf5 or gmsh (though I can 
read-write cgns files in other programs). Could you please check it.

best 
Maxim Loginov