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

install openfoam in fedora

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

Like Tree1Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   February 23, 2010, 18:07
Thumbs up install openfoam in fedora
  #1
Senior Member
 
Ahmed Khattab's Avatar
 
ahmed
Join Date: Feb 2010
Posts: 161
Blog Entries: 1
Rep Power: 7
Ahmed Khattab is on a distinguished road
please i use fedora 12 and i want to install openfoam for my first time.

how can i install it ?
is fedora (bash or ksh) or (csh or csh)

to install gcc-4.3.3 read me file told me to
Install the compiler in:

$WM_PROJECT_INST_DIR/ThirdParty/gcc-<GCC_VERSION>/platforms/$WM_ARCH$WM_COMPILER_ARCH/
and change the gcc version number in $WM_PROJECT_DIR/etc/settings.sh and
$WM_PROJECT_DIR/etc/settings.csh appropriately and finally update the
environment variables as in section 3.
i don't understand this

1- what is $wm
2- where the compiler
Ahmed Khattab is offline   Reply With Quote

Old   February 24, 2010, 06:47
Default
  #2
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 382
Rep Power: 9
gwierink is on a distinguished road
Hi Ahmed,

OpenFOAM can happily run on Fedora, no worries.

Quote:
how can i install it ?
Download the right (i.e. 32 or 64 bit) packages from OpenCFD. If you don't know whether you have 32 or 64 bit linux, open up a terminal and type
Code:
uname -m
When you see "x86_64" it is 64 bit, when you see something like "i686" it is 32 bit.

Then, make a directory called "OpenFOAM" in your home directory
Code:
mkdir OpenFOAM
Put the downloaded files in the OpenFOAM directory and unpack them with
Code:
tar xzf OpenFOAM-1.6.General.gtgz
and so on for the other three files as well. It is important you unpack the packages labelled "General" first.
Now open up ".bashrc" in the home directory with
Code:
gedit ~/.bashrc
(don't forget the dot (".") before "bashrc") and add the line (again, don't forget the dot (".") at the beginning):
Code:
. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc
Finally, update the shell by (note the dots again)
Code:
. $HOME/.bashrc
That should do the trick. You can check the installation with
Code:
foamInstallationTest
Quote:
is fedora (bash or ksh) or (csh or csh)
Fedora uses a bash shell.

Quote:
to install gcc-4.3.3 read me file told me to
Install the compiler in:
$WM_PROJECT_INST_DIR/ThirdParty/gcc-<GCC_VERSION>/platforms/$WM_ARCH$WM_COMPILER_ARCH/
and change the gcc version number in $WM_PROJECT_DIR/etc/settings.sh and
$WM_PROJECT_DIR/etc/settings.csh appropriately and finally update the
environment variables as in section 3.
i don't understand this
ThirdParty should come with a gcc compiler, but if you have the possibility it is better to build your own compiler. "$WM_PROJECT_INST_DIR" is the ~/OpenFOAM directory you created in the beginning. So, suppose you install gcc-4.3.3 on a 64 bit linux machine, then
Code:
$WM_PROJECT_INST_DIR/ThirdParty/gcc-<GCC_VERSION>/platforms/$WM_ARCH$WM_COMPILER_ARCH/
is
Code:
~/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/
("~" means your home directory, your case perhaps /home/ahmed/). So that's the path you can put your new gcc in. Then, you need the make OpenFOAM aware of this by making sure that in the file $WM_PROJECT_DIR/etc/settings.sh the right version of gcc is exported. In settings.sh (on line 121 (I think )) it reads something like
Code:
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/gcc-4.3.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/gcc-4.3.1
Now, make sure that the version numbers (above "4.3.1") are the right numbers (i.e. change them to "4.3.3", if that is what you're using). Again, just do
Code:
gedit $WM_PROJECT_DIR/etc/settings.sh
fix the line and save. In Fedora you don't need to change settings.csh.

Quote:
1- what is $wm
I guess the above should explain that.

Quote:
2- where the compiler
It should live in $HOME/OpenFOAM/ThirdParty. The latest version you can get from the GCC website.

Quote:


Hope this helps you on your way a bit!
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   February 27, 2010, 04:23
Default
  #3
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 8
maysmech is on a distinguished road
Dear gwierink

Thank you very very much for your useful guides.
one question is that i couldn't install on home dir because of permission denied error so i install it on home/user dir. is that make problem later?
maysmech is offline   Reply With Quote

Old   February 27, 2010, 09:55
Default
  #4
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 382
Rep Power: 9
gwierink is on a distinguished road
Hi maysmech,

You're very welcome, glad I could be of any help!

Quote:
i couldn't install on home dir because of permission denied error
That's not a problem, nor strange . "$HOME" means "/home/maysmech" (if your user account is called "maysmech"). If you install OpenFOAM in "/home/" you're basically making a user called "OpenFOAM" where probably only root has write permission. In other words, you did the right thing by putting OF in your user directory . Happy foaming!
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   February 27, 2010, 13:21
Default
  #5
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 8
maysmech is on a distinguished road
thanks
i install it and when doing 1st tutorial, writing paraFoam this message is seen.

paraFoam -case $FOAM_RUN/tutorials/incompressible/icoFoam/cavity
created temporary 'cavity.OpenFOAM'
/home/maysam/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/platforms/linux64Gcc/bin/paraview-real: error while loading shared libraries: libssl.so.0.9.8: cannot open shared object file: No such file or directory

i installed all 5 files in OpenFOAM website so why i cant see mesh at parafoam as written in tutorial pdf?

Last edited by maysmech; February 27, 2010 at 15:58.
maysmech is offline   Reply With Quote

Old   February 27, 2010, 14:45
Default
  #6
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 382
Rep Power: 9
gwierink is on a distinguished road
Hmm, have a look at this thread and this thread. There people had the same/similar problem and soft linked libssl.so.9.8 by

Code:
ln -s /usr/lib64/libssl.so.0.9.8k /usr/lib64/libssl.so.0.9.8
and/or

Code:
ln -s /lib64/libssl.so.0.9.8b /lib64/libssl.so.0.9.8 
ln -s /lib64/libcrypto.so.0.9.8b /lib64/libcrypto.so.0.9.8 
ln -s /usr/lib64/elfutils/libebl_x86_64-0.125.so /lib64/libelf.so.0
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   February 27, 2010, 15:09
Default
  #7
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 8
maysmech is on a distinguished road
i used readme of openfoam site http://www.openfoam.com/docs/README.php#README

  • cd $WM_THIRD_PARTY_DIR
  • rm -rf paraview-3.6.1/platforms
  • makeParaView
The PV3FoamReader module is an OpenFOAM utility that can be compiled in the usual manner as follows:
  • cd $FOAM_UTILITIES/postProcessing/graphics/PV3FoamReader
  • ./Allwclean
  • ./Allwmake


now my error changes to:

/home/maysam/OpenFOAM/OpenFOAM-1.6/bin/paraFoam: line 129: paraview: command not found

Last edited by maysmech; February 27, 2010 at 15:57.
maysmech is offline   Reply With Quote

Old   February 27, 2010, 15:23
Default
  #8
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 382
Rep Power: 9
gwierink is on a distinguished road
Quote:
/home/maysmech/OpenFOAM/OpenFOAM-1.6/bin/paraFoam: line 129: paraview: command not found
Right, did you export the path to ParaView in .bashrc?

Code:
gedit $HOME/.bashrc &
and add

Code:
PATH= <path_to_paraview>:$PATH
export PATH
where <path_to_paraview> is your path to ParaView. In my case it is
Code:
PATH=/home/gijsbert/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/bin:$PATH
export PATH
but at the moment I'm on a machine that only has 1.5-dev installed, so I can't check it at the moment . Have a look where paraview lives on your system and add the right path. Then, don't forget to update the shell with
Code:
. $HOME/.bashrc
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   February 27, 2010, 15:25
Thumbs up thank you
  #9
Senior Member
 
Ahmed Khattab's Avatar
 
ahmed
Join Date: Feb 2010
Posts: 161
Blog Entries: 1
Rep Power: 7
Ahmed Khattab is on a distinguished road
really i thank you for your reply and being patient with me.
thank you
Ahmed Khattab is offline   Reply With Quote

Old   February 27, 2010, 15:29
Default
  #10
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 382
Rep Power: 9
gwierink is on a distinguished road
No worries, glad to help, you're welcome . I also started as a beginner .
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   February 27, 2010, 15:32
Default
  #11
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 8
maysmech is on a distinguished road
i find directories to paraview directory but not more because not same as your format!

/home/maysmech/OpenFOAM/ThirdParty-1.6/ParaView3.6.1
maysmech is offline   Reply With Quote

Old   February 27, 2010, 15:55
Default
  #12
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 8
maysmech is on a distinguished road
i changed the .bashrc (gedit $HOME/.bashrc &) to
Quote:
PATH=/home/maysam/OpenFOAM/ThirdParty-1.6/ParaView3.6.1-cvs/platforms/linux64Gcc/bin:$PATH
export PATH
and updating causes this output:

Code:
[maysam@maysam cavity]$ . $HOME/.bashrc
bash: id: No such file or directory
bash: id: No such file or directory
bash: grep: No such file or directory
bash: uname: command not found
bash: cat: command not found
/home/maysam/OpenFOAM/OpenFOAM-1.6/bin/foamCleanPath: line 82: sed: command not found
/home/maysam/OpenFOAM/OpenFOAM-1.6/bin/foamCleanPath: line 82: sed: command not found
/home/maysam/OpenFOAM/OpenFOAM-1.6/bin/foamCleanPath: line 82: sed: No such file or directory
/home/maysam/OpenFOAM/OpenFOAM-1.6/bin/foamCleanPath: line 82: sed: No such file or directory
/home/maysam/OpenFOAM/OpenFOAM-1.6/bin/foamCleanPath: line 100: sed: command not found
/home/maysam/OpenFOAM/OpenFOAM-1.6/bin/foamCleanPath: line 100: sed: command not found
bash: /home/maysam/OpenFOAM/ThirdParty-1.6/ParaView3.6.1-cvs/platforms/linux64Gcc/bin: No such file or directory
now i type again gedit $HOME/.bashrc but the editiable .bashrc doesn't open and output is
bash: gedit: No such file or directory

maysmech is offline   Reply With Quote

Old   February 27, 2010, 15:59
Default
  #13
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 382
Rep Power: 9
gwierink is on a distinguished road
Quote:
bash: /home/maysam/OpenFOAM/ThirdParty-1.6/ParaView3.6.1-cvs/platforms/linux64Gcc/bin: No such file or directory
You have ParaView3.6.1, not 3.6.1-cvs, so remove the "-cvs" from the line you just added to .bashrc, save the file, do again
Code:
. $HOME/.bashrc
and see what happens ...
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   February 27, 2010, 16:03
Default
  #14
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 8
maysmech is on a distinguished road
typing gedit $HOME/.bashrc the editiable .bashrc doesn't open and output is
bash: gedit: No such file or directory


i restart my system maybe it be solve but now i can not enter to fedora. i don't know what should i do.

Last edited by maysmech; February 27, 2010 at 16:21.
maysmech is offline   Reply With Quote

Old   February 27, 2010, 16:23
Default
  #15
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 382
Rep Power: 9
gwierink is on a distinguished road
No gedit ? Hmm, that's weird ... Let's try vi:
Code:
vi $HOME/.bashrc
Then, type "i" for "insert mode", fix the line, type "ESC" (the ESCAPE key), and save and exit by ":wq" (notice the ":"). Then, type again
Code:
. $HOME/.bashrc
Does that work?
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   February 27, 2010, 16:31
Exclamation
  #16
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 8
maysmech is on a distinguished road
my problems increase exponentially

after restarting fedora i can't log in (after typing password nothing happen)
now i use windows

i think i should re install fedora and OpenFOAM and ...
i am worry this situation cause losing important data after doing some works on openfoam
maysmech is offline   Reply With Quote

Old   February 28, 2010, 01:42
Default
  #17
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 382
Rep Power: 9
gwierink is on a distinguished road
Ai, that's nasty . Sorry to hear that! If your linux patition is completely dead, maybe it's an idea to access the data using a Knoppix live CD (since Windows (probably) can't access the data). Burn a Knoppix Live CD, reboot, and under Knoppix copy your stuff to a USB stick. Good luck!
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   February 28, 2010, 12:12
Unhappy
  #18
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 8
maysmech is on a distinguished road
hi again
i reinstall fedora and OpenFOAM.
typing paraFoam leads to previouse error.
i read this http://www.openfoam.com/docs/README.php#README
and my version of qt is 3.3.8b so i install a 35MB file that was there:
ftp://ftp.trolltech.com/qt/source/qt...-4.3.5.tar.bz2

i put and execute that and after that now my version is still previous.
what should i do?
maysmech is offline   Reply With Quote

Old   March 1, 2010, 03:18
Default
  #19
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 382
Rep Power: 9
gwierink is on a distinguished road
Hi,

After you have compiled Qt-4.3.5 successfully, you need to make the shell aware of it. This is done by adding the path to the (new) qmake executable to your .bashrc file. In my case the compiled qmake lives in /home/gijsbert/tmp/qt-x11-opensource-src-4.3.5/bin, so I add the following:

Code:
PATH=/home/gijsbert/tmp/qt-x11-opensource-src-4.3.5/bin:$PATH
export PATH
So check out where your freshly compiled qmake lives and put your version of the above in your .bashrc. And of course you need to open a new terminal or reload the environment variables by
Code:
. $HOME/.bashrc
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   March 1, 2010, 10:34
Smile
  #20
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 8
maysmech is on a distinguished road
my problem was solved.
i update my Qt version by typing this command on terminal.



Code:
su -c 'yum update qt'


Now paraView works.
thank you dear Gijsbert.
maysmech is offline   Reply With Quote

Reply

Tags
fedora, install, openfoam

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Install OpenFOAM on 64 Ubuntu 9.04 hansel OpenFOAM Installation 62 March 19, 2010 15:43
install openfoam 1.6 on opensuse 11.0 andresbh OpenFOAM Installation 8 September 30, 2009 00:48
Installation of OpenFOAM on Fedora 11 jits_aps90 OpenFOAM Installation 0 August 20, 2009 02:23
OpenFOAM Install problem masb OpenFOAM 3 May 25, 2009 11:32
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07


All times are GMT -4. The time now is 05:13.