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 |
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 |
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 |
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 |
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 |
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 |
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 |
Problems with Eclpse
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 |
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 |
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 **** /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 :p |
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 Then you can try and build the Debug version. I think that the respective instructions are on the wiki. Best regards, Bruno |
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?:confused: |
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 |
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.... :-( |
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 :) |
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 http://i42.tinypic.com/35id9hs.jpg 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 |
Hi
I had that "wrong syntax" message too in the included files but every thing was OK and the solvers compiled truly. |
Yes, I have seen this, that they compile, it is annoying, since I can't see if I make a mistake.
|
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 |
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 |
Thank you, Bruno! It worked finally! :D
Now I just have to understand well how to manage the debugging in a proper way...but, anyway, the most difficult part hope to have left behind. Bye for now! Matteo |
Bruno you may know the answer to my problem:
I have OF-1.6-ext in my system after installing it using the Synaptic manager so I guess this is a precompiled version. Now, I need to use Eclipse for debugging of some of my applications and for that reason I need to have OF-1.6-ext in debug mode. At least that is what I understood from the tutorial. So it seems to me that I need to recompile OF-1.6-ext. Is it possible to do this using the installed version that I mentioned before?? When I run my case form eclipse I see the progress of the simulation but I cannot see any of the variable or insert any breakpoints and for what I understand that is due to the fact that my version of OF is not compiled in debug mode... Any suggestions will be appreciated. Thanks |
Hi Santiago,
Whether you like it or not, you better install 1.6-ext from source and then switch to debug mode. I'm advising you this because I suspect that the packages supplied in deb format don't fully provide everything necessary for building it in debug mode :( Good luck! Bruno |
Thanks Bruno. I will try that. Where can I download the sources to build 1.6-ext.? I just want to make sure that I have the correct source files before I try to build this:eek::eek:. Thanks
|
Hi Santiago,
I wish you very good luck... the instructions I know of, but never have used myself, are these: http://www.extend-project.de/user-fo...n-openfoam#276 Best regards, Bruno |
1 Attachment(s)
Hi, I just got Eclipse mostly working on my mac and I think it is very helpful.
There were a couple of things that I had to do to get it working on my macbook though because eclipse was having problems finding wclean/wmake. Instructions to fix it can be found here, but basically what you have to do is: 1. (Note: I'm using the binary version of OpenFOAM 1.6-ext on my mac) Make a shell script called eclipse.sh that sources the bashrc script and then starts eclipse. Something like this (the locations of the .dmg file and bashrc are specific to my system): Code:
#!/bin/sh 3. Edit the file /Applications/eclipse/Eclipse.app/Contents/Info.plist and underneath "CFBundleExecutable" replace "eclipse" with "eclipse.sh" 4. Now you can just launch eclipse from the Finder the normal way. So, now on to my problem :D: My solvers compile without any problem and eclipse can find all of the included files, but I'm getting a lot of flags warning of problems like "Type 'scalar' could not be resolved" and "Symbol 'runTime' could not be resolved". An example of what I mean is in the screen shot that I attached. This is more of an annoyance since the compile still works but is there a way to fix these things? |
hi all,
i set up my eclipse for development. I did everything mentioned in the wiki but there is still one problem: If I have a library and added a header-file of an other library there is the message Code:
unresolved inclusion I can compile the library without a error and everything works very fine but at least I wanna have a code without a underlined line :) Hope that you understand my question. tobi FIXED |
Quote:
|
Well,
I looked into the project folders in eclipse. There is the folder called lnInclude with all included links. I saw that my include file was not correct written and one of the c++ project I renamed from "common" to "libCommon". So the path was wrong to. After delete it and recreate the link everything works fine. :) Tobi |
1 Attachment(s)
hi,
well i have a question to you! I imported icoFoam but eclipse do not know what the functions are! Included /src/OpenFOAM/lnInclude and /src/finiteVolume/lnInclude What do i wrong? Do I use OF in Debugversion? for that Tobi |
Hi Tobi,
By what I can read from the error message on the picture you attached, you forgot to configure the project to use wmake instead of make. Best regards, Bruno |
Quote:
The only thing is the underlinded funktions like .time() or so on. Eclipse don't know those functions so i thought there is a lnInclude folder missing? |
Symbols in header files cannot be resolved
Hi Tobi
Did you succeed with this annoying include problem? With Ubuntu 10.04 everything was fine. Now I switched to Ununtu 12.04 and Eclipse Indigo and I face the same problem you did before. With a clean install of Eclipse and OF-2.1.x all symbols in header files cannot be resolved. However, compilation works fluently. Any solution? Thanks and best wishes Fabian |
No sorry, I didn `t manage it :(
|
GDB version used
Does anybody use GDB-7.x ?
Or GBD-6.8 is the right version only? |
About lnInclude and #includes
Quote:
Something I noticed to be missing on the OpenFOAM-Eclipse-wiki is that you should also include any lnInclude directories in the Make/options file (just to make sure that each _real_ header file is actually found, not just those in src/finiteVolume/lnInclude and src/OpenFOAM/lnInclude. For instance, if you're using interFoam, you want to include OpenFOAM/OpenFOAM-2.1.0/src/transportModels/incompressible/lnInclude OpenFOAM/OpenFOAM-2.1.0/src/transportModels/interfaceProperties/lnInclude OpenFOAM/OpenFOAM-2.1.0/src/turbulenceModels/incompressible/turbulenceModel (perhaps obvious, I'm mentioning it anyway :) ) Now I have another problem; I followed the OF-into-Eclipse wiki but it doesn't compile my interFoam-like solver in Eclipse Juno (latest version as of now). Instead, it gives me some error messages about 'Invoking autoreconf in build directory' and so on, but I couldn't figure out how to disable autoreconf - it seems to be an integral part of the IDE. Apparently, it stops when it encounters the autoconf errors and doesn't even start with invoking wmake. |
Underlined classes and methods?
Hi all,
I did include the other lninclude directories as in the Make/options of the solver (e.g. simpleFoam) in Path and Symbols but I still get underlined functions and "Symbol ... could not be resolved" when I hover mouse on a function like runtime. I can compile and build the project with no problem though. |
In a few weeks I ll have a look at that problem again and inform all of you if I can solve the problem.
Tobi |
Hi all,
I am trying to manage openFoam source code with eclipse. Following the guide provided on this web site and this tread finally I got it work for the run configuration. It worked also for the debug mode, but I was able just to stop in the main function without getting any information on the variables. Moreover I was not able to go foreword. Then reading this tread again I understood that there is a bug in gdb 7x with eclipse, so I downgraded it to the version 6.8. Now I've actually got some information on the variables, but I've soon got the following error: Code:
BFD: /lib/x86_64-linux-gnu/libm.so.6: invalid relocation type 37 Of course I build the source in Debug mode. Thank you for any suggestion :) |
Updating...
I tried to debug a simple Hello world program with gdb 6.8 and I've got the same error, then I switched back to gdb 7.x and the Hello world program worked very well! Thus I believe that it is not an issue of gdb, but may be an issue related with how wmake build openFoam. Indeed I built the Hello world program using the default builder of Eclipse. I guess that gdb miss some files due to the fact that wmake place them in some unrecognised folder. Anyone can give me a feedback about this? |
All times are GMT -4. The time now is 02:34. |