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

Eclipse for OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Like Tree18Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 17, 2014, 10:47
Default
  #101
Senior Member
 
louisgag's Avatar
 
Louis Gagnon
Join Date: Mar 2009
Location: Stuttgart, Germany
Posts: 338
Rep Power: 18
louisgag is on a distinguished road
Send a message via ICQ to louisgag
Lionel, make sure you complete the following step and wait for the indexer to reach 100% (bottom right of eclipse window)

Quote:
Originally Posted by jherb View Post
The problem with 'scalar' can be solved by adding the variable WM_DP to Properties for (Project) -> Paths and Symbols. Set it to any value, e.g. 1, for the C++ compiler (actully I added it to all configurations and all languages). I guess if you compile OpenFOAM with single precision, you should add the variable WM_SP instead. I didn't find a place in the OpenFOAM source code, where these variables are set, so I guess it is done by wmake somewhere (perhaps related to the environment variable WM_PRECISION_OPTION).
and that you add the paths mentioned in the wiki tutorial you mentioned.

These two steps worked for me.

-Louis
wyldckat likes this.
louisgag is offline   Reply With Quote

Old   September 23, 2014, 10:20
Default
  #102
Member
 
Join Date: Nov 2012
Posts: 83
Rep Power: 13
Henning86 is on a distinguished road
i managed to compile the application with eclipse


but the i get a lot of errors:

type <scalar> could not be resolved

i tried to add the variable WM_DP in path and symbols/ includes but there is now variable WM_DP

where i have to define the variable?

best regards

Henning

Last edited by Henning86; September 26, 2014 at 09:25.
Henning86 is offline   Reply With Quote

Old   September 26, 2014, 05:17
Default
  #103
Senior Member
 
louisgag's Avatar
 
Louis Gagnon
Join Date: Mar 2009
Location: Stuttgart, Germany
Posts: 338
Rep Power: 18
louisgag is on a distinguished road
Send a message via ICQ to louisgag
Dear Henning,
If I remember correctly, you have to create the variable yourself.
-Louis
louisgag is offline   Reply With Quote

Old   November 18, 2014, 09:21
Default Debugger jump to wrong line
  #104
New Member
 
Join Date: Dec 2012
Posts: 1
Rep Power: 0
Magid is on a distinguished road
Dear Foamer,

I would like to step through the source of my own solver and OpenFoam 2.1 . I hope you have some hints for me what to do.
I have the following problems with Eclipse:

1) I have to click on the step-over button several times to execute the
highlighted line and to jump to the next line. Thereby the debugger jumps often to the wrong line such as a comment line.

2) When the debugger executes a method, the Variable-View will be also refreshed in such a way that for a few minutes the GDB activity is at 100%.

I use:
OpenFoam 2.1
GDB version 7.6
Eclipse Kepler
Ubuntu 12.04
Magid is offline   Reply With Quote

Old   February 10, 2015, 08:30
Unhappy
  #105
New Member
 
Jeroen Hofman
Join Date: Feb 2015
Location: The Netherlands
Posts: 15
Rep Power: 16
kenyi89 will become famous soon enough
Hi all,

I have a problem similar to the last post, only using Ubuntu 14.04. The debugger gets stuck in my case on the first line, when progressing gdb starts running with occupying 1 core at 100%. However it never finishes executing the statement and crashes eventually (after 20 minutes).

Given it is very difficult by now to downgrade GDB to 6.x (the crash appears to happen only with GDB 7.x) currently it's not possible to debug openFOAM with Eclipse. Any help on this issue would be greatly appreciated. Currently I'm circumventing the issue by using QtCreator instead of Eclipse, which doesn't seem to have this problem.

Last edited by kenyi89; February 14, 2015 at 07:25.
kenyi89 is offline   Reply With Quote

Old   February 19, 2015, 04:42
Default some problem
  #106
New Member
 
Vladimir
Join Date: Feb 2015
Posts: 1
Rep Power: 0
berezka is on a distinguished road
Hi,
i want to debug icoFoam solver, but i have some problem:
after creating a c++ project and importing an icoFoam directory, i've tried to add all includes to the project (properties--> c++ general --> path and symbols). I think that i should include all the includes according to Make/options file. Am i correct ?
After that, a lot of errors appeares in Problems window, like "symbol 'mesh' could not be resolved". So how to compile and debug with this problem ? ...
__
P.S. I have never used Eclipse before.
berezka is offline   Reply With Quote

Old   February 23, 2015, 09:47
Default Eclipse 3.6.1
  #107
New Member
 
Tariq Ahmed
Join Date: Jan 2015
Posts: 13
Rep Power: 11
Tariq Ahmed is on a distinguished road
Hi,
I am new to OpenFOAM and eclipse. I am currently using OpenFOAM-2.3.x and eclipse 3.6.1 (Scientific Linux 6, KD Environment). I am using sprayFOAM for my work and I used the tutorial as mentioned in some of the posts above
  • To launch wmake, use: Code:
    $HOME/OpenFOAM/OpenFOAM-1.6/bin/foamExec wmake
    Update OpenFOAM version/path accordingly to your installation.
  • Likewise for launching the built solver; for example, to run icoFoam: Code:
    $HOME/OpenFOAM/OpenFOAM-1.6/bin/foamExec icoFoam
    Or even for extended completeness: Code:
    $HOME/OpenFOAM/OpenFOAM-1.6/bin/foamExec icoFoam -case $HOME/OpenFOAM/$USER-1.6/mytestcase
    This way it will run on the case "$HOME/OpenFOAM/$USER-1.6/mytestcase".
But when I run my project, I get the following error


" /home12233/tariq/OpenFOAM/tariq-2.3.x/platforms/linux64GccDPOpt/bin/mysprayFoam: error while loading shared libraries: libfiniteVolume.so: cannot open shared object file: No such file or directory"


and in the problems tab of eclipse,


" Invalid project path: Duplicate path entries found (/mysprayFoam [Include path] isSystemInclude:true includePath:/usr/local/intel/composer_xe_2013.4.183/mkl/include), path: [/mysprayFoam]. "




The eclipse is able to build the project but not run the project



**** Build of configuration Debug for project mysprayFoam ****

/home12233/tariq/OpenFOAM/OpenFOAM-2.3.x/bin/foamExec wmake all
+ wmake
make: `/home12233/tariq/OpenFOAM/tariq-2.3.x/platforms/linux64GccDPOpt/bin/mysprayFoam' is up to date.
+ wmake sprayEngineFoam
make: `/home12233/tariq/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/bin/sprayEngineFoam' is up to date.



I am able to run my case from the konsole terminal but not the eclipse. The eclipse is able to update the libraries but not run the project.


Many people posted the above error but no solution to this problem was given. It will be helpful if someone is able to guide me through this.
Tariq Ahmed is offline   Reply With Quote

Old   February 23, 2015, 09:56
Default
  #108
New Member
 
Jeroen Hofman
Join Date: Feb 2015
Location: The Netherlands
Posts: 15
Rep Power: 16
kenyi89 will become famous soon enough
Hi Tariq,

Regarding your error in libfiniteVolume.so, it is most likely caused by Eclipse not having the right environment variables set. Perhaps you could try starting a terminal, sourcing the etc/bashrc file in the OpenFOAM folder, and then launching Eclipse from that same terminal? That worked for me.

Kind regards,

Jeroen
kenyi89 is offline   Reply With Quote

Old   February 27, 2015, 09:51
Default Eclipse 3.6.1 works
  #109
New Member
 
Tariq Ahmed
Join Date: Jan 2015
Posts: 13
Rep Power: 11
Tariq Ahmed is on a distinguished road
Quote:
Originally Posted by kenyi89 View Post
Hi Tariq,

Regarding your error in libfiniteVolume.so, it is most likely caused by Eclipse not having the right environment variables set. Perhaps you could try starting a terminal, sourcing the etc/bashrc file in the OpenFOAM folder, and then launching Eclipse from that same terminal? That worked for me.

Kind regards,

Jeroen
Thanks Mr.Jeroen, Now I am able to run my case in eclipse. Sourcing from the terminal seems to work.

Regards,
tariq
Tariq Ahmed is offline   Reply With Quote

Old   October 8, 2017, 17:20
Default 'scalar' and 'label' are not recognized in NetBeans
  #110
New Member
 
Abiy Melaku
Join Date: Jul 2016
Location: Western University
Posts: 5
Rep Power: 10
abiy is on a distinguished road
Quote:
Originally Posted by benk View Post
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

hdiutil mount ~/OpenFOAM-1.6-ext-swak-Feb4.dmg
source ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc

logger "`dirname \"$0\"`/eclipse"

exec "`dirname \"$0\"`/eclipse" $@
2. Move this script to: /Applications/eclipse/Eclipse.app/Contents/MacOS/
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 :

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?

If you are using the NetBean as a code editor and use the wmake command on ur Linux terminal to compile your code, those errors actually don't produce any problem in the compilation process. However, if you want to get away from those errors you can define the 'scalar' as a 'double' value by the typedef syntax as follows inside the definition of your class contained in the *.H files. I have also included a similar solution for 'label' types in OpenFOAM using 'int' type, they are also not recognized by NetBeans usually.

Code:
typedef double scalar;
typedef int label;
abiy is offline   Reply With Quote

Reply


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



All times are GMT -4. The time now is 03:02.