CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] Installing OpenFOAM 4.0 on Fedora 23 (https://www.cfd-online.com/Forums/openfoam-installation/174031-installing-openfoam-4-0-fedora-23-a.html)

JonW July 2, 2016 07:56

Installing OpenFOAM 4.0 on Fedora 23
 
Hello foamers
I just finished installing the brand new OpenFOAM 4.0 on Fedora 23 and this is what I did (please note, that the dnf install part is a bit messy, haven't had time to clean it, but this works on my pc). Hope this helps... :)

First install some stuff on your system,...

sudo dnf groupinstall 'Development Tools'
sudo dnf groupinstall 'C Development Tools and Libraries'
sudo dnf install openmpi openmpi-devel qt-devel qt-webkit-devel zlib-devel cmake wget boost-devel gmp-devel mpfr-devel patch readline-devel ncurses-devel python python-devel
sudo dnf install git gitk
sudo dnf install openmpi-devel qt-devel qtwebkit-devel zlib-devel cmake
sudo dnf install openmpi openmpi-devel qt-devel qt-webkit-devel zlib-devel cmake wget git gitk
sudo dnf install boost-devel gmp-devel mpfr-devel patch readline-devel ncurses-devel python python-devel
sudo dnf install CGAL CGAL-devel binutils-devel mercurial
sudo dnf install compat-gcc-34-g77
sudo dnf install freeglut freeglut-devel flex bison cmake zlib zlib-devel boost-thread boost-system boost-devel libXt-devel libXt scotch scotch-devel qt5-qtwebkit-devel
sudo dnf install qtwebkit qtwebkit-devel CGAL CGAL-devel openmpi openmpi-devel
sudo dnf install zlib zlib-devel boost boost-math boost-thread boost-system boost-devel openmpi openmpi-devel readline readline-devel ncurses-devel ncurses-libs ncurses libXt libXt-devel
sudo dnf install scotch scotch-devel ptscotch-openmpi ptscotch-openmpi-devel ptscotch-openmpi-devel-parmetis

-----------------------------------------------------
(0)
Download, unpack and rename the following as explained on the OpenFOAM home page...
OpenFOAM-4.x-version-4.0.tar.gz
ThirdParty-4.x-version-4.0.tar.gz

---------------------------
(0)
in your .bashrc, put...

alias of40="export PATH=/usr/lib64/openmpi/bin/:$PATH && export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib/:$LD_LIBRARY_PATH && source $HOME/OpenFOAM/OpenFOAM-4.0/etc/bashrc && PS1='\[\e[1;31m\][4.0]\[\e[0m\]\[\e[1;32m\][$(tty | cut -d/ -f3,4)]\[\e[0m\][\W]\[\e[1;31m\]:\[\e[0m\] ' "

(you can also have the path part in the beginning of your .bashrc)
---------------------------
(1)
Download...
http://www.cmake.org/files/v3.2/cmake-3.2.1.tar.gz

unpack and put in $WM_THIRD_PARTY_DIR
---------------------------
(2)
New terminal and type "of40"

cd $WM_THIRD_PARTY_DIR

./makeCmake 2>&1 | tee makeLogFile_tmp1.txt

wmSET $FOAM_SETTINGS (I think I forgot to do the wmSET thingi, but it didnt seem to do any harm)
---------------------------
(3)
cd /usr/bin
sudo ln -s qmake-qt5 qmake
---------------------------
(4)
New terminal and type "of40"
---------------------------
(5)
cd $WM_THIRD_PARTY_DIR
./makeParaView

(this took about 1 hour on my pc)
---------------------------
(6)
New terminal and type "of40"
---------------------------
(7)
type "foam"

./Allwmake -j 2>&1 | tee wmake_log_file_1.txt

(took about 4 hour on my pc,)
---------------------------
(8)
New terminal and type "of40"
---------------------------
(9)
./Allwmake 2>&1 | tee wmake_log_file_2.txt

MauricioAguilar August 11, 2016 10:47

Hey Jon,

Thanks for the very thorough post.
Just now I'm using your instructions.

Whenever I try to run the alias "of40" I keep getting the message : command not found.
Do you know why this is happening?

I have put everything in the directories exactly as indicated. $HOME/OpenFOAM...

Thanks,

Mauricio

EDIT: sorry got confused and was editing the OpenFoAM bashrc instead of etc/bashrc

JonW August 12, 2016 07:40

Hi could it be...
"bash: mpicc: command not found" ?

try first just to do ...
source $HOME/OpenFOAM/OpenFOAM-4.0/etc/bashrc
... on your command line (i.e. copy paste, if you like)

You will get "bash: mpicc: command not found", but that is ok for now.
Is this running otherwise OK ?

...do also "echo $PATH" to see if your path settings are as supposed to be

JonW August 12, 2016 07:42

Obs,... I was too fast, didnt notice your message

"EDIT: sorry got confused and was editing the OpenFoAM bashrc instead of etc/bashrc"

I am guessing all is OK now?

MauricioAguilar August 12, 2016 09:17

Everything worked great Jon.
for some reason my files were originally owned by root so i had to change ownership; other than that it went smooth.
Thanks again for the instructions.

best wishes,

Mauricio

wyldckat September 11, 2016 11:58

Quick note: I've added a link to this thread on the wiki here: https://openfoamwiki.net/index.php/I...dora#Fedora_23

JonW June 13, 2017 14:29

OpenFOAM on Fedora 25
 
OK, finally I did a fresh install with the OF41 on Fedora 25 in accordance with the above.
No problems came up,... everything went OK :)
J.

Extra info: I was too fast here yesterday: In the installation of OF in F25 I did not do the steps (1) and (2) (i.e. related to cmake). That is, everything was done on the native system without problems.
J.


All times are GMT -4. The time now is 00:38.