Compile OpenFOAM 1.6-ext on Fedora 16 64bit

Download OpenFOAM 1.6-ext from the Internet

You can use svn to get the whole extended source code:
$svn co https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend openfoam-extend

If you only want to download the 1.6-ext version, execute:
$svn co https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/OpenFOAM-1.6-ext/ OpenFOAM-1.6-ext

After first retrieving, you may need update the source code:

$cd openfoam-extend
$svn update

source the etc/bashrc file by adding the following line to the end of your $HOME/.bashrc file:

+ . $HOME/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc

Then update the environment variables by sourcing the $HOME/.bashrc file by
typing in the terminal:

$. $HOME/.bashrc

Build the ThirdParty packages:
$cd /ThirdParty
$./AllMake.stage0
$./AllMake.stage1
$./AllMake.stage2
$./AllMake.stage3
$./AllMake.stage4

Except the stage4, you need to download the source tarball manually if any failure of downloading source files.

Then compile OpenFOAM 1.6-ext the core and applications. You should go to the top directory of your OpenFOAM-1.6-ext folder:
$cd openfoam-extend/trunk/Core/OpenFOAM-1.6-ext/

or any other location for your OpenFOAM-1.6-ext, then
$./Allwmake

A new error appears when compiling the /OpenFOAM-1.6-ext/applications/:

~/OpenFOAM/OpenFOAM-1.6-ext/lib/linux64GccDPOpt/openmpi-1.4.3/libPstream.so so try adding it to the linker command line
~/OpenFOAM/OpenFOAM-1.6-ext/lib/linux64GccDPOpt/openmpi-1.4.3/libPstream.so: could not read symbols: Invalid operation

To fix this: In file $WM_DIR/rules/linux64Gcc/c++ change the lines for LINKLIBSO and LINKEXE to:

LINKLIBSO = $(CC) $(c++FLAGS) -shared -Xlinker --add-needed
LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed

Then, you execute it again in the top directory of OpenFOAM-1.6-ext

$./Allwmake

I think you can use OpenFOAM-1.6-ext now.

Related page external

[1] http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2011/OpenFOAMonYourOwnLaptop.html

   Send article as PDF   

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.