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

Debug version of OpenFOAM-1.6

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 2, 2010, 11:47
Default Debug version of OpenFOAM-1.6
  #1
Member
 
yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 64
Rep Power: 16
alundilong is on a distinguished road
Opt version of OpenFOAM-1.6 installation is pretty easy.
However,
Debug version is not easy although I have install strictly follow those instructions.

1. cd ~
vim .bashrc
add at the end,
export WM_COMPILE=Debug
. /$HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc
2. cd $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc
vim bashrc
Modify WM_COMPILE=Opt into WM_COMPILE=Debug
3. logout current host, e.g su root,
then relogin again.
4. cd /$HOME/OpenFOAM/OpenFOAM-1.6/
./Allwmake

There do have an additional files named as linuxGccDPDebug after compilation, but with no executalbe files such as icoFoam.

How to solve this problem?
alundilong is offline   Reply With Quote

Old   May 2, 2010, 13:28
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Edward and welcome to the forum,

OK, I propose that you follow the next steps for the environment set-up:
  1. Edit the file "$HOME/.bashrc" (it's the same as "~/.bashrc") and remove the line that says "export WM_COMPILE=Debug".
  2. Then change the line:
    Code:
    . /$HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc
    to
    Code:
    alias startFoam='. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc'
  3. Then add the line:
    Code:
    alias startFoamDebug='. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc_debug'
  4. Save and close the .bashrc file.
  5. Now make a copy of OpenFOAM's the file bashrc to bashrc_debug, like so:
    Code:
    cp $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc_debug
  6. Now edit the file "$HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc_debug" and go to the line that says:
    Code:
    : ${WM_COMPILE_OPTION:=Opt}; export WM_COMPILE_OPTION
    and change it to
    Code:
    : ${WM_COMPILE_OPTION:=Debug}; export WM_COMPILE_OPTION
  7. Save and close the bashrc_debug file.
  8. Start a new terminal. Now, for starting the OpenFOAM's Opt environment, run:
    Code:
    startFoam
    For starting the Debug environment, run:
    Code:
    startFoamDebug
This way, you can activate the desired environment on each new terminal! Don't forget to run either one of these commands after you start a new terminal, since without them you won't be able to use either version of OpenFOAM

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   May 5, 2010, 06:52
Default
  #3
Member
 
yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 64
Rep Power: 16
alundilong is on a distinguished road
Thank you for your detailed instructons! I will follow it and return back my response.
alundilong is offline   Reply With Quote

Old   May 5, 2010, 07:20
Default
  #4
Member
 
yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 64
Rep Power: 16
alundilong is on a distinguished road
Thank you for your detailed solution, I need to make sure that whether I should compile it again before I follow your instrution?

Quote:
Originally Posted by wyldckat View Post
Greetings Edward and welcome to the forum,

OK, I propose that you follow the next steps for the environment set-up:
  1. Edit the file "$HOME/.bashrc" (it's the same as "~/.bashrc") and remove the line that says "export WM_COMPILE=Debug".
  2. Then change the line:
    Code:
    . /$HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc
    to
    Code:
    alias startFoam='. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc'
  3. Then add the line:
    Code:
    alias startFoamDebug='. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc_debug'
  4. Save and close the .bashrc file.
  5. Now make a copy of OpenFOAM's the file bashrc to bashrc_debug, like so:
    Code:
    cp $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc_debug
  6. Now edit the file "$HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc_debug" and go to the line that says:
    Code:
    : ${WM_COMPILE_OPTION:=Opt}; export WM_COMPILE_OPTION
    and change it to
    Code:
    : ${WM_COMPILE_OPTION:=Debug}; export WM_COMPILE_OPTION
  7. Save and close the bashrc_debug file.
  8. Start a new terminal. Now, for starting the OpenFOAM's Opt environment, run:
    Code:
    startFoam
    For starting the Debug environment, run:
    Code:
    startFoamDebug
This way, you can activate the desired environment on each new terminal! Don't forget to run either one of these commands after you start a new terminal, since without them you won't be able to use either version of OpenFOAM

Best regards,
Bruno
alundilong is offline   Reply With Quote

Old   May 5, 2010, 08:26
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hello Edward,

You'll only need to do a full build of the debug version, since I think you already have the Opt version fully built!

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   May 5, 2010, 10:11
Default
  #6
Member
 
yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 64
Rep Power: 16
alundilong is on a distinguished road
I do have an Opt version of OpenFOAM-1.6.It is easy to install and compile. And really appreciate your help.
Currently, debug version is under compling! I think I will make it this time. Because all the error are missing now.
alundilong is offline   Reply With Quote

Old   May 7, 2010, 02:37
Default
  #7
Member
 
yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 64
Rep Power: 16
alundilong is on a distinguished road
Hi it does work now!
It seems that I have to log in the Linux system with the right host as the terminal is.
In fact, I relogin into the system with root in KDE, and login into terminal with root too. Then every thing goes smoothly. I think I need to learn more about the operation authoration of the system.
alundilong is offline   Reply With Quote

Old   June 23, 2010, 08:52
Default error when building in debug mode
  #8
New Member
 
Gaurav
Join Date: Jun 2010
Location: Bangalore, India
Posts: 12
Rep Power: 16
PaGgiE is on a distinguished road
Hi,
When I build openFoam in Debug mode as instructions provided above, After some time, I am getting the following error:

Code:
/bin/sh: flex: not found
mv: cannot stat `lex.yy.cc': No such file or directory
g++: Make/linuxGccDPOpt/ansysToFoam.C: No such file or directory
g++: no input files
make[3]: *** [Make/linuxGccDPOpt/ansysToFoam.o] Error 1
make[3]: Target `/home/gaurav/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/ansysToFoam' not remade because of errors.
make[2]: *** [ansysToFoam] Error 2
/bin/sh: flex: not found
mv: cannot stat `lex.yy.cc': No such file or directory
g++: Make/linuxGccDPOpt/fluent3DMeshToFoam.C: No such file or directory
g++: no input files
make[3]: *** [Make/linuxGccDPOpt/fluent3DMeshToFoam.o] Error 1
make[3]: Target `/home/gaurav/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/fluent3DMeshToFoam' not remade because of errors.
make[2]: *** [fluent3DMeshToFoam] Error 2
/bin/sh: flex: not found
mv: cannot stat `lex.yy.cc': No such file or directory
g++: Make/linuxGccDPOpt/fluentMeshToFoam.C: No such file or directory
g++: no input files
make[3]: *** [Make/linuxGccDPOpt/fluentMeshToFoam.o] Error 1
make[3]: Target `/home/gaurav/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/fluentMeshToFoam' not remade because of errors.
make[2]: *** [fluentMeshToFoam] Error 2
/bin/sh: flex: not found
mv: cannot stat `lex.yy.cc': No such file or directory
g++: Make/linuxGccDPOpt/gambitToFoam.C: No such file or directory
g++: no input files
make[3]: *** [Make/linuxGccDPOpt/gambitToFoam.o] Error 1
make[3]: Target `/home/gaurav/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/gambitToFoam' not remade because of errors.
make[2]: *** [gambitToFoam] Error 2
make[2]: Target `application' not remade because of errors.
make[1]: *** [conversion] Error 2
+ wmake libso extrudeModel
+ wmake
make[1]: Target `application' not remade because of errors.
make: *** [mesh] Error 2
+ [ -d /home/gaurav/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/platforms/linuxGcc -a -r /home/gaurav/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/platforms/linuxGcc ]
+ wmake libso vtkPV3Foam
+ cd PV3FoamReader
+ mkdir -p Make/linuxGccDPOpt
+ cd Make/linuxGccDPOpt
+ cmake ../..
+ make
make[5]: *** No rule to make target `/usr/lib/libgthread-2.0.so', needed by `/home/gaurav/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libPV3FoamReader.so'.
make[5]: *** No rule to make target `/usr/lib/libglib-2.0.so', needed by `/home/gaurav/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libPV3FoamReader.so'.
make[5]: Target `CMakeFiles/PV3FoamReader.dir/build' not remade because of errors.
make[4]: *** [CMakeFiles/PV3FoamReader.dir/all] Error 2
make[5]: *** No rule to make target `/usr/lib/libgthread-2.0.so', needed by `/home/gaurav/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libPV3FoamReader_SM.so'.
make[5]: *** No rule to make target `/usr/lib/libglib-2.0.so', needed by `/home/gaurav/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libPV3FoamReader_SM.so'.
make[5]: Target `CMakeFiles/PV3FoamReader_SM.dir/build' not remade because of errors.
make[4]: *** [CMakeFiles/PV3FoamReader_SM.dir/all] Error 2
make[4]: Target `all' not remade because of errors.
make[3]: *** [all] Error 2
make[3]: Target `default_target' not remade because of errors.
make[2]: *** [PV3FoamReader] Error 2
+ [ -d /home/gaurav/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/platforms/linuxGcc -a -r /home/gaurav/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/platforms/linuxGcc ]
make[2]: Target `application' not remade because of errors.
make[1]: *** [graphics] Error 2
make[1]: Target `application' not remade because of errors.
make: *** [postProcessing] Error 2
In file included from chemkinToFoam.C:31:
/home/gaurav/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/reactionThermo/lnInclude/chemkinReader.H:52:23: error: FlexLexer.h: No such file or directory
In file included from chemkinToFoam.C:31:
/home/gaurav/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/reactionThermo/lnInclude/chemkinReader.H:67: error: expected class-name before ‘{’ token
make[2]: *** [Make/linuxGccDPOpt/chemkinToFoam.o] Error 1
make[2]: Target `/home/gaurav/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/chemkinToFoam' not remade because of errors.
make[1]: *** [chemkinToFoam] Error 2
make[1]: Target `application' not remade because of errors.
make: *** [thermophysical] Error 2
make: Target `application' not remade because of errors.
+ [  = doc ]
Does anyone know how to correct it?

Regards,
Gaurav
PaGgiE is offline   Reply With Quote

Old   June 23, 2010, 08:59
Default
  #9
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Gaurav,

Quote:
Originally Posted by PaGgiE
Code:
/bin/sh: flex: not found
You have to install flex! I assume that you are using the pre-built binaries of OpenFOAM, because building the optimized version also needs flex to work.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   June 23, 2010, 09:17
Default
  #10
New Member
 
Gaurav
Join Date: Jun 2010
Location: Bangalore, India
Posts: 12
Rep Power: 16
PaGgiE is on a distinguished road
Thank you for your quick reply Bruno.
I have installed flex, but another error, which was there in my previously mentioned code, is still there

make[5]: *** No rule to make target `/usr/lib/libgthread-2.0.so', needed by `/home/gaurav/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libPV3FoamReader.so'.
make[5]: *** No rule to make target `/usr/lib/libglib-2.0.so', needed by `/home/gaurav/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libPV3FoamReader.so'.
make[5]: Target `CMakeFiles/PV3FoamReader.dir/build' not remade because of errors.
make[4]: *** [CMakeFiles/PV3FoamReader.dir/all] Error 2
make[5]: *** No rule to make target `/usr/lib/libgthread-2.0.so', needed by `/home/gaurav/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libPV3FoamReader_SM.so'.
make[5]: *** No rule to make target `/usr/lib/libglib-2.0.so', needed by `/home/gaurav/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libPV3FoamReader_SM.so'.
make[5]: Target `CMakeFiles/PV3FoamReader_SM.dir/build' not remade because of errors.
make[4]: *** [CMakeFiles/PV3FoamReader_SM.dir/all] Error 2
make[4]: Target `all' not remade because of errors.
make[3]: *** [all] Error 2
make[3]: Target `default_target' not remade because of errors.
make[2]: *** [PV3FoamReader] Error 2
+ [ -d /home/gaurav/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/platforms/linuxGcc -a -r /home/gaurav/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/platforms/linuxGcc ]
make[2]: Target `application' not remade because of errors.
make[1]: *** [graphics] Error 2
make[1]: Target `application' not remade because of errors.
make: *** [postProcessing] Error 2
make: Target `application' not remade because of errors.
+ [ = doc ]


I've checked, a file named 'libgthread-2.0.so.0' is there but 'libgthread-2.0.so' is not there.
Can you suggest anything about this?

Regards,
Gaurav
PaGgiE is offline   Reply With Quote

Old   June 23, 2010, 09:32
Default
  #11
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Gaurav,

Are the libraries "libPV3FoamReader.so" and "libPV3FoamReader_SM.so" the only ones that didn't build? If so, no need to worry since you can (and I think you should) use the optimized version of OpenFOAM for opening the case files in ParaView, using paraFoam. I believe I posted instructions above on how to have both environments up and running in separate terminals.


As for the "no rule" issue, it doesn't look a very good error message, because that seems to indicate that it's unable to build "libgthread-2.0.so" itself... which there shouldn't even be a specific step for it... must be a glitch in the make textual system.
Anyway, a usual trick for these scenarios in which there are various library version named files, is to do symbolic links:
Code:
ln -s /usr/lib/libgthread-2.0.so.0 /usr/lib/libgthread-2.0.so
ln -s /usr/lib/libglib-2.0.so.0 /usr/lib/libglib-2.0.so
These two commands have to be executed in root/superuser mode.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   June 23, 2010, 10:44
Default
  #12
New Member
 
Gaurav
Join Date: Jun 2010
Location: Bangalore, India
Posts: 12
Rep Power: 16
PaGgiE is on a distinguished road
Hi Bruno,

Thanks again for the reply. That issue is resolved. Sorry to bother you again but now I am getting other errors as well and I am not able to find anything on google regarding this:

+ decompositionMethods/Allwmake
+ wmake libso decompositionMethods
/usr/bin/ld: cannot find -lscotch
collect2: ld returned 1 exit status
make: *** [/home/gaurav/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPDebug/libdecompositionMethods.so] Error 1
+ [ -d /home/gaurav/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPDebug/openmpi-1.3.3 ]
+ WM_OPTIONS=linuxGccDPDebugOPENMPI
+ wmake libso parMetisDecomp
'/home/gaurav/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPDebug/openmpi-1.3.3/libparMetisDecompositionMethod.so' is up to date.
+ wmake libso meshTools
/usr/bin/ld: cannot find -ldecompositionMethods
collect2: ld returned 1 exit status
make: *** [/home/gaurav/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPDebug/libmeshTools.so] Error 1
+ wmake libso finiteVolume
/usr/bin/ld: cannot find -lmeshTools
collect2: ld returned 1 exit status
make: *** [/home/gaurav/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPDebug/libfiniteVolume.so] Error 1
+ wmake libso sampling
/usr/bin/ld: cannot find -lfiniteVolume
collect2: ld returned 1 exit status
make: *** [/home/gaurav/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPDebug/libsampling.so] Error 1
+ wmake libso dynamicMesh
/usr/bin/ld: cannot find -lfiniteVolume
collect2: ld returned 1 exit status
make: *** [/home/gaurav/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPDebug/libdynamicMesh.so] Error 1
+ wmake libso dynamicFvMesh
/usr/bin/ld: cannot find -lmeshTools
collect2: ld returned 1 exit status
make: *** [/home/gaurav/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPDebug/libdynamicFvMesh.so] Error 1
+ wmake libso topoChangerFvMesh
/usr/bin/ld: cannot find -lfiniteVolume
collect2: ld returned 1 exit status
make: *** [/home/gaurav/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPDebug/libtopoChangerFvMesh.so] Error 1


Is there any problem with my LD_LIBRARY_PATH?
It is:

gaurav@gaurav-desktop:~/OpenFOAM/OpenFOAM-1.6$ echo $LD_LIBRARY_PATH

/home/gaurav/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/:/home/gaurav/OpenFOAM/OpenFOAM-1.6/mylib:/home/gaurav/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPDebug/openmpi-1.3.3:/home/gaurav/OpenFOAM/ThirdParty-1.6/openmpi-1.3.3/platforms/linuxGccDPDebug/lib:/home/gaurav/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux/lib:/home/gaurav/OpenFOAM/ThirdParty-1.6/gmp-4.2.4/platforms/linux/lib:/home/gaurav/OpenFOAM/ThirdParty-1.6/mpfr-2.4.1/platforms/linux/lib:/home/gaurav/OpenFOAM/gaurav-1.6/lib/linuxGccDPDebug:/home/gaurav/OpenFOAM/site/1.6/lib/linuxGccDPDebug:/home/gaurav/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPDebug:/mylib

Thank you.

Regards,
Gaurav
PaGgiE is offline   Reply With Quote

Old   June 23, 2010, 13:17
Default
  #13
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Gaurav,

The problem is this:
Quote:
Originally Posted by PaGgiE
Code:
/usr/bin/ld: cannot find -lscotch
Try going to the ThirdParty-1.6 folder and running "./Allwmake" there, in order to first isolate the errors on the first build stage of OpenFOAM. The library libscotch.so didn't get built for some reason, and the problems should start there.

You might still need to install byson if you don't already have it!

LD_LIBRARY_PATH seems ok... wait, maybe not. Did you run both startFoam and startFoamDebug on the same terminal? If so, you shouldn't have done that!

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   June 24, 2010, 07:40
Default
  #14
New Member
 
Gaurav
Join Date: Jun 2010
Location: Bangalore, India
Posts: 12
Rep Power: 16
PaGgiE is on a distinguished road
Hi Bruno,

Thank you very much. I've installed bison. It is working properly now.
and ya I guess I did the same...startFoam and startFoamDebug in the same terminal. Thanks for telling about that too.

Thank you.

Regards,
Gaurav
PaGgiE is offline   Reply With Quote

Old   October 8, 2010, 04:13
Default
  #15
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
I think I found a way which is a bit simpler to accomplish the same: Instead of making a copy of the etc/bashrc, just add the following two lines to ~/.bashrc:

Code:
alias setDebug='export WM_COMPILE_OPTION=Debug; export WM_OPTIONS=${WM_ARCH}${WM_COMPILER}${WM_PRECISION_OPTION}${WM_COMPILE_OPTION}'
alias unsetDebug='export WM_COMPILE_OPTION=Opt; export WM_OPTIONS=${WM_ARCH}${WM_COMPILER}${WM_PRECISION_OPTION}${WM_COMPILE_OPTION}'
akidess is offline   Reply With Quote

Old   October 8, 2010, 07:29
Default
  #16
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Anton,

That solution doesn't take care of updating the variables PATH and LD_LIBRARY_PATH! But that actually reminds me of something I only understood a few weeks ago:
Code:
alias startFoam='export WM_COMPILE_OPTION=Opt; . $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc'
alias startFoamDebug='export WM_COMPILE_OPTION=Debug; . $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc'
These will work as you want, namely, no need to make a copy of bashrc.
The disadvantage to this method is that it's harder to memorize how it's done, in case one needs to do this without access to the internet or doesn't find this thread

Which also reminds me: there is a file named aliases.sh in OpenFOAM's etc folder that initiates various helpful aliases for working with OpenFOAM. Sooo, that's a good place for adding a couple more aliases

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 8, 2010, 12:11
Default
  #17
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
Yeah, I did notice that a little later, but I didn't have time to update my post right away. And you are also right about aliases.sh, it's a way better place to add the debug alias. Funny how I never noticed it lingering around in the etc folder
akidess is offline   Reply With Quote

Old   June 15, 2012, 06:51
Default
  #18
New Member
 
Michal
Join Date: Apr 2012
Location: Czech Republic
Posts: 27
Rep Power: 14
majkl is on a distinguished road
Hello,

if I will keep the Opt-version and now build the Debug-version, I will run the ./Allwmake in the directory of Opt-version (I follow the instructions above - editing the bashrc)?

Thanks for reply.

Michal


Quote:
Originally Posted by wyldckat View Post
Hello Edward,

You'll only need to do a full build of the debug version, since I think you already have the Opt version fully built!

Best regards,
Bruno
majkl is offline   Reply With Quote

Old   June 16, 2012, 05:42
Default
  #19
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Michal,

If you follow the posted instructions, you will then have two architecture folders (Opt and Debug) in the "OpenFOAM-*/platforms" folder.

If you want, you can have a lot more architectures for the same code (Prof, Single Precision, 32bit, 64bit, etc...), which all will end up in the "platforms" folder.

What changes is how you set up the OpenFOAM shell environment. For more, read: Advanced tips for working with the OpenFOAM shell environment

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   June 20, 2020, 12:52
Default
  #20
New Member
 
Anik Mazumder
Join Date: May 2017
Posts: 9
Rep Power: 9
anikm is on a distinguished road
I have followed your instruction in my WSL ubuntu 18.04 for OpenFOAM-v1912. For Opt mode as usual there is no error. However, in "Debug" mode I am finding the following error.


g++ -std=c++11 -m64 -DOPENFOAM=1912 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -Wno-unknown-pragmas -O0 -fdefault-inline -ggdb3 -DFULLDEBUG -DNoRepository -ftemplate-depth-100 -I/home/anik/OpenFOAM/OpenFOAM-v1912/build/linux64Gcc63DPInt32Debug/src/OpenFOAM -IlnInclude -I. -I/home/anik/OpenFOAM/OpenFOAM-v1912/src/OpenFOAM/lnInclude -I/home/anik/OpenFOAM/OpenFOAM-v1912/src/OSspecific/POSIX/lnInclude -fPIC -c expressions/exprString/exprString.C -o /home/anik/OpenFOAM/OpenFOAM-v1912/build/linux64Gcc63DPInt32Debug/src/OpenFOAM/expressions/exprString/exprString.o
expressions/exprResult/exprResultGlobals.C: In member function ‘const Foam::expressions::exprResult& Foam::expressions::exprResultGlobals::get(const Foam::word&, const wordUList&) const’:
expressions/exprResult/exprResultGlobals.C:206:58: error: ‘const class Foam::HashTable<Foam::expressions::exprResultGloba ls::Table>’ has no member named ‘sortToc’; did you mean ‘sortedToc’?
<< "Known global scopes: " << variables_.sortToc() << nl;
^~~~~~~
/home/anik/OpenFOAM/OpenFOAM-v1912/wmake/rules/General/transform:34: recipe for target '/home/anik/OpenFOAM/OpenFOAM-v1912/build/linux64Gcc63DPInt32Debug/src/OpenFOAM/expressions/exprResult/exprResultGlobals.o' failed
make: *** [/home/anik/OpenFOAM/OpenFOAM-v1912/build/linux64Gcc63DPInt32Debug/src/OpenFOAM/expressions/exprResult/exprResultGlobals.o] Error 1


Can you kindly help me?

Last edited by anikm; June 20, 2020 at 13:01. Reason: include more information
anikm is offline   Reply With Quote

Reply

Tags
debug version error g++


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
OpenFOAM on cluster: version GLIBCXX_3.4.9 and GLIBCXX_3.4.11 not found ovie OpenFOAM 10 April 19, 2021 19:06
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
Cross-compiling OpenFOAM 1.6 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 7 January 19, 2010 16:39
OpenFOAM version 1.6 details lakeat OpenFOAM Running, Solving & CFD 42 August 26, 2009 22:47
OpenFOAM Version 1.6 Released opencfd OpenFOAM Announcements from ESI-OpenCFD 0 July 27, 2009 18:55


All times are GMT -4. The time now is 08:42.