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

Wmake C and KDevelop for a Foam project

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 20, 2005, 20:54
Default Hi folks, has anyone tried
  #1
New Member
 
Ron W Cresswell
Join Date: Mar 2009
Posts: 18
Rep Power: 17
roncresswell is on a distinguished road
Hi folks,

has anyone tried to set up and use KDevelop under linux to manage a Foam project? I was wondering how good it is and whether I should consider it?

Ron
roncresswell is offline   Reply With Quote

Old   January 1, 2008, 07:35
Default Hi there, Interesting idea
  #2
New Member
 
Yingfeng Shen
Join Date: Mar 2009
Location: Finland
Posts: 8
Rep Power: 17
yingfeng is on a distinguished road
Hi there,

Interesting idea for me too since I am using kdevelop 3.5.0 recently, and I really enjoyed the nice editor. A simple procedure I found is:

1. assume the project is already sitting under a folder and can be compiled with wmake

2. create a script named foamK
. /home/yshen/OpenFOAM/OpenFOAM-1.4.1-dev/wmake/wmake
kdevelop

the first line sets up OpenFoam environment, the second line starts kdevelop

chmod a+x foamK
copy foamK to /usr/local/bin

3. run foamK to start kdevelop.

4. go to Project -> Importing existing project to add all the files

5. under Project -> Project Options, choose Build Options->Other, set the name of build script to
/home/username/OpenFOAM/OpenFOAM-1.4.1-dev/wmake/wmake, you can find your path by typing 'which wmake' in your terminal

6. you would need to add '-DFULLDEBUG -g -O0' to your Make/option file in order to debug the executable in kdevelop

happy new year!
Yingfeng
yingfeng is offline   Reply With Quote

Old   January 1, 2008, 14:44
Default If you're looking for alternat
  #3
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
If you're looking for alternatives, I'd suggest NetBeans. I've configured it with OpenFOAM, and the procedure is descibed here:
http://openfoamwiki.net/index.php/Configure_NetBeans
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   January 3, 2008, 14:52
Default Dear Sandeep, tried NetBean
  #4
Member
 
sradl's Avatar
 
Stefan Radl
Join Date: Mar 2009
Location: Graz, Austria
Posts: 82
Rep Power: 18
sradl is on a distinguished road
Dear Sandeep,

tried NetBeans, however it does not work with OF 1.4. It tells me that it could not find the Make directory (needed by wmake)!

How does NetBeans know where the Make directory is?
sradl is offline   Reply With Quote

Old   January 3, 2008, 15:25
Default It does work. I'm using it rig
  #5
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
It does work. I'm using it right now.

All that you're doing here is modifying NetBeans to call (the modified) wmake, which requires the Make directory (instead of gmake, which Netbeans assumes by default).

Could you post your output?
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   January 4, 2008, 03:47
Default Hi Sandeep, problem solved,
  #6
Member
 
sradl's Avatar
 
Stefan Radl
Join Date: Mar 2009
Location: Graz, Austria
Posts: 82
Rep Power: 18
sradl is on a distinguished road
Hi Sandeep,

problem solved, I just had to direct netBean to the correct source directory.

Thanks in advance
sradl is offline   Reply With Quote

Old   January 4, 2008, 06:05
Default Dear Sandeep, although I'm
  #7
Member
 
sradl's Avatar
 
Stefan Radl
Join Date: Mar 2009
Location: Graz, Austria
Posts: 82
Rep Power: 18
sradl is on a distinguished road
Dear Sandeep,

although I'm starting to like netBeans, I have a problem:

when I navigate to an include-file that lives anywhere else (e.g. fvCFD.H), there are some include statements (e.g. Time.H) that are underlined in red, i.e., they are not sourced correctly. Only *.H files in the same directory as the sourced file fvCFD.H are not underlined. However, I'm sure that they are sourced (in the Tools->Options->Code Assistance/C++Compiler-Include Directories) and I can navigate to them when they are included in the project files (e.g., when I include Time.H in the solver's C-file, I can navigate to Time.H)!

Any idea how to get rid of this so that I can navigate conveniently to sub-sourced files?

br
Stefan
sradl is offline   Reply With Quote

Old   January 4, 2008, 11:18
Default Are you adding the lnInclude d
  #8
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
Are you adding the lnInclude directories under code-assistance? You'd be able to see all the necessary headers that way...

Sandeep
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   January 19, 2008, 06:25
Default Hi folks, I have just install
  #9
Member
 
Giovanni Caramia
Join Date: Mar 2009
Location: Bari, ITALY
Posts: 58
Rep Power: 17
karamiag is on a distinguished road
Hi folks,
I have just installed OF 1.4.1 and NetBeans 6.0, put nbmake_1.4.1 in $WM_PROJECT_DIR/wmake, changed the Make Command to the new script (as suggested in the openfoamwiki) and added all the lnInclude directories under code-assistance. Now I want to modify and compile the file

~/OpenFOAM/OpenFOAM-1.4.1/src/turbulenceModels/compressible/kEpsilon/kEpsilon.C

I start netbeans, open a new project, select C/C++ under Categories, and C/C++ Application under Projects; after this I have to provide a directory name for Project Name and Project Location. I have to provide a specific directory name and Project Location?
The problem is that right clicking kEpsilon.C and selecting "compile file", the compilation fails. The output is this


Running "rm -rf build/Release/GNU-Linux-x86/kEpsilon/kEpsilon.o" in /home/nettis/OpenFOAM/OpenFOAM-1.4.1/src/turbulenceModels/compressible


Clean successful. Exit value 0.

Running "/home/nettis/OpenFOAM/OpenFOAM-1.4.1/wmake/nbmake_1.4.1 -f nbproject/Makefile-Release.mk build/Release/GNU-Linux-x86/kEpsilon/kEpsilon.o" in /home/nettis/OpenFOAM/OpenFOAM-1.4.1/src/turbulenceModels/compressible

g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/nettis/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -I/home/nettis/OpenFOAM/OpenFOAM-1.4.1/src/meshTools/lnInclude -I/home/nettis/OpenFOAM/OpenFOAM-1.4.1/src/thermophysicalModels/basic/lnInclude -IlnInclude -I. -I/home/nettis/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC Make/linux64GccDPOpt/turbulenceModel.o Make/linux64GccDPOpt/newTurbulenceModel.o Make/linux64GccDPOpt/laminar.o Make/linux64GccDPOpt/kEpsilon.o Make/linux64GccDPOpt/RNGkEpsilon.o Make/linux64GccDPOpt/LaunderSharmaKE.o Make/linux64GccDPOpt/LRR.o Make/linux64GccDPOpt/LaunderGibsonRSTM.o Make/linux64GccDPOpt/realizableKE.o Make/linux64GccDPOpt/SpalartAllmaras.o Make/linux64GccDPOpt/kOmegaSST.o Make/linux64GccDPOpt/mutStandardRoughWallFunctionFvPatchScalarField.o -L/home/nettis/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt \
-lOpenFOAM -liberty -ldl -lm -o OpenFOAM.out
/usr/lib/../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'

Thanks,
Giovanni
karamiag is offline   Reply With Quote

Old   January 19, 2008, 11:50
Default Hi Giovanni, you are compil
  #10
Member
 
Luca M.
Join Date: Mar 2009
Location: Luzern, Switzerland
Posts: 59
Rep Power: 17
luca is on a distinguished road
Hi Giovanni,

you are compiling your code like a standalone program instead of a library. Turbulence model is a library and the right option is wmake libso if you choose shared object libraries. Just put the option libso in the options of your development environment.

Enjoy

Luca
luca is offline   Reply With Quote

Old   January 19, 2008, 11:58
Default Well, the issue is that you're
  #11
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
Well, the issue is that you're trying to compile to a shared library (.so), whereas gcc was expecting an application and therefore, a reference to main.

This is easy enough to handle - wmake (or, in this case, nbmake) is expecting an additional parameter, libso to make a shared lib. This would require a little parse-coding in the nbmake script. Or, you could live with it at the moment by typing wmake libso at the command line, each time you want to compile to a library.

Hope this helps.
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   January 19, 2008, 14:40
Default OK, I think I will use "wmake
  #12
Member
 
Giovanni Caramia
Join Date: Mar 2009
Location: Bari, ITALY
Posts: 58
Rep Power: 17
karamiag is on a distinguished road
OK, I think I will use "wmake libso" at the command line! But, is there a case in which I can make a compilation using netbeans? Can you give me an example of file/s in the src directory? If I can't compile why I have to use nbmake?

Thanks again for your patience.
karamiag is offline   Reply With Quote

Old   January 21, 2008, 12:59
Default Hi, I tried to create a kde
  #13
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17
johndeas is on a distinguished road
Hi,

I tried to create a kdevelop project to manage my code. However, the code completion seems not to be working. I imported my application directory as a generic c++ application, then, in Project/project options/c++ support, I added

.;/home/vinz/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude;/home/vinz/OpenF OAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude;

as a custom include paths.

Am I missing something ?

Vincent
johndeas is offline   Reply With Quote

Old   January 23, 2008, 10:21
Default Giovanni, Netbeans (or any
  #14
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
Giovanni,
Netbeans (or any IDE, for that matter) is just a front-end for code development. It will still rely on make/wmake/gcc for the actual compilation process. I'll admit that the nbmake script is very rudimentary, and still requires a lot of work. I use it to develop custom applications, rather than modifications to the existing libraries.

John,
I haven't tried kdevelop, but a little more specifics about the problem would be useful.
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   July 23, 2008, 17:52
Default I'm trying to use KDevelop 3.5
  #15
New Member
 
Kent S Kapitan
Join Date: Mar 2009
Posts: 3
Rep Power: 17
kent_kapitan is on a distinguished road
I'm trying to use KDevelop 3.5 for OpenFOAM-1.5 and haven't had much luck. If anyone has succesfully managed to develop openFOAM projects within KDevelop I would welcome an example of your method. For example, if I wanted to compile/link/debug the icoFoam/cavity tutorial, how would I go about importing it into KDevelop, and what Project Options should I set ? Thank you.
kent_kapitan is offline   Reply With Quote

Old   March 3, 2009, 10:02
Default thanks jiayuan jin
  #16
New Member
 
Jiayuan Jin
Join Date: Mar 2009
Posts: 8
Rep Power: 17
openfoam15 is on a distinguished road
thanks

jiayuan jin
openfoam15 is offline   Reply With Quote

Old   June 25, 2009, 22:28
Default kdevelop or netbean is better?
  #17
Member
 
xianghong wu
Join Date: Mar 2009
Posts: 57
Rep Power: 17
wendywu is on a distinguished road
Hi,
I am doing some modification to standard solvers. when the solver runs, I want to know where it has mistakes, so is kdevelop or netbean the software I can use? which one is better for OpenFOAM-1.5? are they all free software?
Thank you for any advice.

Wendy
wendywu is offline   Reply With Quote

Old   June 26, 2009, 05:28
Default
  #18
New Member
 
Gunnar Werte
Join Date: Jun 2009
Posts: 7
Rep Power: 16
gunnar is on a distinguished road
>which one is better for OpenFOAM-1.5?
none
>are they all free software?
http://lmgtfy.com/?q=netbeans
http://lmgtfy.com/?q=kdevelop
gunnar is offline   Reply With Quote

Old   June 27, 2009, 11:16
Default
  #19
Member
 
xianghong wu
Join Date: Mar 2009
Posts: 57
Rep Power: 17
wendywu is on a distinguished road
Thank you.
I will try netbeans. It seems kdevelop is more complicated when downloading.

Wendy
wendywu is offline   Reply With Quote

Old   June 29, 2009, 02:30
Default
  #20
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,686
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
My coworker uses eclipse (www.eclipse.org) with the C++ development tool (http://www.eclipse.org/cdt) and egit (http://git.or.cz/gitwiki/EclipsePlugin) the eclipse git plugin - he seems happy with the combination.
olesen 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with wmake ivan_cozza OpenFOAM Programming & Development 14 June 30, 2013 07:34
Error with Wmake skabilan OpenFOAM Installation 3 July 28, 2009 00:35
Wmake problem thumthae OpenFOAM Installation 12 December 3, 2008 09:30
How should one debug a solver using KDevelop kar OpenFOAM Installation 5 July 28, 2008 16:36
Manage openfoam solver project in KDevelop probably the last linker error any suggestion is welcome lakeat OpenFOAM Installation 0 July 7, 2007 10:01


All times are GMT -4. The time now is 10:00.