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

Eclipse for OpenFOAM

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree16Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   January 17, 2014, 10:47
Default
  #101
Senior Member
 
louisgag's Avatar
 
Louis Gagnon
Join Date: Mar 2009
Location: Québec, QC, Canada
Posts: 208
Rep Power: 9
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, 09:20
Default
  #102
Member
 
Join Date: Nov 2012
Posts: 57
Rep Power: 4
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 08:25.
Henning86 is offline   Reply With Quote

Old   September 26, 2014, 04:17
Default
  #103
Senior Member
 
louisgag's Avatar
 
Louis Gagnon
Join Date: Mar 2009
Location: Québec, QC, Canada
Posts: 208
Rep Power: 9
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: 10
Rep Power: 2
kenyi89 is on a distinguished road
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: 12
Rep Power: 2
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: 10
Rep Power: 2
kenyi89 is on a distinguished road
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: 12
Rep Power: 2
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

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On



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