|
[Sponsors] |
![]() |
![]() |
#41 |
New Member
Astrid Mahrla
Join Date: May 2010
Location: Munich, Germany
Posts: 22
Rep Power: 17 ![]() |
Hi Arne,
as I can only guess, what's the real problem, you could try to include the "lnIncludes". We've added some line to the Eclipse-entry in the OpenFOAM-Wiki at the end of chapter 5.2 ... This should also improve the autocompletion.. Best, Astrid |
|
![]() |
![]() |
![]() |
![]() |
#42 |
Member
Join Date: Sep 2010
Posts: 36
Rep Power: 15 ![]() |
Dear Foamers,
I just wanted to make sure these combinations of versions will play well together before I will waste time on solving version related issues... I am using: ----------- Ubuntu 11.04 OpenFoam 1.7.x gcc 4.5.2 (checked with "gcc -v") About gdb: ----------- The current gdb version installed is: gdb 7.2 (checked with "gdb -v") The tutorial suggests not to use gdb 7.x, so should I downgrade to 6.8? But how to? About Eclipse ------------- The current version of Eclipse is 3.7, but I am assuming that should not be an issue. But which one exactly should I download: -Eclipse IDE for C/C++ developers? -Eclipse Classic Will this version of Eclipse Classic already include the CDT? Adding gfortran to Eclipse: ------------------------- Another hurdle I will have to take is that I also need gfortran in Eclipse as I am currently coupling F90 subroutines with OpenFoam/fireFoam. Does anyone know if that is possible and/or knows how to do that (or can provide helpful links)? Thanks! Best regards, Andreas |
|
![]() |
![]() |
![]() |
![]() |
#43 |
Member
Santiago
Join Date: Dec 2009
Posts: 85
Rep Power: 16 ![]() |
Hi,
I followed the tutorial. I just trying to run the cavity case (using icoFoam). I import the case folder and set the application to be /home/santiago/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/icoFoam in eclipse. When I hit run I get this: /home/santiago/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/icoFoam: error while loading shared libraries: libfiniteVolume.so: cannot open shared object file: No such file or directory Any idea of what is wrong? Also, regarding http://www.cfd-online.com/Forums/ope...tml#post261470 I just downloaded eclipse as indicated in the wiki, then I browse to the executable file and run eclipse (if i try to run eclipse from the terminal its says that the program is not installed) however it runs when I double click the executable file. I have the same problem when trying to use wmake as shown http://www.cfd-online.com/Forums/ope...tml#post260405 . I would like to run eclipse from the terminal if that is going to solve my problems. I will appreciate any help. THanks |
|
![]() |
![]() |
![]() |
![]() |
#44 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 ![]() ![]() ![]() ![]() ![]() ![]() |
Hi Santiago,
Check post #12: http://www.cfd-online.com/Forums/ope...tml#post261470 ![]() Also, reading the whole thread might lead you to some more details that I don't remember or didn't read about ![]() Best regards, Bruno
__________________
|
|
![]() |
![]() |
![]() |
![]() |
#45 |
Member
Paulo Bufacchi
Join Date: Jun 2010
Posts: 50
Rep Power: 16 ![]() |
Hi Foamers,
I'm running OpenFOAM 2.1.x on OpenSUSE 11.4 64 bits. I compiled OpenFOAM in debug mode. I downloaded Eclipse IDE for C/C++ Developers (includes Incubating components), for 64 bits. It is version Indigo (3.7) Service Release 1. Thanks to the Wiki http://openfoamwiki.net/index.php/Ho...M_with_Eclipse installation and configuration ran smoothly. I also read the thread Eclipse for OpenFOAM. I imported the icoFoam solver and cavity case as projects to my workspace. Prior to that I ran blockMesh. When I run the case, it goes well, without errors. But when I debug it, I have the following error: Debug Perspective: Console Window: Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2 Try: zypper install -C "debuginfo(build-id)=b1d398a5cb1609e7ac1c51a26588e87fc20f753c" Missing separate debuginfo for /lib64/libdl.so.2 Try: zypper install -C "debuginfo(build-id)=9a8d0811525ec7a152dca9e109292adca81857c1" Missing separate debuginfo for /usr/lib64/libstdc++.so.6 Try: zypper install -C "debuginfo(build-id)=e87ebb28b8b5aa032cf2925387aaa13f2cb93c90" Missing separate debuginfo for /lib64/libm.so.6 Try: zypper install -C "debuginfo(build-id)=5ac64cd348d3581ec2a223ee70f42e73cad029cc" Missing separate debuginfo for /lib64/libgcc_s.so.1 Try: zypper install -C "debuginfo(build-id)=e6eb8011838a065946e5808e036550844548379f" Missing separate debuginfo for /lib64/libc.so.6 Try: zypper install -C "debuginfo(build-id)=70bab20280816eb26a0553f13382ee75d53179f5" Missing separate debuginfo for /lib64/libpthread.so.0 Try: zypper install -C "debuginfo(build-id)=e23cbc772e670af00bea9874f925e2e61afda713" [Thread debugging using libthread_db enabled] Missing separate debuginfo for /lib64/libz.so.1 Try: zypper install -C "debuginfo(build-id)=61e4e9a46287c10135232e8a269575a1ceda7638" Missing separate debuginfo for /lib64/libnsl.so.1 Try: zypper install -C "debuginfo(build-id)=2d5906a5f42a9ad6df5fc2f91ab5bca478ce4959" Missing separate debuginfo for /lib64/libutil.so.1 Try: zypper install -C "debuginfo(build-id)=5751266e22e9f2cbca821b110e87ecd37e70e7b4" Debug Window: cavity [C/C++ Application] /home/paulo/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPDebug/bin/icoFoam [15362] [cores: 4] Thread [1] 15362 [core: 4] (Suspended : Breakpoint) main() at setRootCase.H:5 0x4409ed gdb cavity [C/C++ Application] /home/paulo/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPDebug/bin/icoFoam [15408] [cores: 7] Thread [1] 15408 [core: 7] (Suspended : Breakpoint) main() at setRootCase.H:5 0x4409ed gdb cavity [C/C++ Application] /home/paulo/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPDebug/bin/icoFoam [15447] [cores: 0] Thread [1] 15447 [core: 0] (Suspended : Breakpoint) main() at setRootCase.H:5 0x4409ed gdb It is important to say that I'm not compiling an application. I'm running the case and I started Eclipse from the icon in its folder and not from a terminal. Although I have included all paths, it seems that the icoFoam.C file can't find many other files and variables. How can I fix the error? Thanks, Paulo |
|
![]() |
![]() |
![]() |
![]() |
#46 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 ![]() ![]() |
Quote:
If you google around you'll find that the libraries (libm.so ,libpthread.so ..) are not part of OF. So this is a general problem. It seems that the developers of Eclipse knew that Suse-Users need a bit of handholding so the told them how to fix thsi. Maybe they should have been a bit more verbose and write something like: Try the command "zypper install -C .... " to fix this |
||
![]() |
![]() |
![]() |
![]() |
#47 |
Member
Paulo Bufacchi
Join Date: Jun 2010
Posts: 50
Rep Power: 16 ![]() |
Hi Bernhard,
Thanks for your note. I did try the zypper command as super user, but I got an error message, saying about a repository. The problem is that openSUSE-12.1-Debug, openSUSE-12.1-Update-Debug and openSUSE-12.1-Source repositories were not enabled. After changing that, the zypper command worked well. Thanks, Paulo |
|
![]() |
![]() |
![]() |
![]() |
#48 |
Member
Join Date: Feb 2012
Posts: 35
Rep Power: 14 ![]() |
Hi everybody,
I'm brand new on this forum and quite new in learning OpenFoam. I'm very interested in using Eclipse, because I found out that is possible to debug the very heavy C++ code and it could be a very powerful and useful thing to understand how OpenFoam really works.I read all this thread and I tried to follow all the steps of the Eclipse user guide one by one but I didn't succeded untill now. First of all I tried to build simpleFoam solver by means of "wmake" but it didn't work; after that I swapped "wmake" with $HOME/directory/foamExec wmake, as one user suggested, and finally it started to build the project. The problem is that after a while, build operation quits with 6 errors, all concerning the LIBRARY listed in the "Make/Option" file (-lincompressible... for example). Eclipse goes in a wrong directory to find shared libraries. My question is: why compiler doesn't use correct directory? Could I set somehow? Has it something to do with "bashrc" and the problem that Eclipse doesn't read it? Thank you in advance for the answers. Matteo |
|
![]() |
![]() |
![]() |
![]() |
#49 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 ![]() ![]() ![]() ![]() ![]() ![]() |
Greetings Matteo and welcome to the forum!
OK, let's step back a few steps. Apparently the first problem is that you are not able to compile OpenFOAM in debug mode. So:
Best regards, Bruno
__________________
|
|
![]() |
![]() |
![]() |
![]() |
#50 | |||
Member
Join Date: Feb 2012
Posts: 35
Rep Power: 14 ![]() |
Hi Bruno,
thank you for the very quick reply ![]() Quote:
Quote:
Quote:
When I try to build a solver or to run a test case in Eclipse, I receive error message because the shared libraries specified in the Make/Options file. Here below the error message i receive in Eclipse: Code:
**** Build of configuration Debug for project simpleFoam **** /home/matteo/OpenFOAM/OpenFOAM-1.7.1/bin/foamExec wmake all g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/matteo/OpenFOAM/OpenFOAM-1.7.1/src/turbulenceModels -I/home/matteo/OpenFOAM/OpenFOAM-1.7.1/src/turbulenceModels/incompressible/RAS/RASModel -I/home/matteo/OpenFOAM/OpenFOAM-1.7.1/src/transportModels -I/home/matteo/OpenFOAM/OpenFOAM-1.7.1/src/transportModels/incompressible/singlePhaseTransportModel -I/home/matteo/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/matteo/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/home/matteo/OpenFOAM/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude -fPIC Make/linuxGccDPOpt/simpleFoam.o -L/home/matteo/OpenFOAM/OpenFOAM-1.7.1/lib/linuxGccDPOpt \ -lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleTransportModels -lfiniteVolume -lOpenFOAM -liberty -ldl -lm -o /home/matteo/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linuxGccDPOpt/simpleFoam /usr/bin/ld: cannot find -lincompressibleTurbulenceModel /usr/bin/ld: cannot find -lincompressibleRASModels /usr/bin/ld: cannot find -lincompressibleTransportModels /usr/bin/ld: cannot find -lfiniteVolume /usr/bin/ld: cannot find -lOpenFOAM collect2: ld returned 1 exit status make: *** [/home/matteo/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linuxGccDPOpt/simpleFoam] Error 1 /opt/openfoam210/platforms/linuxGccDPOpt/lib. I tried to let artificially recognize library by Eclipse, substituting -l with -L, for example: -lincompressibleTurbulenceModel with: -L$/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleTransportModels It works but I don't fix the problem completely. I hope to have helped you to help me ![]() |
||||
![]() |
![]() |
![]() |
![]() |
#51 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 ![]() ![]() ![]() ![]() ![]() ![]() |
Hi Matteo,
OK, you've got more than one OpenFOAM installation. In this case, first read the following blog post of mine: Advanced tips for working with the OpenFOAM shell environment Then build OpenFOAM 2.1.0 as instructed on the website: http://www.openfoam.org/download/source.php Also to take into account, if you want to build things faster and keep a good log on it: Code:
export WM_NCOMPPROCS=4 ./Allwmake > make.log 2>&1 Then you can try and build the Debug version. I think that the respective instructions are on the wiki. Best regards, Bruno
__________________
|
|
![]() |
![]() |
![]() |
![]() |
#52 | |
Member
Join Date: Feb 2012
Posts: 35
Rep Power: 14 ![]() |
Quote:
Neverthless your help with the new install procedure you pointed out to me, I can't still succeed because it seems to have problems with the ./Allwmake command: it reports a lot of errors ("Access to folder denied" and "No such directory" for example). I'm thinking it could be better to uninstall both OpenFoam versions before to begin building again new version, but I don't know how to make it. What do you think about? ![]() |
||
![]() |
![]() |
![]() |
![]() |
#53 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 ![]() ![]() ![]() ![]() ![]() ![]() |
Hi Matteo,
If you want to build your own builds of OpenFOAM for debugging, then follow these instructions: http://www.openfoam.org/download/source.php - then you can also try building the Debug version. The instructions for Ubuntu deb packages is for simply using OpenFOAM, and perhaps building your own solvers and utilities. But if you want to do "full-on debugging", then you should do your own builds! You can still have the ".deb" version installed and use it just in case your own builds fail ![]() Best regards, Bruno
__________________
|
|
![]() |
![]() |
![]() |
![]() |
#54 |
Member
Join Date: Feb 2012
Posts: 35
Rep Power: 14 ![]() |
I'm sorry to bother you again, but as I already told you, I tried to build OpenFoam with the Source installation pack but all I got is errors. If I type "foamInstallationTest" I got a FATAL ERROR.
I'm still a newbie with Linux, because I installed it just after knowing that OpenFoam could run only on this O.S. I even tried to build just one solver from Eclipse Environment, pointing to new Openfoam 2.1.0 Application/solvers/incompressible/simpleFoam folder but still I got errors with libraries location....it seems I didn't get any step further.... :-( |
|
![]() |
![]() |
![]() |
![]() |
#55 | |
Member
Paulo Bufacchi
Join Date: Jun 2010
Posts: 50
Rep Power: 16 ![]() |
Quote:
Hi Matteo and Bruno, Let me try a different point of view here. I have many different OpenFOAM versions on my computer, and I can assure you that they don't interfere with each other. There will always be a single version in use, and that version is the one in your $HOME/.bashrc file or similar (depends on the shell). Second, if you follow strictly what is on the download page, (almost) nothing can go wrong. I say that because I already did a lot of installs (over 20) using Ubuntu and Suse. I would like to sugest Matteo to begin from scratch. If you are not sure about the many changes you made in your OS, reinstall it. If there is something well written is the installation procedure. I hope this helps and encourages you in installing OpenFOAM. Paulo ![]() |
||
![]() |
![]() |
![]() |
![]() |
#56 |
Senior Member
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 21 ![]() |
Hej,
I have a question about the "Path & Symbols" includes. Which ones should I definitely include? 1. The ones that are also listed in the files and options file? 2. Additional ones? At the moment I have the solver buoyantBoussinesqSimpleFoam loaded with includes to the following ![]() It resolved the whole "unresolved" sources part in the main file. However, I am still getting error messages on "wrong syntax" as one can see on the open file next to it, which is pEqn.H. In the main file I don't have any squiggly lines, but in the pEqn.H file I do. How do I get rid of these? In the createFields.H the squiggly lines are only on the Info lines Code:
Info<< "Reading field p_rgh\n" << endl; Code:
// Solve the momentum equation tmp<fvVectorMatrix> UEqn ( fvm::div(phi, U) + turbulence->divDevReff(U) ); UEqn().relax(); if (simple.momentumPredictor()) { solve ( UEqn() == fvc::reconstruct ( ( - ghf*fvc::snGrad(rhok) - fvc::snGrad(p_rgh) )*mesh.magSf() ) ); }
__________________
~roman |
|
![]() |
![]() |
![]() |
![]() |
#57 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 ![]() |
Hi
I had that "wrong syntax" message too in the included files but every thing was OK and the solvers compiled truly. |
|
![]() |
![]() |
![]() |
![]() |
#58 |
Senior Member
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 21 ![]() |
Yes, I have seen this, that they compile, it is annoying, since I can't see if I make a mistake.
__________________
~roman |
|
![]() |
![]() |
![]() |
![]() |
#59 | |
Member
Join Date: Feb 2012
Posts: 35
Rep Power: 14 ![]() |
Hi again everybody!
Still here, with the same problem, after a lot of steps further by the way... As I posted before, I had troubles with debugging a test case: I didn't succeed before and I still don't succeed now. What I did untill now is compiling OpenFoam version 2.1.0 by means of Source code using .Allwmake utility and in both Optimization and Debug mode. I'm now able to run a test case with gdc by a terminal shell and to build a solver in Eclipse environment exploiting the foamExec script, because without it, the simple wmake doesn't work at all. When I tried to run a test case, I got the message that it couldn't find shared libraries and, after a while, I bypassed this problem manually defining in the ld.so.config file the directories leading to OpenFoam's libraries and it worked. Now, when I run or debug a test case I don't receive the shared libraries error anymore, but a new error (Fatal error) regarding the fact that it cannot find controlDict. I suppose it can't find the reference to this header but I don't know how to get do it. Maybe the answer is in the Bruno's hint below but I don't understand how to implement this. Could anyone help me? Quote:
Code:
$HOME/OpenFOAM/OpenFOAM-2.1.0/bin/foamExec icoFoam Code:
$HOME/Opt/OpenFOAM/OpenFOAM-2.1.0/...../foamExec icoFoam Where am I mistaken? As a last attempt, I even tried to build the test case switching to Debug and substituting Code:
$HOME/OpenFOAM/OpenFOAM-1.6/bin/foamExec wmake Code:
$HOME/OpenFOAM/OpenFOAM-2.1.0/bin/foamExec icoFoam ![]() ![]() ![]() ![]() Thank you in advance. Matteo |
||
![]() |
![]() |
![]() |
![]() |
#60 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 ![]() ![]() ![]() ![]() ![]() ![]() |
Hi Matteo,
Sorry about not being very clear on that old post. The idea I had back then was to explain how to run things on the command line. So, let me explain further:
Anyway, the most clean way of doing this is to simply launch eclipse from the command line, straight from a working shell environment where the debug version of icoFoam can work without any problems ![]() Best regards, Bruno
__________________
|
|
![]() |
![]() |
![]() |
|
|