CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

gmshToFoam teminates on Segmentation fault

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 29, 2011, 08:33
Default gmshToFoam teminates on Segmentation fault
  #1
New Member
 
Join Date: Nov 2011
Posts: 14
Rep Power: 14
XXLRay is on a distinguished road
I created a .msh file with gmsh 2.4.2 on Ubuntu Linux. Now I want to convert it to OpenFoam201. I copied the mesh to the OpenFoam example folder $FOAM_RUN/tutorials/incompressible/icoFoam/cavity/ . There I executed "gmshToFoam ./Savonius_S2.geo.msh". It terminates on a Segmentation fault (I shortened some long output):
Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.0.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.0.1-51f1de99a4bc
Exec   : gmshToFoam ./Savonius_S2.geo.msh
Date   : Nov 29 2011
Host   : ubuntu
PID    : 8927
Case   : /home/hanke/OpenFOAM/hanke-2.0.1/run/tutorials/incompressible/icoFoam/Savonius
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Starting to read mesh format at line 2
Read format version 2.1  ascii 0

Starting to read points at line 5
Vertices to be read:175
Vertices read:175

Starting to read cells at line 183
Cells to be read:1333

Unhandled element 15 at line 185
...
Unhandled element 15 at line 209
Unhandled element 1 at line 210
...
Unhandled element 1 at line 305
Mapping region 0 to Foam patch 0
Mapping region 0 to Foam cellZone 0
Cells:
    total:876
    hex  :0
    prism:0
    pyr  :0
    tet  :876

CellZones:
Zone    Size
    0    876

Skipping tag  at line 1519
Patch 0 gets name patch0

Finding faces of patch 0
--> FOAM Warning : Not using gmsh face 3(27 25 7) since zero vertex is not on boundary of polyMesh
...
--> FOAM Warning : Not using gmsh face 3(22 35 38) since zero vertex is not on boundary of polyMesh

FaceZones:
Zone    Size
    0    336

Writing zone 0 to cellZone cellZone_0 and cellSet
Writing zone 0 to faceZone faceZone_0 and faceSet
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam201/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigSegv::sigHandler(int) in "/opt/openfoam201/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2  Uninterpreted: 
#3  
 in "/opt/openfoam201/platforms/linuxGccDPOpt/bin/gmshToFoam"
#4  __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#5  
 in "/opt/openfoam201/platforms/linuxGccDPOpt/bin/gmshToFoam"
Segmentation fault
I guess that something is wrong with my mesh. I attached the file and would be glad if you could have a look at it.
Attached Files
File Type: zip Savonius_S2.geo.msh.zip (11.8 KB, 6 views)
XXLRay is offline   Reply With Quote

Old   November 30, 2011, 02:50
Default
  #2
Super Moderator
 
-mAx-'s Avatar
 
Maxime Perelli
Join Date: Mar 2009
Location: Switzerland
Posts: 3,297
Rep Power: 41
-mAx- will become famous soon enough
you are not in the right forum >>>> http://www.cfd-online.com/Forums/ope...meshing-other/

With which software did you create your .msh file?
__________________
In memory of my friend Hervé: CFD engineer & freerider
-mAx- is offline   Reply With Quote

Old   November 30, 2011, 04:22
Default
  #3
New Member
 
Join Date: Nov 2011
Posts: 14
Rep Power: 14
XXLRay is on a distinguished road
As stated out in the first post I created the mesh with gmsh 2.4.2.

Perhaps one of the admins could be so kind to move this thread to the correct location?
XXLRay is offline   Reply With Quote

Old   December 2, 2011, 03:02
Default
  #4
New Member
 
Join Date: Nov 2011
Posts: 14
Rep Power: 14
XXLRay is on a distinguished road
Can anybody confirm that the mesh itself and not my installation of OpenFOAM causes the fault?
XXLRay is offline   Reply With Quote

Old   December 2, 2011, 03:47
Default
  #5
New Member
 
Join Date: Nov 2011
Posts: 14
Rep Power: 14
XXLRay is on a distinguished road
In http://www.cfd-online.com/Forums/ope...ion-error.html a similar problem has been described. It seems as if it could be solved by removing the "gmsh label". Unfortunately I have not idea what this means. Anyone else?
XXLRay is offline   Reply With Quote

Old   December 3, 2011, 04:25
Default
  #6
New Member
 
Join Date: Nov 2011
Posts: 14
Rep Power: 14
XXLRay is on a distinguished road
I tried a mesh from an new smaller and simpler geometry (attached to this post). The output of the mesh conversion is now:

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.0.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.0.1-51f1de99a4bc
Exec   : gmshToFoam Cylinder.msh
Date   : Dec 03 2011
Time   : 10:07:35
Host   : ubuntu
PID    : 2222
Case   : /home/hanke/OpenFOAM/hanke-2.0.1/run/tutorials/incompressible/icoFoam/Cylinder
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Starting to read mesh format at line 2
Read format version 2.1  ascii 0

Starting to read points at line 5
Vertices to be read:1232
Vertices read:1232

Starting to read cells at line 1240
Cells to be read:6835

Unhandled element 15 at line 1242
...
Unhandled element 1 at line 1367
Mapping region 0 to Foam patch 0
Mapping region 0 to Foam cellZone 0
Cells:
    total:5303
    hex  :0
    prism:0
    pyr  :0
    tet  :5303

CellZones:
Zone    Size
    0    5303

Skipping tag  at line 8078
Patch 0 gets name patch0

--> FOAM Warning : 
    From function polyMesh::polyMesh(... construct from shapes...)
    in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 614
    Found 1406 undefined faces in mesh; adding to default patch.
Finding faces of patch 0

FaceZones:
Zone    Size

Writing zone 0 to cellZone cellZone_0 and cellSet
End
Is this what I should expect?
Are the unhandled elements bad?
Does the conversion work now because the geometry is smaller or simpler (I used a copy of the incompressible/icofoam/cavity example as starting point)?
Which tutorial should I copy to convert the mesh from my initial Post?

When I directly launch "icoFoam" after conversion, I get the following error message:
Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.0.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.0.1-51f1de99a4bc
Exec   : icoFoam
Date   : Dec 03 2011
Time   : 10:19:02
Host   : ubuntu
PID    : 2642
Case   : /home/.../run/tutorials/incompressible/icoFoam/Cylinder
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading transportProperties

Reading field p



--> FOAM FATAL IO ERROR: 
keyword patch0 is undefined in dictionary "/home/.../run/tutorials/incompressible/icoFoam/Cylinder/0/p::boundaryField"

file: /home/.../run/tutorials/incompressible/icoFoam/Cylinder/0/p::boundaryField from line 25 to line 35.

    From function dictionary::subDict(const word& keyword) const
    in file db/dictionary/dictionary.C at line 461.

FOAM exiting
I get the same error message when I try to look at the mesh in paraFoam.

Is there something else I have to do before launching "icoFoam"?
Does the cavity tutorial simply not fit to my mesh?
Attached Files
File Type: zip Cylinder.zip (81.2 KB, 6 views)

Last edited by XXLRay; December 3, 2011 at 11:41.
XXLRay is offline   Reply With Quote

Old   December 5, 2011, 03:21
Default
  #7
New Member
 
Join Date: Nov 2011
Posts: 14
Rep Power: 14
XXLRay is on a distinguished road
Do you need any more information to help me? Just ask and I will provide it.

I expect it to be an effort of a few minutes for someone experienced to try my mesh. Finding a solution on my own yet took me weeks and will take me months. Any help is really appreciated.
XXLRay is offline   Reply With Quote

Old   December 6, 2011, 03:45
Default
  #8
New Member
 
Join Date: Nov 2011
Posts: 14
Rep Power: 14
XXLRay is on a distinguished road
Is anybody out there?
XXLRay is offline   Reply With Quote

Old   December 6, 2011, 09:36
Default
  #9
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings XXLRay,

I personally don't have time to test the mesh, but this should be self explanatory in one of your latter posts:
Code:
keyword patch0 is undefined in dictionary "/home/.../run/tutorials/incompressible/icoFoam/Cylinder/0/p::boundaryField"
Basically your new mesh has patch names different from the patches defined in the original tutorial case. You'll need to see the file "constant/polyMesh/boundary" to see the list of patches your new mesh has, then edit all variable files in the folder "0".

I suggest that you review the first tutorial (or even all 3 tutorials) on the User Guide to remember about boundaries and patches: http://www.openfoam.com/docs/user/cavity.php#x5-40002.1

As for «removing the "gmsh label"», the ".gmsh" files can sometimes be in text format, so editing the mesh ".gmsh" file with a text editor might be the way to go!

Best regards and good luck!
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   December 7, 2011, 02:10
Default
  #10
New Member
 
Join Date: Nov 2011
Posts: 14
Rep Power: 14
XXLRay is on a distinguished road
Thanks a lot. I will try that.
XXLRay is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM] Paraview - Segmentation fault grjmell ParaView 5 January 9, 2024 13:14
Segmentation fault when running dieselFoam or dieselEngineFoam in parallel francesco OpenFOAM Bugs 4 May 2, 2017 21:59
Segmentation Fault Shawn_A OpenFOAM Running, Solving & CFD 6 October 31, 2011 14:38
ParaView segmentation fault only for multiphase gwierink OpenFOAM 9 March 25, 2010 07:23


All times are GMT -4. The time now is 00:59.