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

Foam 13 How can one run solver in debugger

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 7, 2006, 18:25
Default I would like to ask how can i
  #1
atzaru
Guest
 
Posts: n/a
I would like to ask how can i debug simpleFoam solver in ddd. I understand that i need to recompile the code. What i need to changde and where?

Thank u very much

Atzaru
  Reply With Quote

Old   April 8, 2006, 07:04
Default Look in .OpenFOAM-1.3/bashrc,
  #2
New Member
 
Max
Join Date: Mar 2009
Posts: 24
Rep Power: 17
didomenico is on a distinguished road
Look in .OpenFOAM-1.3/bashrc, you have to comment out the following option:

export WM_COMPILE_OPTION=Debug

and re-source the file. After that, go to OpenFOAM-1.3 and run

./Allwmake

that's all...
Remember I will have both the optimized and debug versions installed and you can switch between them with that flag.
didomenico is offline   Reply With Quote

Old   April 8, 2006, 08:21
Default It might be easier to only com
  #3
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
It might be easier to only compile (a copy of) the conflicting command (unless your bug is in one of the libraries). Search on this forum for FULLDEBUG.
mattijs is offline   Reply With Quote

Old   April 11, 2006, 03:07
Default Hi thanks a lot for the tip
  #4
atzaru
Guest
 
Posts: n/a
Hi

thanks a lot for the tips

I compiled the code with
export WM_COMPILE_OPTION=Debug activated and i obtain the following type of errors:

bin/linuxGcc4DPProf/setFields
/usr/bin/ld: cannot find -lOpenFOAM
collect2: ld returned 1 exit status
make: *** [/home/gda/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPProf/setFields] Error 1
+ wmake mapFields


/usr/bin/ld: cannot find -lOpenFOAM
collect2: ld returned 1 exit status
make: *** [/home/gda/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPProf/foamInfoExec] Error 1
gda@tzapuu:~/OpenFOAM/OpenFOAM- 1.3$


Does anybody know how i can fix it?

thanks
  Reply With Quote

Old   April 11, 2006, 05:22
Default You don't have the debug versi
  #5
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
You don't have the debug version of the library compiled. If you follow Massimilianos steps so recompile everything you will end up with a whole set of debug libraries.

E.g. where my libOpenFOAM is now in
.../linuxGcc4DPOpt/libOpenFOAM.so

it will then be in something like
.../linuxGcc4DPDEBUG/libOpenFOAM.so

With you it actually looks like your binaries end up in 'linuxGcc4DPProf/' but anyway you don't seem to have libraries in the corresponding library directories ($FOAM_LIBBIN).

(you could always try the local compilation option in my post above)
mattijs is offline   Reply With Quote

Old   October 17, 2007, 06:12
Default Hej, I am trying to debu
  #6
mss
Guest
 
Posts: n/a
Hej,


I am trying to debug my own solver in OpenFoam. For this I added a line in
the Make/options:
------------------------------------------------
EXE_INC =\
-DFULLDEBUG -g O0
------------------------------------------------

and I used the comand line : gdb <name_solver> <case_name>
But It seems to be be something wrong in this line.

Could someone give some instructions on how to use interactive debugger in
openFoam step by step for person who is new in this area?

Thank you in advance,
Rita
  Reply With Quote

Old   June 10, 2008, 03:13
Default Hi I am a beginer with OpenFO
  #7
New Member
 
marevaz
Join Date: Mar 2009
Location: Tehran, Tehran, IRAN
Posts: 1
Rep Power: 0
marevaz is on a distinguished road
Hi
I am a beginer with OpenFOAM.
Can i trace a solver line by line in debug mode?
if yes, how can i do that?
Thank You.
marevaz is offline   Reply With Quote

Old   July 6, 2009, 11:45
Default
  #8
New Member
 
karlvirgil's Avatar
 
Join Date: Jul 2009
Location: Wrentham, MA
Posts: 9
Rep Power: 16
karlvirgil is on a distinguished road
Quote:
Originally Posted by marevaz View Post
Hi
I am a beginer with OpenFOAM.
Can i trace a solver line by line in debug mode?
if yes, how can i do that?
Thank You.
Yes you can. All you need to do is recompile OpenFOAM with the debug option turned on (see etc/bashrc file in OpenFOAM installation). Then, launch application in gdb and step through the code
karlvirgil 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
Sonic foam solver for a subsonic problem chable OpenFOAM Running, Solving & CFD 2 August 15, 2016 10:11
Simple foam solver mardinoglu OpenFOAM Running, Solving & CFD 1 October 17, 2014 04:56
FEM solver in FOAM Hrvoje Jasak (Hjasak) OpenFOAM 2 March 31, 2013 12:52
debugger with STAR CD V4 Jaishree Siemens 1 December 2, 2007 14:40
First steps w moving mesh FOAM FATAL ERROR solver table is empty tehache OpenFOAM Running, Solving & CFD 2 May 14, 2007 04:59


All times are GMT -4. The time now is 21:22.