CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums

OpenFOAM-1.6-ext git install on debian

Register Blogs Members List Search Today's Posts Mark Forums Read

Rate this Entry

OpenFOAM-1.6-ext git install on debian

Posted April 30, 2011 at 17:33 by elvis
Updated October 29, 2011 at 08:51 by elvis

sudo apt-get install git-core qt4-qmake qt4-dev-tools binutils-dev flex bison build-essential libreadline5-dev wget zlib1g-dev rpm cmake python-dev libxt-dev gnuplot python-numpy libtool autoconf gitk git-gui

mkdir ~/OpenFOAM
cd ~/OpenFOAM
git clone git://openfoam-extend.git.sourceforge.net/gitroot/openfoam-extend/OpenFOAM-1.6-ext

echo "alias startOF16ext='unset FOAM_INST_DIR;unset WM_PROJECT_USER_DIR;unset WM_THIRD_PARTY_DIR;source ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc'" >> ~/.bashrc
echo "startOF16ext" >> ~/.bashrc

# WM_NCOMPPROCS=8 in OpenFOAM-1.6-ext/etc/bashrc

ln -s /usr/bin/make /usr/bin/gmake # ln -s `which make` $WM_PROJECT_DIR/bin/gmake


# create prefs.sh ( FOAM_VERBOSE=1)
cd ~/OpenFOAM/OpenFOAM-1.6-ext/etc
cp prefs.sh-EXAMPLE prefs.sh

##echo "export QT_BIN_DIR=/usr/bin" >> ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
echo "export QT_DIR=/usr/share/qt4" >> ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
echo "export QT_BIN_DIR=$QT_DIR/bin" >> ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh


cd ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty # or foam3rdParty

./AllMake

foam
export FOAM_TEST_HARNESS_DIR=$WM_PROJECT_DIR/testHarness/OpenFOAM/1.6-ext
cmake .

# cd ~/OpenFOAM/OpenFOAM-1.6-ext/ # foam
# ./Allwmake # or make

mkdir -p $FOAM_RUN
cp -r $FOAM_TUTORIALS $FOAM_RUN
Posted in Uncategorized
Views 2816 Comments 1 Edit Tags Email Blog Entry
« Prev     Main     Next »
Total Comments 1

Comments

  1. Old Comment
    INSTALLATION GUIDE: OpenFOAM-1.6-ext from git repository in debian squeeze:

    Here my two cents:

    ************************************************** **************************************
    ~ $ mkdir OpenFOAM
    ~ $ cd OpenFOAM
    ~/OpenFOAM $ git clone git://openfoam-extend.git.sourceforge.net/gitroot/openfoam-extend/OpenFOAM-1.6-ext

    ~/OpenFOAM $ echo " source ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc " >> ~/.bashrc
    ~/OpenFOAM $ source ~/.bashrc
    ~/usr/bin $ ln -s make gmake
    ~ $ su aptitude install git-core qt4-qmake qt4-dev-tools binutils-dev flex bison build-essential libreadline5-dev wget zlib1g-dev rpm cmake python-dev libxt-dev gnuplot python-numpy libtool autoconf gitk git-gui

    ~/OpenFOAM/OpenFOAM-1.6-ext/etc $ cp prefs.sh-EXAMPLE prefs.sh

    Edit prefs.sh to specify the path to the system programs:
    compilerInstall=System
    export WM_COMPILER_DIR=/usr

    export QT_DIR=/usr
    export QT_BIN_DIR=$QT_DIR/bin

    export PARAVIEW_SYSTEM=1
    export PARAVIEW_DIR=/home/.../ParaView-3.8.0-RC1-Linuxx86_64/ParaView-3.8.0-RC1-Linux-x86_64
    export PARAVIEW_BIN_DIR=$PARAVIEW_DIR/bin



    THIRDPARTY COMPILATION:

    ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty $ ./AllMake

    Mesquite-2.1.2 source-code gave some compilation errors. Thus, I have used the latest available version, updating the mesquite version in:

    ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/AllMake.stage3: rpm_make -p mesquite-2.99 -s mesquite-2.99.spec -u http://software.sandia.gov/~jakraft/mesquite-2.99.tar.gz

    in /OpenFOAM/OpenFOAM-1.6-ext/etc/settings.sh :
    [ -z "$MESQUITE_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/mesquite-2.99/platforms/$WM_OPTIONS ] && {
    _foamSource $WM_THIRD_PARTY_DIR/packages/mesquite-2.99/platforms/$WM_OPTIONS/etc/mesquite-2.99.sh }

    and in ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/rpmBuild/SPECS/ :
    mv mesquite-2.1.2.spec mesquite-2.99.spec
    vim mesquite-2.99.spec : replace mesquite-2.1.2 with mesquite-2.99
    ~/OpenFOAM $ cd OpenFOAM-1.6-ext/ ./Allwmake

    OPENFOAM COMPILATION:
    ~/OpenFOAM/OpenFOAM-1.6-ext $ ./Allwmake

    At this point, I have fixed the following errors:

    Compilation of /OpenFOAM/OpenFOAM-1.6-ext/src gives the following message:
    Error: Mesquite_all_headers.hpp No such file or directory

    Add:
    -I$(MESQUITE_INCLUDE_DIR) \
    and

    -L$(MESQUITE_LIB_DIR) \
    -lmesquite
    to:
    /meshMotion/mesquiteMotionSolver/Make/options
    /dynamicFvMesh/Make/options


    Compile again
    ~/OpenFOAM/OpenFOAM-1.6-ext $ ./Allwmake

    A new error appears when compiling the /OpenFOAM-1.6-ext/applications/:
    "
    /home/maria/OpenFOAM/OpenFOAM-1.6-ext/lib/linux64GccDPOpt/openmpi-1.4.3/libPstream.so so try adding it to the linker command line
    /home/maria/OpenFOAM/OpenFOAM-1.6-ext/lib/linux64GccDPOpt/openmpi-1.4.3/libPstream.so: could not read symbols: Invalid operation
    "
    To fix this:
    In $WM_DIR/rules/linux64Gcc/c++ change LINKLIBSO and LINKEXE to:

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

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

    Compile again
    ~/OpenFOAM/OpenFOAM-1.6-ext $ ./Allwmake

    Test the installation:
    ~/OpenFOAM/OpenFOAM-1.6-ext $ foamInstallationTest
    ....
    Summary
    ----------------------------------
    Base configuration ok.
    Critical systems ok.
    done.
    ....
    CREATE YOUR RUN DIRECTORY

    ~/OpenFOAM $ mkdir -p $FOAM_RUN

    ************************************************** **************************************
    Every little helps!

    Marķa
    permalink
    Posted September 26, 2011 at 04:57 by mgc mgc is offline
    Updated September 26, 2011 at 06:43 by mgc
 

All times are GMT -4. The time now is 16:33.