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

Adventure of fisrst openfoam installation on Ubuntu 710

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 24, 2008, 15:25
Default Adventure of installing openFo
  #1
New Member
 
Juhani Aittamaa
Join Date: Mar 2009
Posts: 2
Rep Power: 0
jussi is on a distinguished road
Adventure of installing openFoam on Ubuntu 7.10

I just managed to run the first OpenFOAM tutorial after some frustrating exercises. All of the main problems were caused by the total ignorance of linux system, combined with lacking knowledge of the Ubuntu 7.10 installation and OpemFOAM 1.4.1.

Actually i also build a complete new system running on Asus AM2 type M2N32-SLI deluxe/wif motherboard with Asus Gf 8500gt Pcie graphics card and AMD Phenom 9600 quad-core processor with 8 Gb memory with two 750 Gb Samsung HD753LJ hard drives and CD drive. That was bought on March 23.

Assembling the hard ware caused no problems, but the system did not start. Power was set on, cooler blowers started but they died after few seconds. After several deassembling and reassembling piece by piece i took the hard ware back to the shop from where the pieces were bought. The shop service acted promptly updated the bios and the hardware started nicely after that. Thanks Mikromaja.

That mother board has build in RAID on SATA II drives. I did put that on to mirror the disks. Seem to work nice on "bios" level.

Then i loaded the Ubuntu 7.10 system from CD-drive. I was supprised how easy that was after several experiences with windows operating systems. The only problem seemed to be that the RAID build on bios level was not seen at Ubuntu level, instead two disks were seen. While the system seemed to work i did not bother on that. Ubuntu has very nice package updating system called synaptic, i loaded all available up dates, and considered the system to be update.

Then i down loaded the openFOAM linux64 version and decompressed the files in OpenFOAM directory. That seemed to work like in the movies. Then the adventure on linux and OpenFOAM started really started.


I read the release notes and read me files and also the web html files. Even thought I thought that i knew the words and understud something, most of topics was guess work or matters that i had not a lightest grip.

As i said i managed to create the file structure


The linux64_tiedostot just contains the copies of compressed linux64 files.

Then i started to go through the read me file. Managed to source the OpenFOAM /.bashrc file.

The critical part at the end of the bashrc looks like this

...... $HOME/.bashrc file end
# OpenFOAM definitions
export WM_64=on
. $HOME/OpenFOAM/OpenFOAM-1.4.1/.OpenFOAM-1.4.1/bashrc
#

Instead of the dot at he beginning of the line you can also place word source and ..
# OpenFOAM definitions
export WM_64="on"
source $HOME/OpenFOAM/OpenFOAM-1.4.1/.OpenFOAM-1.4.1/bashrc
#

Note the order of export and source commands. It seems that anything instead of "on" also works except empty.


Then went to build the system from source files. Some problems was created.

After running the foamInstallationTest several errors were created. One message told that rsh and ssh were not working properly. Solution was to go to the package updater synaptic and load open ssh and include it into the system. That made the ssh sytem inside OpenFOAM operable. rsh is not working but it is mentioned in the OpenFOAM tests that rsh is not required, ssh is enough.


If you miss the export WM_64="on" in .bashrc file (as I did) you will use 32 bit system instead of 64 bit system. That will create mismatch between linux and linux64 directory. Running the foamInstallationTest reveales links between Foam variable names and the actual files. The linux64 files are all decompressed in the linux64 directory not in linux directory as some OpenFOAM symbols were pointing to. The real problem here was incorrect setting of the system type ($WM_64 variable was not set properly). That is clearly described in read me file appendix.

the user must set the environment variable $WM_64 (to anything, e.g. "on") before sourcing the .OpenFOAM/bashrc (or cshrc) file.

I noticed that while reading the instructions making the installation, but I did not understand how to do what was required. After reading the discussions on OpenFOAM web pages I found the solution, thanks Christian Wesemeyer. Putting that export statement in a simpler form and sourcing in correct order solved that problem.

Hi,
I'm not sure, if this helps (I'm using SuSE 10.2), but I've added the following lines to my .bashrc file (which is located in my home directory [/home/wagner/cwe] ):

export WM_SYS=`uname -i`
if [ $WM_SYS = "x86_64" ] ; then
export WM_64=on
fi

. /home/wagner/cwe/OpenFOAM/OpenFOAM-1.4.1/.OpenFOAM-1.4.1/bashrc

The scripts automatically detects the 64bit environment (if you have "uname" installed) and sets the needed variable.
It might be helpfull if you're using a nfs share for your home directory on different machines, where some are 64 and some are 32 bit (so as I do).

After that I run the allwmake and compiled the whole package. This time it even did something and the whole operation took some time.

Then I went to the first tutorial. Copied the tutorial examples and run from terminal the first cavity tutorial. Problem was solved fast and the solving progress was reported on screen from zero time to 0.5 seconds. I also managed to start FoamX and study the case by it.

Peculiarity in the reported solution on screen was that no iterations were required to obtain the converged solution. I did not manage to start paraFoam. System died and claimed that


${HOME}/OpenFOAM/linux64/paraview-2.4.4/lib/paraview-2.4/paraview-real: error while loading shared libraries: libtcl8.4.so: cannot open shared object: No such file or directory


Discussion of Jason Hoogland and Andreas Birgel helped to advance.

By Jason Hoogland on Thursday, April 12, 2007 - 08:14 pm: Edit Post
Problem:
When running paraview on 64 bit gentoo:

${HOME}/OpenFOAM/linux64/paraview-2.4.4/lib/paraview-2.4/paraview-real: error while loading shared libraries: libtcl8.4.so: cannot open shared object: No such file or directory

Cause:
Old tcl/tk installation on machine.

Solution:
Install/upgrade to tcl/tk-8.4 .

Outcome:
paraview now works fine.

Jason


However, with a zero knowledge of linux there were some challenges to make the instructions as a working procedure. First I went to package loader synaptic again, looked anything like tcl and tk8 loaded latests versions tcl 8.4 and tk8.4.




By Andreas Birgel on Saturday, September 22, 2007 - 01:00 pm: Edit Post
Same problem occured under ubuntu 7.04. 64 bit.

Same solution, but additional on that created two links:

libtcl8.4.so -> libtcl8.4.so.0
libtk8.4.so -> libtk8.4.so.0

Andi


To make the dynamic links was an other challenge. I found the man command to help the form of the command. But where to put them. First I searched the suitable .bashrc file. Then I found that those should be make in /usr/lib64/ directory. There was not that file in my system. That instruction was for an older system. Finally I got a hint to use locate command on terminal. That command revealed the path of the libraries.
After that I could navigate the terminal to /usr/lib/ directory and using the

sudo ln -s libtcl8.4.so.0 libtcl8.4.so

command twice both to tcl and tk libraries created the two requested links

libtcl8.4.so -> libtcl8.4.so.0
libtk8.4.so -> libtk8.4.so.0

Those two commands seemed to create two files that contained the required dynamic links. (You can study contents of those files with emacs editor)

The effect of the locate command below was done after the links were made operable.

locate libtk8.4.so
/usr/lib/libtk8.4.so
/usr/lib/libtk8.4.so.0



After making these changes the paraFoam started, I also managed to make the first cavity run from FoamX and this time it also iterated few rounds while performing the calculations.

Finally it seems that I am in a position to study further the tutorial examples.

One additional point. To make running and monitoring easier please load binutils-dev package into your system.


To make life easier you can make your system fit for openFoam before installation.

with synaptic load the required packages
load ssh,
load tcl8 and tk8
load g++
load bunutils-dev

make the dynamic links that paraFoam requires tcl8 and tk8 in some of the openfoam path files

sudo ln -s libtcl8.4.so.0 libtcl8.4.so
sudo ln -s libtk8.4.so.0 libtk8.4.so


then modify .basrhc file with
export $WM_64="on" and the source command
source $HOME/OpenFOAM/OpenFOAM-1.4.1/.OpenFOAM-1.4.1/bashrc


and then proceed with the instructions of read me and release notes.

Hopefully this helps. (Now it might be time to start leaning how to do the same on Ubuntu 8.04).

Good luck
jussi is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble with installing OpenFOAM on Ubuntu Milos OpenFOAM Installation 16 November 16, 2009 03:44
Ubuntu AMD64 Installation Troubles mkw87 OpenFOAM Installation 31 April 27, 2008 14:59
OpenFOAM installation Mark Main CFD Forum 2 March 29, 2008 08:45
OpenFOAM installation on AIX 53 with gnu 40 compiler chauvin OpenFOAM Installation 3 June 15, 2006 14:12
Installing OpenFOAM in Ubuntu LINUX 510 Breeze derjames OpenFOAM Installation 0 April 7, 2006 09:22


All times are GMT -4. The time now is 07:44.