[Gmsh] [gmsh]: Fail to use CGNS I/O

Christophe Geuzaine cgeuzaine at ulg.ac.be
Thu Nov 22 19:37:28 CET 2012

Hi Matthieu,

CGN I/O definitely needs to be rewritten... probably from scratch.

I'm looking for volunteers ;-)


On 22 Nov 2012, at 13:34, SOISMIER matthieu DSNA/CC <Matthieu.Soismier at onera.fr> wrote:

> Dear all,
> I have successfully compiled gmsh with the cgns output support. Now, I am trying to use it, but it is not working :
> $ gmsh case.geo -2 -o case.cgns -format cgns
> ...
> Info    : Done meshing 2D (0.543918 s)
> Info    : 30693 vertices 49134 elements
> Info    : Writing 'case.cgns'...
> Warning : CGNS I/O is at an "alpha" software stage
> Erreur de segmentation
> I run the commands 'gdb gmsh' and 'run case.geo -2 -o case.cgns -format cgns' to get the following trace :
> (gdb) backtrace
> #0  0x0000003e9c078900 in strlen () from /lib64/libc.so.6
> #1  0x00002aaaaad88905 in cg_zone_write () from /usr/local/cgns-3.1/lib/libcgns.so.3.1
> #2  0x00000000006d6b5f in int write_CGNS_zones<2u>(GModel&, int, int, CGNSOptions const&, double, int, std::map<int, std::vector<GEntity*, std::allocator<GEntity*> >, std::less<int>, std::allocator<std::pair<int const, std::vector<GEntity*, std::allocator<GEntity*> > > > > const&, int, int) ()
> #3  0x00000000006cd6bb in GModel::writeCGNS (this=0x14847f0, name=..., zoneDefinition=0, options=..., scalingFactor=1) at /home/msoismie/local/usr/gmsh-2.6.1-source/Geo/GModelIO_CGNS.cpp:1165
> #4  0x00000000005b9c48 in CreateOutputFile (fileName=..., format=32, redraw=true) at /home/msoismie/local/usr/gmsh-2.6.1-source/Common/CreateFile.cpp:275
> #5  0x0000000000572ff3 in GmshBatch () at /home/msoismie/local/usr/gmsh-2.6.1-source/Common/Gmsh.cpp:194
> #6  0x0000000000572733 in main (argc=7, argv=0x7fffffffd0a8) at /home/msoismie/local/usr/gmsh-2.6.1-source/Fltk/Main.cpp:34
> I looked into the source file /home/msoismie/local/usr/gmsh-2.6.1-source/Geo/GModelIO_CGNS.cpp in order to try to understand my mistake, but I did not find the case write_CGNS_zones<2u> (I have found only: write_CGNS_zones<2> and write_CGNS_zones<3>).
> After reading the warning telling that 'the CGNS I/O is at an alpha software stage', I understand that the CGNS I/O has to be used carefully. Do you have any idea or suggestion that could help to solve this problem and allow me to use the CGNS I/O ?
> Thank you in advance for your helpfull answers.
> Best regards,
> Matthieu Soismier
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh

Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 

More information about the gmsh mailing list