About Segmentation fault
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 |
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
|
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 |
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. |
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. |
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. |
It means a mathematically illegal operation has been done
|
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.
|
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 |
All times are GMT -4. The time now is 13:27. |