|
[Sponsors] |
July 4, 2009, 02:19 |
Debugging a segmentation fault?
|
#1 |
Senior Member
Steve Hansel
Join Date: Jun 2009
Location: Colorado, USA
Posts: 112
Rep Power: 17 |
I'm having a problem with at segmentation fault in turbDyMFoam. I'm attempting a rotating mesh and something about moving that mesh is causing the fault, with no error or warning message. I would like to gather more information on the cause of the fault.
I can fire up GDB and get the name of the routines it was in, but that's not very useful. I have 2 questions: 1) Is there an option to turbDyMFoam to give more debugging information? 2) Is there an easy way to compile in debug mode. I have developed unix (solaris) code, but I only used makefiles. These huge trees with wmakes and cmakes are strange to me. Is there a master options list somewhere? Thanks Steve |
|
July 6, 2009, 05:45 |
|
#2 |
Senior Member
Henrik Rusche
Join Date: Mar 2009
Location: Wernigerode, Sachsen-Anhalt, Germany
Posts: 281
Rep Power: 18 |
Dear Steve,
in $FOAM_SRC/../etc/cshrc you find Code:
# WM_COMPILE_OPTION = Opt | Debug | Prof if ( ! $?WM_COMPILE_OPTION ) setenv WM_COMPILE_OPTION Opt #if ( ! $?WM_COMPILE_OPTION ) setenv WM_COMPILE_OPTION Debug #setenv WM_COMPILE_OPTION Opt setenv WM_COMPILE_OPTION Debug This adds full debug information to your library and executables which you can use "gdb" OR "valgrind --tool=memcheck" on. I find the latter very useful for finding memory violations. Here are also a few links that I found quickly after googling "openfoam debugging". http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2008/debugging.pdf http://openfoamwiki.net/index.php/HowTo_debugging http://powerlab.fsb.hr/ped/kturbo/Op...ngTraining.pdf Good luck hunting Henrik |
|
July 6, 2009, 14:07 |
|
#3 |
Senior Member
Steve Hansel
Join Date: Jun 2009
Location: Colorado, USA
Posts: 112
Rep Power: 17 |
Thanks for the reply. I actually found my problem, but I will keep this information for the next one that comes up.
Steve |
|
July 31, 2010, 14:13 |
turbDyMFoam segmentation fault
|
#4 |
Member
Aldo Iannetti
Join Date: Feb 2010
Posts: 48
Rep Power: 16 |
[QUOTE=hansel;221636]Thanks for the reply. I actually found my problem, but I will keep this information for the next one that comes up.
Hi, can you please explane me problems about turbDyMFoam you had? I Think I have the same problem. Can you please give me some advice in order to set up ggi in turbDyMFoam cases? Thanks Aldo |
|
|
|
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 22:59 |
Segmentation fault when starting paraFoam | gaffu | OpenFOAM Installation | 16 | November 18, 2011 20:05 |
segmentation fault | usker | Siemens | 5 | March 6, 2007 00:14 |
KIVA and Segmentation Fault | Felix | Main CFD Forum | 2 | January 18, 2006 02:24 |
Fluent parallel: segmentation fault? | hp | FLUENT | 2 | September 6, 2001 15:18 |