CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Fedora 15 install help (https://www.cfd-online.com/Forums/openfoam-installation/88449-fedora-15-install-help.html)

jenkins May 17, 2011 17:02

Fedora 15 install help
 
1 Attachment(s)
Hello All,

I am using fedora 15 64 bit and am trying to install Open Foam. I am following post 3 in http://www.cfd-online.com/Forums/ope...tml#post286214 . I have run
Code:

./Allwmake | tee wmake_log.txt
and have got an error for which I have attached the end of the terminal output.

Any help or suggestions would be very much appreciated.

Thanks

wyldckat May 22, 2011 03:15

Greetings Luke and welcome to the forum!

:eek: you're treading on bleeding edge technology! Fedora 15 and gcc 4.6.0 are AFAIK untested technologies with OpenFOAM!

OpenFOAM has seen issues in the past with both gcc 4.4.x and 4.5.x, so it's possible that it will have problems with gcc 4.6.x as well. As for Fedora, again there were some issues in the past with its predefined options for gcc, that lead to OpenFOAM not building at all out-of-the-box.

So, my advice is:
  1. Install gcc 4.5.x from Fedora's repos. I believe that something like:
    Code:

    yum install gcc45 g++45
    should work. I don't know the packages names by heart, so you should search for them ;)
  2. Then for changing the gcc/g++ version, you can loosely follow these instructions: http://www.cfd-online.com/Forums/ope...tml#post278809 - post #2
  3. You might want to install OpenFOAM 1.7.x, since that way you will also get the latest bug fix version of OpenFOAM: http://www.openfoam.com/download/git.php
  4. I forgot about this one - run Allwmake like this:
    Code:

    ./Allwmake > make.log 2>&1
    The "2>&1" will redirect the errors into the same output, therefore you get every output properly logged ;)
Best regards and good luck!
Bruno

l_r_mcglashan May 22, 2011 04:54

I, too, have strange masochistic tendencies towards using Fedora. This does not extend towards using the Alpha/Beta releases however... I'll try OpenFOAM/F15 sometime next week.

Anyway, definitely use the git repository as Bruno says. Also, append the entire Allwmake output.

wyldckat May 22, 2011 08:42

Greetings to both,

OK, I was curious about OpenFOAM building with gcc 4.6.0, so I stuffed a Fedora 15 i686 beta into a virtual machine and did the following:
  1. After installing Fedora 15 beta, I had to force it to update, including the updates-testing repository.
  2. Based on the first mentioned post, I installed the whole nine yards in Fedora as root:
    Code:

    yum install gcc gcc-c++ binutils-devel flex git-core wget cmake qt4-devel python-devel readline-devel bison ncurses-devel tix.x86_64 glibc-devel flex zlib-devel libXt-devel binutils-static python-devel qt-devel cmake flex patch
    The package "tix.x86_64" didn't stick since I was using i686. The "patch" package was needed for one of the next steps.
  3. Then as normal user:
    Code:

    cd ~
    mkdir OpenFOAM
    cd OpenFOAM
    git clone git://github.com/OpenCFD/OpenFOAM-1.7.x.git
    wget http://downloads.sourceforge.net/foam/ThirdParty-1.7.1.gtgz?use_mirror=mesh
    tar -xzf ThirdParty-1.7.1.gtgz
    mv ThirdParty-1.7.1 ThirdParty-1.7.x

    @Luke: I think you skipped this last step...
  4. Now, this isn't on the normal instructions - download the file attached in this bug report: http://www.openfoam.com/mantisbt/view.php?id=79
  5. Unpack it and place it in "~/OpenFOAM". To unpack, you can run:
    Code:

    gunzip ThirdParty_Allwmake.diff.gz
  6. Run still as normal user:
    Code:

    cd ~/OpenFOAM/ThirdParty-1.7.x
    patch -p0 < ../ThirdParty_Allwmake.diff

    This will fix a couple of glitches here and there.
  7. Now, this is a minor hack since it's easier than editing OpenFOAM's "bashrc" file... so, run:
    Code:

    cd ../OpenFOAM-1.7.x/etc
    echo export WM_ARCH_OPTION=32 > prefs.sh #this line is only needed for i686/32bit versions
    echo export WM_NCOMPPROCS=4 >> prefs.sh # put here the number of cores your machine has

    In case you like to leave spaces between the equal sign and numbers, don't! Bash will not like it :rolleyes:
  8. Now, do as explained in the official instructions:
    Quote:

    Originally Posted by http://www.openfoam.com/download/git.php#x6-38000
    if running bash or ksh (if in doubt type "echo $SHELL"), source the "etc/bashrc" file by adding the following line to the end of your "$HOME/.bashrc" file:
    Code:

    . $HOME/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc
    then type
    Code:

    . $HOME/.bashrc
    in the current terminal window

    Or in case you don't see the dot-space:
    Code:

    source $HOME/.bashrc
  9. Finally, let's get this building:
    Code:

    foam
    ./Allwmake > make.log 2>&1

You can track how it's going in a separate terminal window/tab by running:
Code:

foam
tail -F make.log

Note: The foam command is an alias and it will do the same as running the following command:
Code:

cd $HOME/OpenFOAM/OpenFOAM-1.7.x
As for ParaView:
  1. Run as root:
    Code:

    yum install paraview
  2. Then as normal user, run:
    Code:

    sed -i -e 's=\.OpenFOAM=\.foam=' $WM_PROJECT_DIR/bin/paraFoam
And voilą, the goose is cooked :)


I haven't checked it to see if OpenFOAM is sane in this environment, so be very careful ;)


I tried checking if gcc 4.5.x was available in Fedora 15 and I haven't found it, so if you want to give it a shot, you can try also these instructions: Automated scripts for building gcc 4.4.x and 4.5.x for using with OpenFOAM 1.7 series

Best regards and good luck!
Bruno

l_r_mcglashan May 25, 2011 04:07

I had absolutely no issues whatsoever with installing/compiling:

Fedora 15 x86_64 (installed with the programming/development theme)
OF-1.7.x

lindner May 26, 2011 19:44

Thank you for the tips Bruno, my first time installing OpenFOAM into Fedora and i just followed your steps, everything worked.
Just one addon, If anyone using the paraview from repository wants to remove the annoying message asking for the correct reader for openfoam after running paraFoam (ex: a reader for cavity.foam could not be found) just edit file ~/OpenFOAM/OpenFOAM-1.7.x/bin/paraFoam and replace all .OpenFOAM to just .foam like this:
caseFile="$caseName.OpenFOAM" -> caseFile="$caseName.foam"
caseFile="$caseName{$regionName}.OpenFOAM" -> caseFile="$caseName{$regionName}.foam"

and the paraview should start directly using openFoam reader.

Valeu!

Guilherme

wyldckat May 27, 2011 15:06

Hi Guilherme,

I'm glad my post helped :) But about the addon:
Quote:

Originally Posted by lindner (Post 309424)
Just one addon, If anyone using the paraview from repository wants to remove the annoying message asking for the correct reader for openfoam after running paraFoam (ex: a reader for cavity.foam could not be found) just edit file ~/OpenFOAM/OpenFOAM-1.7.x/bin/paraFoam and replace all .OpenFOAM to just .foam like this:
caseFile="$caseName.OpenFOAM" -> caseFile="$caseName.foam"
caseFile="$caseName{$regionName}.OpenFOAM" -> caseFile="$caseName{$regionName}.foam"

This was point 2 from the last list:
Quote:

Originally Posted by wyldckat (Post 308762)
As for ParaView:
  1. Run as root:
    Code:

    yum install paraview
  2. Then as normal user, run:
    Code:

    sed -i -e 's=\.OpenFOAM=\.foam=' $WM_PROJECT_DIR/bin/paraFoam

The sed command would do this without even needing to open a text editor :cool:

Best regards,
Bruno

sachinpalde August 2, 2011 07:18

Im trying to install fedora 15 from live CD,it show me the error that you could not have free space for automatic partitioning although i have free space of 20 GB. I having windows 7 installed on my laptop

j-avdeev August 30, 2011 06:49

Quote:

Originally Posted by sachinpalde (Post 318479)
Im trying to install fedora 15 from live CD,it show me the error that you could not have free space for automatic partitioning although i have free space of 20 GB. I having windows 7 installed on my laptop

20 GB of unformated unmarked space on hard disk?
this problem appear only for automatic partitioning? - possible to choose manual partitioning?

albem October 27, 2011 17:12

Hello I am trying to install OpenFOAM-1.6-ext on Fedora 15, but it's been a nightmare!, I always get

gcc 4.6.1
WARNING: Conflicting installations:
OpenFOAM settings : /bin/gcc
current path : /usr/lib64/ccache/gcc
CRITICAL ERROR


Please, any help is welcome!


Alberto

j-avdeev October 27, 2011 17:51

albem, if you are compiling from sources, may be something wrong in
OpenFOAM-version/etc/bashrc file?
For example wrong selected compiler..
Code:

#- Compiler:
#    WM_COMPILER = Gcc | Gcc43 | Gcc44 | Gcc45 | Gcc46 | Clang | Icc (Intel icc)
export WM_COMPILER=Gcc43
unset WM_COMPILER_ARCH WM_COMPILER_LIB_ARCH

or any path.


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