CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Installation of OpenFOAM-2.1.0 on ubuntu 11.10 system (https://www.cfd-online.com/Forums/openfoam-installation/95907-installation-openfoam-2-1-0-ubuntu-11-10-system.html)

ebah6 January 7, 2012 01:55

Installation of OpenFOAM-2.1.0 on ubuntu 11.10 system
 
Hello everybody,

I am trying to get started with OpenFOAM on my ubuntu 11.10 but I run into difficulty very soon.
Following the instructions from: http://www.openfoam.org/download/source.php,
When I source the ~/.bashrc file, I get the following error messages:
================================
alpha@alpha-Lenovo-G455:~/OpenFOAM/OpenFOAM-2.1.0/etc$ source ~/.bashrc
bash: /opt/OpenFOAM-2.1.0/bin/foamEtcFile: No such file or directory
bash: /opt/OpenFOAM-2.1.0/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-2.1.0/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-2.1.0/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-2.1.0/etc/config/settings.sh: No such file or directory
bash: /opt/OpenFOAM-2.1.0/etc/config/aliases.sh: No such file or directory
bash: /opt/OpenFOAM-2.1.0/bin/foamEtcFile: No such file or directory
bash: /opt/OpenFOAM-2.1.0/bin/foamEtcFile: No such file or directory
bash: /opt/OpenFOAM-2.1.0/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-2.1.0/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-2.1.0/bin/foamCleanPath: No such file or directory
================================================== =============
I do not why it is pointing to the /opt/... directory.
I checked the bashrc in the OpenFOAM/OpenFOAM-2.1.0/etc/bashrc and I could read the following:
--------------------------------------------------
# Location of the OpenFOAM installation
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foamInstall=$HOME/$WM_PROJECT
# foamInstall=~$WM_PROJECT
# foamInstall=/opt/$WM_PROJECT
# foamInstall=/usr/local/$WM_PROJECT
#
# END OF (NORMAL) USER EDITABLE PART
#############
and few lines down in the same file I have:
# Source project setup files
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamSource $WM_PROJECT_DIR/etc/config/settings.sh
_foamSource $WM_PROJECT_DIR/etc/config/aliases.sh
-----------------------------------------------------------------

To the best of my understanding all the references to "/opt/..." are comment by the "#".

Can someone out there help see clear in this installation?

Thank you very much in advance.

alpha.

andyj January 7, 2012 04:09

I installed 2.1.0 on Ubuntu 11.10 using the packages for Ubuntu. No problems.

Look very carefully at your path
If your user name is alpha, the path would be /home/OpenFOAM/alpha-2.1.0
Also note the Capital Letters FOAM in OpenFoam.
http://linuxcommand.org/learning_the_shell.php

andyj January 7, 2012 04:17

When your source the bash in the text editor you have to click " save " in the menu bar of the text editor to save it in the bashrc
Then close the text editor.
Reopen the bashrc and see if you saved it before you closed it.
I think its the last line in bashrc according to the directions

wyldckat January 7, 2012 04:51

Greetings to all!

I believe the problem here is that a previous OpenFOAM installation is contaminating the shell environment.

Edit the file "$HOME/.bashrc" and remove any references to other OpenFOAM versions that aren't needed. Start a new terminal and you should no longer have that error.

In case you do need more than one version of OpenFOAM, then see this post: http://www.cfd-online.com/Forums/ope...tml#post338050 post #18.

Best regards,
Bruno

andyj January 7, 2012 04:58

If all else fails install with the Ubuntu Deb Packs

http://www.openfoam.org/download/ubuntu.php
Installing from source is harder.
I am no expert on installs.
close and reopen your command terminal and see if that helps
type pwd to see what directory your terminal is currently in
Opt is a default install location.
Anything different in the Openfoam instructions command prompt in the directions from your command prompt?
Watch out for capital letters, spaces and punctuation at the command prompt
also the " / " may not be necessary when using cd command
thats all I can think of..hope it helps

ebah6 January 7, 2012 04:59

Thanks Andy,

Before I saw your reply, I tried setting the environment by doing the following:
----------------------------
export FOAM_INST_DIR=OpenFOAM
foamDotFile=$FOAM_INST_DIR/OpenFOAM-2.1.0/etc/bashrc
[ -f $foamDotFile ] && . $foamDotFile
------------------------
After this I was able to source the ~/.bashrc file.

However when I run ./Allwmake, it runs untill some point and the laptop just goes off even though it doesn't seem to over heat.

In your answer, you talk about the ubuntu pack, if I understand properly you are following the instructions from this link: http://www.openfoam.org/download/ubuntu.php.
I did that early and the installation went find and by default I think the package is installed in /opt repository.
Then when I try to reproduce some of the user guide I run into trouble when doing the following:
------------
cd $FOAM_SOLVERS/incompressible/pisoFoam
wmake
-------------
with this I got some permission errors.
I tried with the su root command. But still the wmake didn't complete.

So few questions:
- can you copy past the link you followed so I can sure which one is being talked about?
- also when you suggest the path: /home/OpenFOAM/alpha-2.1.0, at what do I need to consider this one?

Thank you for your time.

andyj January 7, 2012 05:34

I had trouble with allmake installiing on Suse 12.1 with 2.1.0.
The part where you use your user name (alpha-2.1.0) is when you set up the tutorials in the user guide to run them..ie..incompressible/icoFoam/lid cavity example. Otherwise, the tutorials wont work.
There are a bunch of components to the wmake package. Do you have all the parts of wmake installed?
Directions are different for the source code vs Ubuntu Deb Packages
The Unity desktop is new in 11.10 It is a replacement for the Genome desktop. It may still have a few bugs..maybe not. Might want to update your Ubuntu with the system needed components that look like they are system only updates.
Closing and reopening the terminal seemed to help. Its also possible the source code has the newer kernel 3.2 in it, while 11.10 is kernel 3.0
http://openfoamwiki.net/index.php/Compiling/Building (wmake tips-usage)
http://www.tfd.chalmers.se/~hani/kur...OwnLaptop.html (these guys are pros!)
I can't remember, but I think allmake might need to be told to look inside of folders

andyj January 7, 2012 05:54

I also had trouble with the terminal using workspace switcher. I think its only intended for pdf files and webpages,..not operating system commands between workspaces.
My terminal had a problem with a correctly placed " / " at the very beginning of a command. I omitted it and was able to issue commands.
Be sure and update your video driver to the newest linux version for ati or nvida.
Is it ./Allmake or /.Allmake or ./allmake or ./allmake? The help for allmake would say the correct usage. Or the man pages for wmake.

andyj January 7, 2012 06:02

http://www.openfoam.org/download/ubuntu.php
the lines following are:
Ubuntu Deb Pack Installation

Version 2.1.0, released 19/12/11

Ubuntu Versions

OpenFOAM and Paraview are currently available for the following versions of Ubuntu:
  • 10.04 LTS, codename lucid
  • 11.04, codename natty
  • 11.10, codename oneiric

Installation

OpenFOAM and Paraview can be simply installed using the apt package management tool. The user will need to provide superuser password authentication when executing the following commands with sudo
  1. In a terminal window, add OpenFOAM to the list of repository locations for apt to search, by copying and pasting the following in a terminal prompt (Applications -> Accessories -> Terminal).

ebah6 January 8, 2012 20:51

Thank you all.

The links were very useful.


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