|
[Sponsors] |
May 5, 2010, 11:44 |
Eclipse for OpenFOAM
|
#1 |
New Member
Astrid Mahrla
Join Date: May 2010
Location: Munich, Germany
Posts: 22
Rep Power: 17 |
Dear FOAMers,
a new tutorial how to use the IDE Eclipse for OpenFOAM development is now available in the OpenFoam Wiki: http://openfoamwiki.net/index.php/Ho...M_with_Eclipse Best, Astrid |
|
May 5, 2010, 18:47 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Astrid,
Great post!! Many thanks! The only thing I can't figure out is if it's possible to use the same instructions to also debug OpenFOAM's libraries... you know, just in case we want to add something to the core of OpenFOAM, or to verify where things are going through. Best regards, Bruno PS: 2h20m to write a whole wiki page... that is wicked fast! I probably would take a whole day to do the same!!
__________________
|
|
May 6, 2010, 04:53 |
|
#3 |
New Member
Astrid Mahrla
Join Date: May 2010
Location: Munich, Germany
Posts: 22
Rep Power: 17 |
Hi Bruno!
You should be able to import every piece of OpenFOAM-code into eclipse and everything should be linked by setting the wmake build command. For debugging you'll have to provide a test case and a solver. But keep in mind that the indexer only works for those parts that imported in your eclipse workspace, but stepping through the code while debugging should be possible. Best, Astrid P.S. Actually, I had prepared something for the wiki entry in advance... |
|
May 11, 2010, 06:15 |
|
#4 |
Senior Member
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23 |
Good work, I use Eclipse too
Do you know if it's possible to "ssh" to a server and run wmake? I find IDEs quicker if I run them on my desktop instead of on another file server/node. But I'm not sure how to ssh to the file server and run wmake. Does that make sense? I would guess that you'd add it to make target: http://openfoamwiki.net/index.php/File:Eclipse05.png
__________________
Laurence R. McGlashan :: Website |
|
May 12, 2010, 03:28 |
|
#5 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
Quote:
For your reference (and without any guarantees, warranties etc.) I've attached an example of running wmake as a parallel job with GridEngine. The script is both a submission script and a job script rolled into one. See the usage with '-help'. |
||
May 26, 2010, 16:58 |
Error with wmake
|
#7 |
New Member
yu
Join Date: Nov 2009
Posts: 26
Rep Power: 17 |
Hi, i got this error with Eclipse and openfoam
could anyone tell me why. Thanks **** Build of configuration Default for project simpleFoam **** (Cannot run program "wmake": Unknown reason) Yu |
|
May 26, 2010, 17:10 |
|
#8 |
Senior Member
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23 |
Are you building on your own machine or on another? Either it can't find wmake, or you've run out of memory from the few hits google gives for that issue with eclipse.
__________________
Laurence R. McGlashan :: Website |
|
May 26, 2010, 17:17 |
wmake error
|
#9 |
New Member
yu
Join Date: Nov 2009
Posts: 26
Rep Power: 17 |
I used my own machine. I never used eclipse before and have no idea about it. I just try to follow the tutorial. but can not make it work.
It that possible because the I use ubuntu? Yu Last edited by universez; May 26, 2010 at 17:48. |
|
June 1, 2010, 17:06 |
|
#11 |
New Member
yu
Join Date: Nov 2009
Posts: 26
Rep Power: 17 |
||
June 2, 2010, 20:28 |
|
#12 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings Yu,
Are you running Eclipse from the terminal or from the application menu? The terminal calls ~/.bashrc by itself, but starting an application from the "Applications" menu usually doesn't call the terminal first! If you wish to always start eclipse from the menu, you have various solutions, some of which are:
Best regards, Bruno
__________________
|
|
June 4, 2010, 12:35 |
|
#13 | |
New Member
yu
Join Date: Nov 2009
Posts: 26
Rep Power: 17 |
Hi, Bruno,
Thank you, it works fine now. Yu Quote:
|
||
June 9, 2010, 05:44 |
|
#14 |
Senior Member
Join Date: Dec 2009
Posts: 112
Rep Power: 16 |
Hi There,
great Post, sounds promising...i have been locking for something like this ! I managed to reproduce the "tutorial" on the wiki-page.. but there are still some major concerns of mine. 1. When I run the debug, i have the very same output in the console window I am used to see running it "as usual". In the debug window I see some storage adresses(eg ...::correct @someaddres) I was hoping to see what happens behind the scene... so to see which operation he uses on which object and what values are returned...and so on.. Did I overlook it, or how can I achieve this? 2. I have been trying to understand a certain solver. Loading the solver like in the tutorial leaves me with "selected name can not be mapped to a symbol name" once I ask for the source code or something else. So I added the whole FOAM folder as a project. But I still have some trouble with it. For example: He Includes UEqn.H. I can open the sourcecode of this now, but trying to find out what he does when he calles "UEqn.relax();" is not possible with this tool..he says: "selected name can not be mapped to a symbol name". ".relax" happens to be NOT declared in UEqn.H and i dont know (yet) where UEqn.H is inherited from. So do I have to go DOXYGEN again or is there a way to make him answer ? 3. Also the auto completion does not work :-( .. I have "runTime.write" in the code...so when I write "runTime." right below the "runTime.write" and press crt+space he says "no proposals..." so what did I do wrong. It does neither work with the only the solver importet nor with the whole OpenFoam-Folder. thx & best regards! Last edited by heavy_user; June 9, 2010 at 07:01. |
|
June 9, 2010, 11:28 |
|
#15 |
New Member
Astrid Mahrla
Join Date: May 2010
Location: Munich, Germany
Posts: 22
Rep Power: 17 |
Hi heavy_user!
Concerning your questions.. 1. During running the debug, the console output stays the same, but you have the possibility to watch the variables and the current position in the source code in the debug view. If your variables are pointers or references the storage adresses will be shown. 2. If you want to have a look into a function as .relax(); just go into the function using F5. This should open the file where the function is executed. 3. Sorry - no idea.. maybe this depends on the files you imported in your workspace.. Hope this could help you a little bit.. Best, Astrid |
|
June 9, 2010, 12:40 |
|
#16 | |||
Senior Member
Join Date: Dec 2009
Posts: 112
Rep Power: 16 |
Hi Astrid,
thanks for your reply!! Quote:
Or is there already a good video to it, which i didnt find yet? ----------------------------------------------------------------- In the "DSF-Dissasembly" I have stuff like: 00416be8: mov $0x1,%ecx 00416bed: push %r14 which tells me nothing. "debug" shows stuff like : main() at 0x00000andsuchstuff "variables" is empty. ---------------------------------------------> is there a view where i can see e.g. which values/objects "turbulence->correct" uses and which values it gives back ?? Quote:
I use "open declaration" (F3) (F5 is refresh in my version). .....UPDATE !! : now most of the "open declaration"-calls work ...he seemed to be loading a while (about 1hour ), can i see the progress somewhere ? Quote:
YEA, great WORK... here we would say : "Du bisch gut, kommst ind Supp. " thx again! |
||||
June 10, 2010, 10:21 |
|
#17 |
Senior Member
Join Date: Dec 2009
Posts: 112
Rep Power: 16 |
Hi There,
i found great tutorial videos for eclipse here: http://eclipsetutorial.sourceforge.net/ but it is for java which is gonna mess with my shaki c++ . Does anyone know videos like this for c++ ? (I found some, but they are only covering the very basics or seem not to be working) THX! |
|
January 4, 2011, 05:07 |
|
#18 |
Senior Member
Robert Sawko
Join Date: Mar 2009
Posts: 117
Rep Power: 22 |
Hello and thanks for the tutorial!
The tutorial was really helpful and it's great to be able to run OF under a proper IDE. I was wondering if you could give me a hand with configuration since I have run into some little difficulties. On my laptop with OpenSUSE 11.2 everything went smoothly and I can debug my OF applications under Eclipse. On my desktop with OpenSUSE 11.3 I can't seem to get it right. Please, let me summarise what is happening. - OF is compiled in Debug mode. It was compiled in an Opt mode previously on the same machine. - I can add solver/cases to Eclipse project view. - I can compile my projects in Eclipse. - I can run Eclipse cases with an output to Eclipse console. - I can debug my applications with gdb However when I run Debug under eclipse it stops without any apparent reason. I get a set of runtime error messages (see log attached). GDB also informs me about missing debuginfo for libutil but it does not hinder the further debugging process and does not result in any errors. None of these problems appear on my laptop... Could you please advise? Last edited by AlmostSurelyRob; January 4, 2011 at 05:27. |
|
January 10, 2011, 06:13 |
|
#19 |
New Member
Astrid Mahrla
Join Date: May 2010
Location: Munich, Germany
Posts: 22
Rep Power: 17 |
It seems that there is a bug in gdb 7.x - as it runs with gdb 6.x versions.. I wrote something about that in the IDE forum on extend-project.de..
http://www.extend-project.de/component/kunena/35-integrated-development-environment-ide-for-openfoam-group-forum/13-graphical-variable-visualisation-while-debugging Best, Astrid Mahrla |
|
January 10, 2011, 06:21 |
|
#20 | |
Senior Member
Robert Sawko
Join Date: Mar 2009
Posts: 117
Rep Power: 22 |
Quote:
Anyway, many thanks for your reply. I will keep that in mind. Now it works very well. Also, thanks for the link! Just one thing that occurs to me... If this is a GDB bug, why does it work from a command line? |
||
|
|