CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   install openfoam in fedora (http://www.cfd-online.com/Forums/openfoam-installation/72993-install-openfoam-fedora.html)

Ahmed Khattab February 23, 2010 18:07

install openfoam in fedora
 
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
:)

gwierink February 24, 2010 06:47

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!

maysmech February 27, 2010 04:23

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?

gwierink February 27, 2010 09:55

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!

maysmech February 27, 2010 13:21

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?

gwierink February 27, 2010 14:45

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


maysmech February 27, 2010 15:09

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

gwierink February 27, 2010 15:23

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 :rolleyes:. 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

Ahmed Khattab February 27, 2010 15:25

thank you
 
really i thank you for your reply and being patient with me.
thank you
:)

gwierink February 27, 2010 15:29

No worries, glad to help, you're welcome :). I also started as a beginner ;).

maysmech February 27, 2010 15:32

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 February 27, 2010 15:55

:( 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

:(

gwierink February 27, 2010 15:59

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 ...

maysmech February 27, 2010 16:03

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.

gwierink February 27, 2010 16:23

No gedit :eek:? 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?

maysmech February 27, 2010 16:31

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:confused:

gwierink February 28, 2010 01:42

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!

maysmech February 28, 2010 12:12

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?:(

gwierink March 1, 2010 03:18

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

maysmech March 1, 2010 10:34

my problem was solved.:D
i update my Qt version by typing this command on terminal.



Code:

su -c 'yum update qt'
:)

Now paraView works.
thank you dear Gijsbert.


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