CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   Switching to debug mode? (

NJG February 16, 2013 16:31

Switching to debug mode?
Hello Folks,

I wish to switch to debug mode so I can figure out what is going on with a new solver I wrote and am running. In order to do this I went into my openfoam211/etc/bashrc file and changed the following: "export WM_COMPILE_OPTION=Debug". I then ran ./Allwmake to try and recompile, which failed.

I have two questions:

1) Do I need to make any other changes to activate the debug version?

2) If not by running ./Allwmake in the /opt/openfoam211 folder, how do I successfully recompile once I have made my debug changes?


wyldckat February 17, 2013 08:29

Greetings Nick,

My advice is that you undo the changes you've done in "/opt/openfoam211" and instead build OpenFOAM from source code on your home folder, instead of building in "/opt". This is to avoid accidental deletions while running things as root.

Additionally, there is an old post I wrote explaining how one can have the "Opt" version and the "Debug" version: - it's a bit dated, but it should still work for 2.1.1.

If by any chance you want to be stubborn ;):rolleyes: and continue only working with the code in "/opt/openfoam211", then keep in mind that "root" is also a user, which means that you have to edit root's "/root/.bashrc" file as well and add the sourcing/alias commands, for Allwmake to work as intended.

Best regards,

mxylondon March 4, 2013 09:25

I have the same trouble, it is killing me.

mxylondon March 4, 2013 10:13

I'm sorry, what means 'you have to edit root's "/root/.bashrc" file as well and add the sourcing/alias commands' please?

wyldckat March 4, 2013 19:08

Hi Xiangyin,

I'll answer you on your other thread:

Best regards,

All times are GMT -4. The time now is 07:05.