CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to compile OF-1.5 in the debug mode? (http://www.cfd-online.com/Forums/openfoam-solving/65601-how-compile-1-5-debug-mode.html)

sandy June 19, 2009 22:25

How to compile OF-1.5 in the debug mode?
 
Hi OpenFOAMers,

Who know how to compile OF-1.5 in the debug mode?

In OF-1.3, If I want a debug version of OpenFOAM, I just need to change the lines in $HOME/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc from

=============================
export WM_COMPILE_OPTION=Opt
# export WM_COMPILE_OPTION=Debug
# export WM_COMPILE_OPTION=Prof

to

# export WM_COMPILE_OPTION=Opt
exportWM_COMPILE_OPTION=Debug
# export WM_COMPILE_OPTION=Prof


=========================

However, how can still make it work in OF-1.5? In addition, what is its step by step procedures to debug the original codes under the debug version of OF-1.5?

Thanks:)
Sandy
sandy.lee37@gmail.com

karlvirgil July 6, 2009 11:08

vi ~/OpenFOAM/OpenFOAM-1.5.x/etc/bashrc

# WM_COMPILE_OPTION = Opt | Debug | Prof
: ${WM_COMPILE_OPTION:=Debug}; export WM_COMPILE_OPTION

sandy July 7, 2009 05:22

Quote:

Originally Posted by karlvirgil (Post 221623)
vi ~/OpenFOAM/OpenFOAM-1.5.x/etc/bashrc

# WM_COMPILE_OPTION = Opt | Debug | Prof
: ${WM_COMPILE_OPTION:=Debug}; export WM_COMPILE_OPTION

===========================

Hi sir, thank you a lot for your note. However, I remembered that I ever tried it but not work. Could you further tell me, after finish above setting, what is next step I should do step by step? :o Please don't mind, I just begin to study them.

karlvirgil July 7, 2009 11:51

Sandy,

Edit the bashrc file, then log out and log back in in order to reset the $WM_COMPILE_OPTION environment variable. Then navigate to the $FOAM_INST_DIR/OpenFOAM-1.5.x/ and run ./Allwmake
This will compile debug versions of the libraries and place them in the lib/linux64GccDPDebug/ directory.

sandy July 8, 2009 08:43

Thank you very much, sir :). I will try it step by step.


All times are GMT -4. The time now is 12:24.