|
[Sponsors] |
February 13, 2013, 01:40 |
About Segmentation fault
|
#1 | |
Member
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 13 |
Hi foamers,
I prepared a solver to fit for my needs. When i compiled, it is giving no errors. But it is giving the following error when i run my case file. Error Message: Quote:
Regards Mallikarjuna |
||
February 13, 2013, 03:54 |
|
#2 |
Senior Member
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18 |
Somewhere in your solver either a divide by zero or a minus in sqrt is happening, this usually happens by setting some physical values in a bad range or some typos (like wrong parenthesis) in solver
|
|
February 13, 2013, 04:26 |
|
#3 | ||||
Member
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 13 |
Quote:
Thanks very much for quick reply. In my solver due to mathematical operations using the Q tensor, i defined Q as the following: Quote:
for example in my code i did as the following: Lets assume a boundary named "upperWall" then Quote:
Quote:
I defined Q in the createFields.H directory and Q for the boundaries and internal fields inside the source code (in UEqn.H directory in my solver). I have doubt whether my approach is correct or not. Could you please tell me what the error message trying to convey. Thanks Mallikarjuna |
|||||
February 13, 2013, 05:08 |
|
#4 |
Senior Member
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18 |
I'm not sure what you're trying to do, so a comment about your solver would be somehow irrelevant. However I believe defining boundary conditions in the solver is not a good idea since you have to compile the whole solver with every change. That is not the idea behind openfoam, on the other hand you are not trying to write a solver to be included in openfoam distributions so it is not bad to first make it work and then putting some structure in it.
I suggest you to put some Info << in different lines of your solver to spot the line which is causing the break down, then you can scrutinize the line and spot the bug. |
|
February 13, 2013, 08:52 |
|
#5 |
Senior Member
Adhiraj
Join Date: Sep 2010
Location: Karnataka, India
Posts: 187
Rep Power: 15 |
The error seems to be a segmentation fault. This means that there is some memory issue.
I would compile the code in debug mode and use a tool like gdb to fix this. |
|
February 13, 2013, 16:05 |
|
#6 | |
Member
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 13 |
Quote:
Thanks very much for reply. Actually i am very fresher to openFoam. From your message i understood that i did message in debugging. i studied this error in http://openfoamwiki.net/index.php/Main_FAQ but i am not able to notify this error. from this i know my basics is very poor. But can you you please tell me what actually it refers to. |
||
February 14, 2013, 01:29 |
|
#7 |
Senior Member
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18 |
It means a mathematically illegal operation has been done
|
|
February 14, 2013, 04:43 |
|
#8 |
Senior Member
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16 |
No, the error message from the first post explicitly says segmentation fault. In my optinion probably illegal memory access due to wrong array indexing. Mathematically illegal operations (division by zero etc..) usually result in floating point exceptions. Consult Wikipedia for a a nice introduction to both error types.
|
|
February 14, 2013, 08:25 |
|
#9 |
Member
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 13 |
Hi cutter,
I studied about the error. For the full debug i need to set WM_COMPILE_OPTION=Debug in the bashrc. But in bashrc i am not able to edit that part. Even though it is showing "USER EDITABLE PART", but it is not editing. can you please tell me to solve this problem. Regards Mallikarjuna |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Segmentation fault when running dieselFoam or dieselEngineFoam in parallel | francesco | OpenFOAM Bugs | 4 | May 2, 2017 21:59 |
segmentation fault when installing OF-2.1.1 on a cluster | Rebecca513 | OpenFOAM Installation | 9 | July 31, 2012 15:06 |
Segmentation Fault | Shawn_A | OpenFOAM Running, Solving & CFD | 6 | October 31, 2011 14:38 |
forrtl: severe (174): SIGSEGV, segmentation fault occurred | therockyy | FLOW-3D | 7 | January 19, 2011 22:52 |
ParaView segmentation fault only for multiphase | gwierink | OpenFOAM | 9 | March 25, 2010 07:23 |