|
[Sponsors] |
February 20, 2014, 10:59 |
Eclipse & OpenFoam
|
#1 | ||
Senior Member
Join Date: Jan 2012
Posts: 166
Rep Power: 14 |
hi,
I just want to run the "multiphaseEulerFoam" solver without any case applied to it. I followed the manual in the following link: http://openfoamwiki.net/index.php/Ho...pse#Thanks_to_.. I have done the following steps: 1.Download Eclipse Kepler: www.eclipse.org/downloads/ and unpack the file 2.Start Eclipse and update it in Help -> Install New Software... ; Add ... with http://download.eclipse.org/tools/cdt/releases/galileo/ 3. Configure the interface in Window -> Show View -> C/C++ for C++ projects 4. Create a new project Files -> New -> C++ Project. I chose the solver folder (since solver is a application) for the location and for the project name i chose the solver name. 5. Right click my project and chose properties: ->C/C++ build: Deactivate the default build command and type in "wmake". ->C/C++ General->PathsandSymbols: Included all necessary folders. Problem: When I build the project I get the error: Quote:
Quote:
greetings maybee Last edited by maybee; February 23, 2014 at 12:47. |
|||
February 23, 2014, 11:22 |
|
#2 |
Senior Member
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17 |
hello maybee,
a google search on openfoam eclips gave me this: http://openfoamwiki.net/index.php/Ho...M_with_Eclipse I used this and it works fine for me. Hope this helps Wouter |
|
February 23, 2014, 12:50 |
|
#3 |
Senior Member
Join Date: Jan 2012
Posts: 166
Rep Power: 14 |
hi, this is the same manual I also used and posted the link (see first link of my first post) - still I get the described error message.
|
|
February 23, 2014, 15:53 |
|
#4 |
Senior Member
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17 |
Hello maybee,
You need to start eclipse from a terminal window where OF is sourced or use another command for wmake like described in one of the other links you get when googleing. Hope this helps more Wouter |
|
February 24, 2014, 07:45 |
|
#5 | |||
Senior Member
Join Date: Jan 2012
Posts: 166
Rep Power: 14 |
hi,
since I installed Eclipse like described here http://openfoamwiki.net/index.php/Ho...M_with_Eclipse I can t run it in the terminal, only getting the error message: Quote:
Code:
source $opt/openfoam221/etc/bashrc http://www.cfd-online.com/Forums/ope...-pisofoam.html Unfortunately I could not run the command Code:
source $opt/.bashrc Code:
source $etc/.bashrc bash: /.bashrc: File or Folder not found although the file exists. Total-Result: I still can t build my project, still getting : Build: Quote:
Quote:
greetings maybee |
||||
February 24, 2014, 16:53 |
|
#6 |
Senior Member
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17 |
hello maybee,
I do not know enough of linux to help you like wyldckat, but maybe I can help you a little. In the reference you gave there is mention to add the source ... to ~/.bashrc nothing to do with openfoam, just the bash file that is started when you start a terminal window. If you add the source ... to the end of this file and start a new terminal window you should be able to run wmake in the directory where Make is. Hope this helps wouter |
|
February 25, 2014, 06:25 |
|
#7 |
Senior Member
Join Date: Jan 2012
Posts: 166
Rep Power: 14 |
hi wouter,
I added now Code:
source $opt/openfoam221/etc/bashrc Other "bach files" available after search are: Code:
bash.bashrc in /usr/share/doc/adduser/examples/adduser.local.conf.examples dot.bashrc in /usr/share/base-files dot.bashrc in /usr/share/doc/adduser/examples/adduser.local.conf.examples/skel |
|
February 25, 2014, 15:54 |
|
#8 |
Senior Member
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17 |
hello Maybee,
As I told you before I am no expert,but here is a guide step by step. first step: in terminal: cd ~ second step: gedit .bashrc in this file at the bottom add: source /opt/openfoam221/etc/bashrc save and close close terminal next step open terminal type: eclipse This should start eclipse and you should be able to use wmake from eclipse as described Hope this helps Wouter |
|
February 26, 2014, 05:21 |
|
#9 |
Member
Björn Fabritius
Join Date: Mar 2009
Location: Freiberg, Germany
Posts: 31
Rep Power: 17 |
Hi maybee,
where did you install eclipse to? because the fact that you can't start eclipse from the terminal suggests that the path is not set correctly. Quoting from the wiki guide: "[...] start Eclipse from the terminal after setting the path variable." If you type Code:
which eclipse Code:
export PATH="$PATH:$HOME/eclipse/" Code:
$HOME/eclipse/eclipse Hope that helps! Bjoern |
|
February 26, 2014, 13:37 |
|
#10 |
Senior Member
Join Date: Jan 2012
Posts: 166
Rep Power: 14 |
@ wouter: Still does not work. Furthermore I already added
Code:
source /opt/openfoam221/etc/bashrc Still I get the error: Code:
application »eclipse« currently not installed. You can install it by: sudo apt-get install eclipse-platform Ok I can start now Eclipse after putting the folder with the executable into the home folder and adding the lines you described to the bash file. Now I get the error Code:
/opt/openfoam221/wmake/wmake all /opt/openfoam221/wmake/wmake: 181: /opt/openfoam221/wmake/wmake: ./Allwmake: Permission denied |
|
February 26, 2014, 14:35 |
|
#11 |
Member
Björn Fabritius
Join Date: Mar 2009
Location: Freiberg, Germany
Posts: 31
Rep Power: 17 |
You need to put your own code in a folder to which you have writing permission. /opt/openfoam is certainly write-protected. I guess your admin has installed OpenFOAM there for you.
Follow the instructions here http://www.csc.fi/english/research/s...penfoam/modsol to find out, how to create the directories in your $HOME folder, which files you need to compile a solver and so on. Also put your Eclipse project files there. (Linux is based on a restrictive rights management, so a "normal" user cannot break the system. But you have unlimited access to anything in your $HOME folder.) |
|
February 27, 2014, 22:18 |
|
#12 |
New Member
|
Hello maybee,
I also used the Eclipse following the instruction: http://openfoamwiki.net/index.php/Ho...M_with_Eclipse And it works, Here are my steps: 1.Download "Eclipse IDE for C/C++ Developers" from http://www.eclipse.org/downloads/ 2.Untar the file getting an folder "eclipse", move the folder to /usr/lib/ using root access. 3.Make a link so that eclipse can run in a terminal: cd /usr/bin sudo ln -s /usr/lib/eclipse/eclipse 4.Copy the slover folder to $HOME, so you can have the permission to edit them without root access. ...... |
|
February 28, 2014, 05:15 |
|
#13 |
Senior Member
Join Date: Jan 2012
Posts: 166
Rep Power: 14 |
@epi_c: I have done as you described. Also I have added the line
export PATH="$PATH:$usr/lib/eclipse/" OR export PATH="$PATH:$usr/lib/eclipse/eclipse" into the .bashrc file. But unfortunately I get the same error message as before: Code:
application »eclipse« currently not installed. You can install it by: sudo apt-get install eclipse-platform |
|
February 28, 2014, 06:50 |
|
#14 |
New Member
|
@maybee: Ok, I don't know what's your problem really is. If you don't mind, try what I did as follows (System information: Ubuntu 12.04 LTS, 32bit):
Tips: You don't have to edit the .bashrc file following my way, It is suggested that you delete your changes in .bashrc file befor installation. 1. Download JRE which Eclipse needs from http://www.oracle.com/technetwork/ja...s-1880261.html, the package suit for me is “jre-7u51-linux-i586.tar.gz” 2. Download "Eclipse IDE for C/C++ Developers" from http://www.eclipse.org/downloads/, the package is “eclipse-cpp-kepler-SR1-linux-gtk.tar.gz” (I put above two packages in $HOME/Downloads) 3. Install and set JRE: cd /usr/lib sudo mkdir java (The directory that JRE to be installed) cd java sudo mv $HOME/Downloads/jre-7u51-linux-i586.tar.gz . sudo tar xzf jre-7u51-linux-i586.tar.gz sudo rm jre-7u51-linux-i586.tar.gz (To save space) sudo update-alternatives --install /usr/bin/java java /usr/lib/java/jre1.7.0_51/bin/java 1 sudo update-alternatives --set java /usr/lib/java/jre1.7.0_51/bin/java 4. Install Eclipse: sudo mv $HOME/Downloads/eclipse-cpp-kepler-SR1-linux-gtk.tar.gz /usr/lib cd /usr/lib sudo tar xzf eclipse-cpp-kepler-SR1-linux-gtk.tar.gz sudo rm eclipse-cpp-kepler-SR1-linux-gtk.tar.gz cd /usr/bin sudo ln -s /usr/lib/eclipse/eclipse 5. Type "java --version" in a terminal to test whether JRE is installed correctly or not, 6. Type "which eclipse" to test whether you can run eclipse in a terminal or not 7. Run eclipse in a terminal, then you can do as http://openfoamwiki.net/index.php/Ho...M_with_Eclipse |
|
February 28, 2014, 07:27 |
|
#15 | |
Senior Member
Join Date: Jan 2012
Posts: 166
Rep Power: 14 |
hi thx a lot for the help,
but I still have some problems even with your manual. First of all the second package is Quote:
Secondly, when I run the command Code:
sudo mv $HOME/Downloads/jre-7u51-linux-i586.tar.gz Code:
Missing destination-file operator behind »/home/USER/Downloads/jre-7u51-linux-i586.tar.gz“ |
||
February 28, 2014, 07:42 |
|
#16 |
New Member
|
Ok, the first problem, you download the standard eclipse package, then after finishing my manual, you should install CDT plugin by hand. Or you should download from http://www.eclipse.org/downloads/pac...pers/keplersr1
The second, "sudo mv $HOME/Downloads/jre-7u51-linux-i586.tar.gz ." There is a "dot" that represent the CWD, type mv --help for more information |
|
February 28, 2014, 09:57 |
|
#17 |
Senior Member
Join Date: Jan 2012
Posts: 166
Rep Power: 14 |
Sorry for my fail ,
I' ll check this tomorrow or sunday. have a nice weekend. |
|
February 28, 2014, 10:44 |
|
#18 |
New Member
|
I just tried on my virtual machine with exact the same system (Ubuntu 12.04 LTS, 32bit), and it works, below are my command logs:
fran@lico:~$ cd /usr/lib/ fran@lico:/usr/lib$ sudo mkdir java [sudo] password for fran: fran@lico:/usr/lib$ cd java/ fran@lico:/usr/lib/java$ sudo mv $HOME/Downloads/jre-7u51-linux-i586.tar.gz . -alternative command$ sudo mv $HOME/Downloads/jre-7u51-linux-i586.tar.gz /usr/lib/java)) fran@lico:/usr/lib/java$ sudo tar xzf jre-7u51-linux-i586.tar.gz fran@lico:/usr/lib/java$ sudo rm jre-7u51-linux-i586.tar.gz fran@lico:/usr/lib/java$ sudo update-alternatives --install /usr/bin/java java /usr/lib/java/jre1.7.0_51/bin/java 1 update-alternatives: using /usr/lib/java/jre1.7.0_51/bin/java to provide /usr/bin/java (java) in auto mode. fran@lico:/usr/lib/java$ sudo update-alternatives --set java /usr/lib/java/jre1.7.0_51/bin/java fran@lico:/usr/lib/java$ java --version Unrecognized option: --version Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. fran@lico:/usr/lib/java$ java -version java version "1.7.0_51" Java(TM) SE Runtime Environment (build 1.7.0_51-b13) Java HotSpot(TM) Client VM (build 24.51-b03, mixed mode) fran@lico:/usr/lib/java$ sudo mv $HOME/Downloads/eclipse-cpp-kepler-SR1-linux-gtk.tar.gz /usr/lib fran@lico:/usr/lib/java$ cd /usr/lib/ fran@lico:/usr/lib$ sudo tar xzf eclipse-cpp-kepler-SR1-linux-gtk.tar.gz fran@lico:/usr/lib$ sudo rm eclipse-cpp-kepler-SR1-linux-gtk.tar.gz fran@lico:/usr/lib$ cd /usr/bin/ fran@lico:/usr/bin$ sudo ln -s /usr/lib/eclipse/eclipse fran@lico:/usr/bin$ which eclipse /usr/bin/eclipse fran@lico:/usr/bin$ eclipse I made a mistake, the command "java --version" should replace with "java -version". While using eclipse, some setup files will be written in the project folder, so it is suggested that you copy the solver's source file folder to $HOME/***, i.e. $HOME/OpenFOAM. May you success! Last edited by epi_c; February 28, 2014 at 21:27. |
|
March 2, 2014, 13:18 |
|
#19 | |
Senior Member
Join Date: Jan 2012
Posts: 166
Rep Power: 14 |
Hi again,
this worked now fine for me and I m able to start eclipse. When building my project now (the solver) I get the output Quote:
If I try to build I get Code:
Launch failed. Binary not found! Last edited by maybee; March 3, 2014 at 05:22. |
||
March 2, 2014, 21:23 |
|
#20 |
New Member
|
Morning,
As I mentioned before, while using eclipse some setting files with prefix "." (.project, .cproject) will be written into project folder, and, when execute command like wmake, new files like "*.dep, *.o" will be written into project folder too. So, even you are the owner of Allwmake (which means that you can execute Allwmake without root access), the command wmake called in the script will need root access to write files into directory (except $HOME). The solutions can be: 1. Launch eclipse in a terminal with command "sudo eclipse", then you can have root access during the whole time. or: 2. Copy the project folder into somewhere in $HOME, so you can run eclipse in a terminal with command "eclipse". ....As I know, compiling a single solver has nothing to do with the script Allwmake, you should remove unrelated files like Allwmake away. I found a Allwmake under applications/solvers/incompressible/simpleFoam, and its only function is to compile solvers SRFSimpleFoam and porousSimpleFoam. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFOAM Foundation releases OpenFOAM 2.2.2 | opencfd | OpenFOAM Announcements from ESI-OpenCFD | 0 | October 14, 2013 08:18 |
ESI-OpenCFD Releases OpenFOAM v2.2.0 | opencfd | OpenFOAM Announcements from ESI-OpenCFD | 13 | March 30, 2013 17:52 |
[Gmsh] gmsh 2.6.0 conversion to OpenFoam 160 | rosswin | OpenFOAM Meshing & Mesh Conversion | 0 | March 5, 2013 08:34 |
64bitrhel5 OF installation instructions | mirko | OpenFOAM Installation | 2 | August 12, 2008 19:07 |
OpenFOAM Training and Workshop | Hrvoje Jasak | Main CFD Forum | 0 | October 7, 2005 08:14 |