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

Leave a Reply

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

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

*

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