|
[Sponsors] |
May 2, 2010, 11:47 |
Debug version of OpenFOAM-1.6
|
#1 |
Member
yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 64
Rep Power: 16 |
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? |
|
May 2, 2010, 13:28 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings Edward and welcome to the forum,
OK, I propose that you follow the next steps for the environment set-up:
Best regards, Bruno
__________________
|
|
May 5, 2010, 06:52 |
|
#3 |
Member
yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 64
Rep Power: 16 |
Thank you for your detailed instructons! I will follow it and return back my response.
|
|
May 5, 2010, 07:20 |
|
#4 | |
Member
yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 64
Rep Power: 16 |
Thank you for your detailed solution, I need to make sure that whether I should compile it again before I follow your instrution?
Quote:
|
||
May 5, 2010, 08:26 |
|
#5 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
|
May 5, 2010, 10:11 |
|
#6 |
Member
yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 64
Rep Power: 16 |
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. |
|
May 7, 2010, 02:37 |
|
#7 |
Member
yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 64
Rep Power: 16 |
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. |
|
June 23, 2010, 08:52 |
error when building in debug mode
|
#8 |
New Member
Gaurav
Join Date: Jun 2010
Location: Bangalore, India
Posts: 12
Rep Power: 16 |
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 ] Regards, Gaurav |
|
June 23, 2010, 08:59 |
|
#9 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings Gaurav,
Quote:
Best regards, Bruno
__________________
|
||
June 23, 2010, 09:17 |
|
#10 |
New Member
Gaurav
Join Date: Jun 2010
Location: Bangalore, India
Posts: 12
Rep Power: 16 |
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 |
|
June 23, 2010, 09:32 |
|
#11 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
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 Best regards, Bruno
__________________
|
|
June 23, 2010, 10:44 |
|
#12 |
New Member
Gaurav
Join Date: Jun 2010
Location: Bangalore, India
Posts: 12
Rep Power: 16 |
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 |
|
June 23, 2010, 13:17 |
|
#13 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Gaurav,
The problem is this: Quote:
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
__________________
|
||
June 24, 2010, 07:40 |
|
#14 |
New Member
Gaurav
Join Date: Jun 2010
Location: Bangalore, India
Posts: 12
Rep Power: 16 |
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 |
|
October 8, 2010, 04:13 |
|
#15 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
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}' |
|
October 8, 2010, 07:29 |
|
#16 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
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' 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
__________________
|
|
October 8, 2010, 12:11 |
|
#17 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
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
|
|
June 15, 2012, 06:51 |
|
#18 |
New Member
Michal
Join Date: Apr 2012
Location: Czech Republic
Posts: 27
Rep Power: 14 |
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 |
|
June 16, 2012, 05:42 |
|
#19 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
|
June 20, 2020, 12:52 |
|
#20 |
New Member
Anik Mazumder
Join Date: May 2017
Posts: 9
Rep Power: 9 |
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 |
|
Tags |
debug version error g++ |
|
|
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 |