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

[Gmsh] segmentation fault in openfoam when importing geomentry from gmsh

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 28, 2020, 22:47
Default segmentation fault in openfoam when importing geomentry from gmsh
  #1
New Member
 
CH VINOD KUMAR REDDY
Join Date: Oct 2020
Posts: 16
Rep Power: 3
vinod956 is on a distinguished road
hello friends,
I am new to openfoam. I created a 120 degrees cylinder and used 3D mesh in gmsh. I applied wall and cyclic boundary conditions to the cylinder in physical groups. When I am trying to import the geomentry into openfoam using command gmshToFoam , this is how it is showing

#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigSegv::sigHandler(int) at ??:?
#2 ? in /lib/x86_64-linux-gnu/libpthread.so.0
#3 ? at ??:?
#4 __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#5 ? at ??:?
Segmentation fault (core dumped)

Can u please help me in solving my issue.
vinod956 is offline   Reply With Quote

Old   October 30, 2020, 08:34
Default
  #2
RGS
Member
 
Rohit George Sebastian
Join Date: May 2017
Posts: 41
Rep Power: 7
RGS is on a distinguished road
Quote:
Originally Posted by vinod956 View Post
hello friends,
I am new to openfoam. I created a 120 degrees cylinder and used 3D mesh in gmsh. I applied wall and cyclic boundary conditions to the cylinder in physical groups. When I am trying to import the geomentry into openfoam using command gmshToFoam , this is how it is showing

#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigSegv::sigHandler(int) at ??:?
#2 ? in /lib/x86_64-linux-gnu/libpthread.so.0
#3 ? at ??:?
#4 __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#5 ? at ??:?
Segmentation fault (core dumped)

Can u please help me in solving my issue.

Did you export the mesh in ASCII 2 format? gmshToFoam only supports ASCII 2, but Gmsh exports to ASCII 4 by default.
RGS is offline   Reply With Quote

Old   October 31, 2020, 00:18
Default
  #3
New Member
 
CH VINOD KUMAR REDDY
Join Date: Oct 2020
Posts: 16
Rep Power: 3
vinod956 is on a distinguished road
I changed to ASCII 2 .Even then the same thing is shown.
vinod956 is offline   Reply With Quote

Old   November 1, 2020, 07:43
Default
  #4
RGS
Member
 
Rohit George Sebastian
Join Date: May 2017
Posts: 41
Rep Power: 7
RGS is on a distinguished road
Quote:
Originally Posted by vinod956 View Post
I changed to ASCII 2 .Even then the same thing is shown.

Just to be sure that I am understanding the issue, you get this error from gmshToFoam, not when you try to run the simulation? gmshToFoam isn't able to convert the msh file to an OpenFOAM mesh?
RGS is offline   Reply With Quote

Old   November 1, 2020, 08:20
Default
  #5
New Member
 
CH VINOD KUMAR REDDY
Join Date: Oct 2020
Posts: 16
Rep Power: 3
vinod956 is on a distinguished road
Yes, I got this error after creating geomentry in gmsh then importing into openfoam using command gmshToFoam .
vinod956 is offline   Reply With Quote

Old   November 1, 2020, 09:17
Default
  #6
RGS
Member
 
Rohit George Sebastian
Join Date: May 2017
Posts: 41
Rep Power: 7
RGS is on a distinguished road
Quote:
Originally Posted by vinod956 View Post
Yes, I got this error after creating geomentry in gmsh then importing into openfoam using command gmshToFoam .

Can you please post the entire terminal log?
RGS is offline   Reply With Quote

Old   November 8, 2020, 00:05
Default
  #7
New Member
 
CH VINOD KUMAR REDDY
Join Date: Oct 2020
Posts: 16
Rep Power: 3
vinod956 is on a distinguished road
chitti@LAPTOP-PE3G8S0K:~/OpenFOAM_files/rectangular$ gmshToFoam cylinder
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2006 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : _b45f8f6f58-20200629 OPENFOAM=2006
Arch : "LSB;label=32;scalar=64"
Exec : gmshToFoam cylinder
Date : Nov 08 2020
Time : 10:28:52
Host : LAPTOP-PE3G8S0K
PID : 471
I/O : uncollated
Case : /home/chitti/OpenFOAM_files/rectangular
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 5, maxFileModificationPolls 20)
allowSystemOperations : Allowing user-supplied system call operations

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


#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigSegv::sigHandler(int) at ??:?
#2 ? in /lib/x86_64-linux-gnu/libpthread.so.0
#3 ? at ??:?
#4 __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#5 ? at ??:?
Segmentation fault (core dumped)
vinod956 is offline   Reply With Quote

Old   November 9, 2020, 03:11
Default
  #8
RGS
Member
 
Rohit George Sebastian
Join Date: May 2017
Posts: 41
Rep Power: 7
RGS is on a distinguished road
Short answer: There is something wrong with your mesh file.


Long answer:

A segmentation fault (aka segfault) is a common condition that causes programs to crash. Segfaults are caused by a program trying to read or write an illegal memory location.


Program memory is divided into different segments: a text segment for program instructions, a data segment for variables and arrays defined at compile time, a stack segment for temporary (or automatic) variables defined in subroutines and functions, and a heap segment for variables allocated during runtime by functions.

A segfault occurs when a reference to a variable falls outside the segment where that variable resides, or when a write is attempted to a location that is in a read-only segment. In practice, segfaults are almost always due to trying to read or write a non-existent array element, not properly defining a pointer before using it, or (in C programs) accidentally using a variable's value as an address.

Source: https://kb.iu.edu/d/aqsj
RGS is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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.org] Paraview 5.4 in shell environment of5x - Segmentation fault (core dumped) dslbkxd OpenFOAM Installation 1 February 3, 2018 00:56
segmentation fault when installing OF-2.1.1 on a cluster Rebecca513 OpenFOAM Installation 9 July 31, 2012 15:06
gmshToFoam teminates on Segmentation fault XXLRay OpenFOAM 9 December 7, 2011 02:10
Segmentation fault in interFoam run through openMPI voingiappone OpenFOAM 16 November 2, 2011 06:49
Segmentation Fault Shawn_A OpenFOAM Running, Solving & CFD 6 October 31, 2011 14:38


All times are GMT -4. The time now is 13:07.