Miscellaneous tips and tricks

This page is mainly for myself, but I have made it available if it is useful for someone else.

Git procedure with foam-extend (branch nextRelease)

Create your initial base branch, from the nextRelease branch

foam
git checkout nextRelease
git checkout -b nr/hani
#My own branch – pick your own name of this branch

Do whatever modifications you want to do, the nextRelease branch will not be affected

Check which files have been modified:

git status
Add all modifications to my own branch (e.g.):
git add Allwmake.firstInstall ThirdParty/AllMake.stage1 00README_Installation

Commit those modifications to my own branch:
git commit -m "Original modifications to nextRelease"

 

Update nextRelease and merge to your own base branch

Make sure that you only have “Untracked files” reported by:

git status
Update the nextRelease branch:

git checkout nextRelease

Make sure that you only have “Untracked files” reported by:

git status

If you do have other than “Untracked files”, you may get conflicts. Now is a good time to decide how you want to treat those files.
Here we assume that you only have “Untracked files” in branch nextRelease, and modifications in your own branch.

Update the local information about the remote repository:

git remote update

Check which files will be pulled:

git diff --name-only origin/nextRelease

If the following gives any output, you will get conflicts in those files. If so, decide how to deal with it now:

comm -1 -2 <( git log --name-only --pretty=format: origin/nextRelease..nextRelease | awk 'NF' | sort ) <( git diff --name-only origin/nextRelease..nextRelease | sort )

Get the modifications from the remote repository:
git pull

Update your own branch:

git checkout nr/hani

Check which files may cause a conflict (HAVE ANOTHER LOOK AT THIS PROCEDURE – next 5 lines):

comm -1 -2 <( git log --name-only --pretty=format: nextRelease..nr/hani | awk 'NF' | sort ) <( git diff --name-only nextRelease..nr/hani | sort )

For each of the files listed, do (e.g.):

git diff nr/hani:ThirdParty/AllMake.stage1 nextRelease:ThirdParty/AllMake.stage1

If you want to get the new file from nextRelease, do the required modifications, add and commit in your branch.

If you want to keep your file, make a copy of it that you later put back.

Make sure that you are in your branch, and do the merge:

git checkout nr/hani

git merge nextRelease

If something went wrong, just do the following to get back before the merge:

git reset --merge ORIG_HEAD

 

Compile the code and run the testHarness:
umask u=rwx,g=rx,o=rx #Since I want my users to be able to use the installation
./Allwmake
umask u=rwx,g=rx,o=
#Back to usual permissions

cd $WM_PROJECT_DIR/testHarness/foam-extend/3.1/runDir

./Allclean

./Allrun_Experimental

firefox http://openfoam-extend.sourceforge.net/CDash/index.php?project=foam-extend-3.1

./Allclean

 

Push changes (if you have write-access to the repository):

Make a new branch, from nextRelease

git checkout nextRelease

git checkout -b nr/FirstnameFamilyname_featureDescr

Add and commit changes to the new branch

Check which files have been modified (committed to the new branch) compared to nextRelease:

git log --name-only --pretty=format: nextRelease..nr/FirstnameFamilyname_featureDescr | awk 'NF' | sort

git push origin nr/FirstnameFamilyname_featureDescr

 

Another update procedure:

Pull after local change:
git stash
git pull
git stash pop

The last command may create conficts if you and upstream changed a file - Two options:
a) Discard your changes
git reset --hard HEAD
git stash drop

b) Resolve conflict
git mergetool
This will take you through all file that have conflicts. I am using meld for resolution. To set this up
git config --global diff.guitool meld
Of course, you need to install meld too

 

Use ccache to switch between and compile several branches:
ccache retrieves compilation results from a database if possible instead of recompiling.
On Ubuntu, this comes in package "ccache". Increase cache size to about 10-20G with "ccache --max-size=10".
Make sure that the compilation goes through ccache (first make sure that ccache is available):
echo "alias c++='/usr/bin/ccache'" >> $WM_PROJECT_DIR/etc/prefs.sh
echo "alias cc='/usr/bin/ccache'" >> $WM_PROJECT_DIR/etc/prefs.sh
echo "alias g++='/usr/bin/ccache'" >> $WM_PROJECT_DIR/etc/prefs.sh
echo "alias gcc='/usr/bin/ccache'" >> $WM_PROJECT_DIR/etc/prefs.sh

Switch between branches and compile quickly:

git checkout nextRelease
./Allwclean
./Allwmake

git checkout master
./Allwclean
./Allwmake

Note: There is no good way for this to work if this is a centralized installation, since the currently active branch will change occasionally. If WM_OPTIONS would be set different for the branches, the source code can  not be at the same branch as both compilations. This procedure is thus for a personal installation.

General hints on installing OpenFOAM

If you need to install a proper version of gcc, Qt etc. for 2.0.x, have a look at the scripts in ThirdParty, such as makeGcc, see which versions they require, get those versions from the Internet, compile by running the script.

Notes on installation of Dakota

Installing dakota-5.3 from source

1. Using the standard information in INSTALL to setup the build
2. To get the make install to end up in right directory the install path was
    manually set desired directory in cmake_install.cmake
3. The paths must be set so that:

export PATH=/chalmers/users/$USER/Program/dakota-build/bin:$PATH
export LD_LIBRARY_PATH=/chalmers/users/$USER/Program/dakota-build/lib:$LD_LIBRARY_PATH

Notes on cmake

cmake is used for Paraview, for compiling the OF reader, and also by some other ThirdParty packages like the latest versions of metis and parmetis. cmake is just a compiling program, you can use the version you already have if it is recent enough for compiling ParaView etc..

For the test harness, the scripts will be looking for a recent version of cmake (2.8 as of January 2014) 

Raw notes from installing foam-extend-3.1 (branch nextRelease) with INTEL at Triolith, CentOS 6.x x86_64. 2014-06-03

export FOAM_INST_DIR=$SNIC_NOBACKUP/ch_openfoam/Triolith/foam
mkdir -p $FOAM_INST_DIR
cd $FOAM_INST_DIR
git clone git://git.code.sf.net/p/openfoam-extend/foam-extend-3.1 foam-extend-3.1
cd foam-extend-3.1
git checkout nextRelease
#Note: The nextRelease branch could have been checked out directly with “git clone --branch nextRelease …”
Add in $FOAM_INST_DIR/foam-extend-3.1-Turbo/etc/settings.sh, after "case "$WM_MPLIB" in":
#=============
INTELMPI)
    export MPI_ARCH_PATH=$I_MPI_ROOT
    export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/intelmpi
    _foamAddPath    $MPI_ARCH_PATH/bin64
    _foamAddLib     $MPI_ARCH_PATH/lib64
    ;;
#=============
sed -i s/fPIC/"fPIC -Nmpi -Nmkl -xavx"/g $FOAM_INST_DIR/foam-extend-3.1/wmake/rules/linux64Icc/c++
Copied from 2.2.x (if available, otherwise just copy from below):
cp "FROM"/OpenFOAM-2.2.x/wmake/rules/linux64Icc/mplibINTELMPI $FOAM_INST_DIR/foam-extend-3.1/wmake/rules/linux64Icc/mplibINTELMPI
Contains:
#=============
PFLAGS     = -DMPICH_SKIP_MPICXX
PINC       = -I$(MPI_ARCH_PATH)/include64
PLIBS      = -L$(MPI_ARCH_PATH)/lib64 -lmpi
#=============

Do some modifications to the installation procedure by creating a etc/prefs.sh file:
(see the etc/prefs-sh-EXAMPLE file for more examples)
cp etc/prefs.sh-EXAMPLE etc/prefs.sh
# Make the sourcing less chatty:
sed -i s/"FOAM_VERBOSE=1"/"FOAM_VERBOSE="/g etc/prefs.sh
#Use system cmake (version 2.8.11.2, instead of 2.8.12 that compiles in ThirdParty)
sed -i s/"( rpm_make -p cmake"/"#( rpm_make -p cmake"/g ThirdParty/AllMake.stage1
#Use system openmpi
sed -i s/"( rpm_make -p openmpi"/"#( rpm_make -p openmpi"/g ThirdParty/AllMake.stage2

echo "alias OFextend31='export FOAM_INST_DIR=/nobackup/global/x_hakni/ch_openfoam/Triolith/foam; export WM_COMPILER=Icc; export WM_MPLIB=INTELMPI; export QT_THIRD_PARTY=1; module load build-environment/nsc-recommended; module load cmake/2.8.11.2; . \$FOAM_INST_DIR/foam-extend-3.1/etc/bashrc'" >> ../../../addToBashrc
export FOAM_INST_DIR=/nobackup/global/x_hakni/ch_openfoam/Triolith/foam; export WM_COMPILER=Icc; export WM_MPLIB=INTELMPI; export QT_THIRD_PARTY=1; module load build-environment/nsc-recommended; module load cmake/2.8.11.2; . $FOAM_INST_DIR/foam-extend-3.1/etc/bashrc
foam
./Allwmake.firstInstall >& log&

qt failed, works with gcc:
New terminal window:
export FOAM_INST_DIR=/nobackup/global/x_hakni/ch_openfoam/Triolith/foam; export QT_THIRD_PARTY=1; module load build-environment/nsc-recommended; module load cmake/2.8.11.2; . $FOAM_INST_DIR/foam-extend-3.1/etc/bashrc
foam3rdParty
./AllMake.stage4 >& log&
cd packages/qt-everywhere-opensource-src-4.8.6/platforms
ln -s linux64GccDPOpt linux64IccDPOpt
foam3rdParty
cd packages/ParaView-4.0.1/platforms
ln -s linux64GccDPOpt linux64IccDPOpt

New terminal window:
OFextend31

Raw notes from installing foam-extend-3.1 (branch nextRelease) in StuDAT (non-root), Redhat Enterprise 6.2 , 2014-06-03

cd /chalmers/sw/unsup64/OpenFOAM

git clone git://git.code.sf.net/p/openfoam-extend/foam-extend-3.1 foam-extend-3.1

cd foam-extend-3.1

git checkout nextRelease

alias OFextend31='export FOAM_INST_DIR=/chalmers/sw/unsup64/OpenFOAM; export QT_THIRD_PARTY=1;. $FOAM_INST_DIR/foam-extend-3.1/etc/bashrc'

export FOAM_INST_DIR=/chalmers/sw/unsup64/OpenFOAM; export QT_THIRD_PARTY=1;. $FOAM_INST_DIR/foam-extend-3.1/etc/bashrc

foam

In Allwmake.firstInstall:

if [ -z "$PARAVIEW_SYSTEM" ] && [ -z "$QT_BIN_DIR" ] && [ -z "$QT_THIRD_PARTY" ]

CMake 2.8.8 or higher is required for ParaView-4.0.1

sed -i s/"#( rpm_make -p cmake-2.8.12"/"( rpm_make -p cmake-2.8.12"/g ThirdParty/AllMake.stage1

./Allwmake.firstInstall >& log&

ParaView probably fails compiling. If so, do:

export WM_NCOMPPROCS=1

./Allwmake.firstInstall >& log&

rm log

chmod -R go+Xr .

Raw notes from installing foam-extend-3.0 with Gcc at Beda, Nehalem CPUs (Xeon E5520, 2.27GHz) Mellanox ConnectX InfiniBand HCAs.

 

Installed on Beda 2014-02-16

Using:

alias OFextend30Beda='module load gcc/4.4/4.4.2 openmpi/1.4.3-gcc41; export FOAM_INST_DIR=/c3se/NOBACKUP/users/hani/beda/foam; export WM_MPLIB=SYSTEMOPENMPI; . $FOAM_INST_DIR/foam-extend-3.0/etc/bashrc'

cd /c3se/NOBACKUP/users/hani/beda/foam

git clone git://git.code.sf.net/p/openfoam-extend/foam-extend-3.0 foam-extend-3.0

###THIS NOT NECESSARY IF WM_MPLIB IS SET WHILE SOURCING!!! ###

###cp etc/bashrc etc/bashrcBeda

###sed -i s/"WM_MPLIB:=OPENMPI"/"WM_MPLIB:=SYSTEMOPENMPI"/g etc/bashrcBeda

###sed -i s/"settings.sh"/"settingsBeda.sh"/g etc/bashrcBeda

###cp etc/settings.sh etc/settingsBeda.sh #Just to prepare for possible changes

###THIS NOT NECESSARY IF WM_MPLIB IS SET WHILE SOURCING!!! ###

#New terminal window

OFextend30Beda

foam

#Fixed problem (directories were not automatically created):

mkdir -p /c3se/NOBACKUP/users/hani/beda/foam/foam-extend-3.0/ThirdParty/rpmBuild/BUILD

mkdir -p /c3se/NOBACKUP/users/hani/beda/foam/foam-extend-3.0/ThirdParty/rpmBuild/RPMS/x86_64

./Allwmake.firstInstall

#This need you to type 'Y' to proceed!!!

#If WM_MPLIB=SYSTEMOPENMPI is not set, this installs also openmpi, although the system one will be used later

 

Did not have to do, what is often necessary:

./Allwmake

 

NOTE:

Swak4foam failed because of old Bison version (2.3, should be >= 2.4)

It was not sufficient with 4.1.2

Raw notes from installing foam-extend-3.0-Turbo with INTEL at Triolith, CentOS 6.x x86_64.2014 2014-05-27

NOTE THAT THIS IS A SPECIAL TURBO FORK!

Usage and compilation procedure at Triolith:

foam-extend-3.0, Intel installation (Icc)

--------------------------------------------

 

TO USE (but not when downloading):

-------

Do the following line once:

echo "alias OFextend30Turbo='export FOAM_INST_DIR=/nobackup/global/x_hakni/ch_openfoam/Triolith/foam; export WM_COMPILER=IccHani; export WM_MPLIB=INTELMPI; module load build-environment/nsc-recommended; . \$FOAM_INST_DIR/foam-extend-3.0-Turbo/etc/bashrcHani'" >> $HOME/.bashrc

(actually first compiled without export CMAKE_SYSTEM=1; and export QT_THIRD_PARTY=1;)

Open a new terminal window

OFextend30Turbo

 

TO SUBMIT THE damBreak CASE (already run blockMesg. setFields, decomposePar):

---------------------------

Script submitDamBreak:

#==============

#!/bin/bash

#

#SBATCH -J damBreak #Name of job

#SBATCH -t 00:30:00 #HH:MM:SS

#SBATCH -N 1

#SBATCH --exclusive

#

 

#Same as alias OFextend30:

export FOAM_INST_DIR=/nobackup/global/x_hakni/ch_openfoam/Triolith/foam

export WM_COMPILER=IccHani

export WM_MPLIB=INTELMPI

module load build-environment/nsc-recommended

. $FOAM_INST_DIR/foam-extend-3.0-Turbo/etc/bashrcHani

 

#--nranks is used when less than the number of available cores is used

mpprun --nranks=4 `which interFoam` -parallel -case damBreak >& log

 

# Script ends here

#==============

 

Download and modification procedure:

------------------------------------

This is done in a complicated way, avoiding modifications of any original file

Only do the following indented lines if it has not been done before:

    #=============

    export FOAM_INST_DIR=$SNIC_NOBACKUP/ch_openfoam/Triolith/foam

    mkdir -p $FOAM_INST_DIR

    cd $FOAM_INST_DIR

    git clone git://git.code.sf.net/u/mbeaudoin/foam-extend-3.0-Turbo

    git checkout feature/mixingPlane_RC3

    cp $FOAM_INST_DIR/foam-extend-3.0-Turbo/etc/bashrc $FOAM_INST_DIR/foam-extend-3.0-Turbo/etc/bashrcHani

    sed -i s/"WM_PROJECT_VERSION=3.0"/"WM_PROJECT_VERSION=3.0-Turbo"/g $FOAM_INST_DIR/foam-extend-3.0-Turbo/etc/bashrcHani

    sed -i s/settings/settingsHani/g $FOAM_INST_DIR/foam-extend-3.0-Turbo/etc/bashrcHani

    cp $FOAM_INST_DIR/foam-extend-3.0-Turbo/etc/settings.sh $FOAM_INST_DIR/foam-extend-3.0-Turbo/etc/settingsHani.sh

    #=============

Add in $FOAM_INST_DIR/foam-extend-3.0-Turbo/etc/settingsHani.sh, after "case "$WM_MPLIB" in"

#=============

INTELMPI)

    export MPI_ARCH_PATH=$I_MPI_ROOT

    export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/intelmpi

 

    _foamAddPath    $MPI_ARCH_PATH/bin64

    _foamAddLib     $MPI_ARCH_PATH/lib64

    ;;

 

#=============

sed -i s/Icc/IccHani/g $FOAM_INST_DIR/foam-extend-3.0-Turbo/etc/settingsHani.sh

cp -r $FOAM_INST_DIR/foam-extend-3.0-Turbo/wmake/rules/linux64Icc $FOAM_INST_DIR/foam-extend-3.0-Turbo/wmake/rules/linux64IccHani

sed -i s/fPIC/"fPIC -Nmpi -Nmkl -xavx"/g $FOAM_INST_DIR/foam-extend-3.0-Turbo/wmake/rules/linux64IccHani/c++

Copied from 2.2.x (if available, otherwise just copy from below):

cp "FROM"/OpenFOAM-2.2.x/wmake/rules/linux64IccHani/mplibINTELMPI $FOAM_INST_DIR/foam-extend-3.0-Turbo/wmake/rules/linux64IccHani/mplibINTELMPI

Contains:

#----------------------------------------------------------------

PFLAGS     = -DMPICH_SKIP_MPICXX

PINC       = -I$(MPI_ARCH_PATH)/include64

PLIBS      = -L$(MPI_ARCH_PATH)/lib64 -lmpi

#----------------------------------------------------------------

 

COMPILATION:

------------

Open a new terminal window and type:

OFextend30Turbo

foam

#Do ThirdParty separately, to de-activate OpenMPI compilation

cd wmake/src

make

foam3rdParty

export WM_MPLIB=SYSTEMOPENMPI #Temporary, to de-activate stage 2

./AllMake.pre

#NOTE THAT cmake etc will be compiled, perhaps not necessary!

export WM_MPLIB=INTELMPI #Set back from temporary

foam

./Allwmake

./Allwmake #Since parallel compilation changes order of compilation

 

Compile paraFoam

----------------

Additions to alias (export QT_THIRD_PARTY=1;):

alias OFextend30Turbo='export FOAM_INST_DIR=/nobackup/global/x_hakni/ch_openfoam/Triolith/foam; export WM_COMPILER=IccHani; export WM_MPLIB=INTELMPI; export QT_THIRD_PARTY=1; module load build-environment/nsc-recommended; . $FOAM_INST_DIR/foam-extend-3.0-Turbo/etc/bashrcHani'

OFextend30Turbo

foam3rdParty

./AllMake.stage4

Raw notes from installing foam-extend-3.0 with INTEL at Triolith, CentOS 6.x x86_64. 2014-01-10

HP SL230s compute nodes, equipped with two Intel E5-2660 (2.2 GHz Sandybridge) processors with 8 cores each, i.e 16 cores per node. Hyper-threading is not enabled.

Infiniband from Mellanox (FDR IB, 56 Gb/s)

 

Usage and compilation procedure at Triolith:

foam-extend-3.0, Intel installation (icc (ICC) 12.1.4 20120410)

--------------------------------------------

 

TO USE (but not when downloading):

-------

Do the following line once:

echo "alias OFextend30='export FOAM_INST_DIR=/nobackup/global/x_hakni/ch_openfoam/Triolith/foam; export WM_COMPILER=IccHani; export WM_MPLIB=INTELMPI; module load build-environment/nsc-recommended; . \$FOAM_INST_DIR/foam-extend-3.0/etc/bashrcHani'" >> $HOME/.bashrc

Open a new terminal window

OFextend30

 

TO SUBMIT THE damBreak CASE (already run blockMesg. setFields, decomposePar):

---------------------------

Script submitDamBreak:

#==============

#!/bin/bash

#

#SBATCH -J damBreak #Name of job

#SBATCH -t 00:30:00 #HH:MM:SS

#SBATCH -N 1

#SBATCH --exclusive

#

 

#Same as alias OFextend30:

export FOAM_INST_DIR=/nobackup/global/x_hakni/ch_openfoam/Triolith/foam

export WM_COMPILER=IccHani

export WM_MPLIB=INTELMPI

module load build-environment/nsc-recommended

. $FOAM_INST_DIR/foam-extend-3.0/etc/bashrcHani

 

#--nranks is used when less than the number of available cores is used

mpprun --nranks=4 `which interFoam` -parallel -case damBreak >& log

 

# Script ends here

#==============

 

Download and modification procedure:

------------------------------------

This is done in a complicated way, avoiding modifications of any original file

Only do the following indented lines if it has not been done before:

    #=============

    export FOAM_INST_DIR=$SNIC_NOBACKUP/ch_openfoam/Triolith/foam

    mkdir -p $FOAM_INST_DIR

    cd $FOAM_INST_DIR

    git clone git://git.code.sf.net/p/openfoam-extend/foam-extend-3.0 foam-extend-3.0

    cp $FOAM_INST_DIR/foam-extend-3.0/etc/bashrc $FOAM_INST_DIR/foam-extend-3.0/etc/bashrcHani

    sed -i s/settings/settingsHani/g $FOAM_INST_DIR/foam-extend-3.0/etc/bashrcHani

    cp $FOAM_INST_DIR/foam-extend-3.0/etc/settings.sh $FOAM_INST_DIR/foam-extend-3.0/etc/settingsHani.sh

    #=============

Add in $FOAM_INST_DIR/foam-extend-3.0/etc/settingsHani.sh, after "case "$WM_MPLIB" in"

#=============

INTELMPI)

    export MPI_ARCH_PATH=$I_MPI_ROOT

    export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/intelmpi

 

    _foamAddPath    $MPI_ARCH_PATH/bin64

    _foamAddLib     $MPI_ARCH_PATH/lib64

    ;;

 

#=============

sed -i s/Icc/IccHani/g $FOAM_INST_DIR/foam-extend-3.0/etc/settingsHani.sh

cp -r $FOAM_INST_DIR/foam-extend-3.0/wmake/rules/linux64Icc $FOAM_INST_DIR/foam-extend-3.0/wmake/rules/linux64IccHani

sed -i s/fPIC/"fPIC -Nmpi -Nmkl -xavx"/g $FOAM_INST_DIR/foam-extend-3.0/wmake/rules/linux64IccHani/c++

Copied from 2.2.x (if available, otherwise just copy from below):

cp "FROM"/OpenFOAM-2.2.x/wmake/rules/linux64IccHani/mplibINTELMPI $FOAM_INST_DIR/foam-extend-3.0/wmake/rules/linux64IccHani/mplibINTELMPI

Contains:

#----------------------------------------------------------------

PFLAGS     = -DMPICH_SKIP_MPICXX

PINC       = -I$(MPI_ARCH_PATH)/include64

PLIBS      = -L$(MPI_ARCH_PATH)/lib64 -lmpi

#----------------------------------------------------------------

 

COMPILATION:

------------

Open a new terminal window and type:

OFextend30

foam

#Do ThirdParty separately, to de-activate OpenMPI compilation

cd wmake/src

make

foam3rdParty

export WM_MPLIB=SYSTEMOPENMPI #Temporary, to de-activate stage 2

./AllMake.pre

#NOTE THAT cmake etc will be compiled, perhaps not necessary!

export WM_MPLIB=INTELMPI #Set back from temporary

foam

./Allwmake

./Allwmake #Since parallel compilation changes order of compilation

 

COMPILATION OF Paraview:

------------------------

There is a bug in some file in Paraview, when using the Intel compiler. I therefore installed it using gcc.

In a fresh terminal window:
alias OFParaFoamCompile='export FOAM_INST_DIR=/nobackup/global/x_hakni/ch_openfoam/Triolith/foam; module load gcc/4-centos6 qt/4.8.2; . $FOAM_INST_DIR/foam-extend-3.0/etc/bashrcHani; export QT_DIR=/software/apps/qt/4.8.2; export QT_BIN_DIR=$QT_DIR/bin; module load cmake/2.8.8; echo "This is ONLY for compiling Paraview using gcc, since there is some bug for icc"'
OFParaFoamCompile
foam3rdParty
./AllMake.stage4 >& log_AllMake.stage4Gcc &
cd packages/ParaView-4.0.1/platforms/
ln -s linux64GccDPOpt linux64IccHaniDPOpt

In a fresh terminal window:
cd $FOAM_UTILITIES/postProcessing/graphics/PV4FoamReader
./Allwclean
./Allwmake

Raw notes from installing foam-extend-3.0 with GCC at Triolith, CentOS 6.x x86_64. 2014-01-10
(no paraFoam yet)

HP SL230s compute nodes, equipped with two Intel E5-2660 (2.2 GHz Sandybridge) processors with 8 cores each, i.e 16 cores per node. Hyper-threading is not enabled.

Infiniband from Mellanox (FDR IB, 56 Gb/s)

 

Compilation of Qt and paraFoam not included!

 

Usage and compilation procedure at Triolith:

foam-extend-3.0, default installation (Gcc)

--------------------------------------------

 

TO USE (but not when downloading):

-------

Do the following line once:

alias OFextend30='export FOAM_INST_DIR=/nobackup/global/x_hakni/ch_openfoam/Triolith/foam; module load build-environment/nsc-recommended; module load gcc/4-centos6; . \$FOAM_INST_DIR/foam-extend-3.0/etc/bashrc'

Open a new terminal window

OFextend30

 

TO SUBMIT THE damBreak CASE (already run blockMesg. setFields, decomposePar):

---------------------------

Script submitDamBreak:

#==============

#!/bin/bash

#

#SBATCH -J damBreak #Name of job

#SBATCH -t 00:30:00 #HH:MM:SS

#SBATCH -N 1

#SBATCH --exclusive

#

 

#Same as alias OFextend30:

export FOAM_INST_DIR=/nobackup/global/x_hakni/ch_openfoam/Triolith/foam

export WM_COMPILER=IccHani

export WM_MPLIB=INTELMPI

module load build-environment/nsc-recommended

. $FOAM_INST_DIR/foam-extend-3.0/etc/bashrcHani

 

#--nranks is used when less than the number of available cores is used

mpprun --nranks=4 `which interFoam` -parallel -case damBreak >& log

 

# Script ends here

#==============

 

Download and modification procedure:

------------------------------------

mkdir -p $SNIC_NOBACKUP/ch_openfoam/Triolith/foam

cd $SNIC_NOBACKUP/ch_openfoam/Triolith/foam

git clone git://git.code.sf.net/p/openfoam-extend/foam-extend-3.0 foam-extend-3.0

 

COMPILATION:

------------

Open a new terminal window and type:

OFextend30

foam

./Allwmake.firstInstall

#This need you to type 'Y' to proceed!!!

#NOTE THAT cmake, openmpi etc will be compiled, perhaps not necessary!

./Allwmake #Since some may fail the first time due to parallel compilation and dependencies

Raw notes from installing OpenFOAM-2.2.x at Triolith, CentOS 6.x x86_64. 2014-01-10

HP SL230s compute nodes, equipped with two Intel E5-2660 (2.2 GHz Sandybridge) processors with 8 cores each, i.e 16 cores per node. Hyper-threading is not enabled.

Infiniband from Mellanox (FDR IB, 56 Gb/s)

 

Usage and compilation procedure at Triolith:

OpenFOAM-2.2.x, Intel installation (Icc)

-----------------------------------------------

 

TO USE (but not when downloading):

-------

Do the following line once:

echo "alias OF22x='export FOAM_INST_DIR=/nobackup/global/x_hakni/ch_openfoam/Triolith/OpenFOAM; module load build-environment/nsc-recommended cmake/2.8.8 qt/4.8.2; export MPI_ROOT=$I_MPI_ROOT; export QT_DIR=/software/apps/qt/4.8.2; export QT_BIN_DIR=$QT_DIR/bin; . $FOAM_INST_DIR/OpenFOAM-2.2.x/etc/bashrc WM_COMPILER=IccHani WM_MPLIB=INTELMPI'" >> $HOME/.bashrc

Open a new terminal window

OF22x

 

TO SUBMIT THE damBreak CASE (already run blockMesg. setFields, decomposePar):

---------------------------

Script submitDamBreak:

#==============

#!/bin/bash

#

#SBATCH -J damBreak #Name of job

#SBATCH -t 00:30:00 #HH:MM:SS

#SBATCH -N 1

#SBATCH --exclusive

#

 

#Same as alias OF22x:

export FOAM_INST_DIR=/nobackup/global/x_hakni/ch_openfoam/Triolith/OpenFOAM

module load build-environment/nsc-recommended

export MPI_ROOT=$I_MPI_ROOT

. $FOAM_INST_DIR/OpenFOAM-2.2.x/etc/bashrc WM_COMPILER=IccHani WM_MPLIB=INTELMPI

 

#--nranks is used when less than the number of available cores is used

mpprun --nranks=4 `which interFoam` -parallel -case damBreak >& log

 

# Script ends here

#==============

 

Download and modification procedure:

----------------------

export FOAM_INST_DIR=$SNIC_NOBACKUP/ch_openfoam/Triolith/OpenFOAM

mkdir -p $FOAM_INST_DIR

cd $FOAM_INST_DIR

git clone git://github.com/OpenFOAM/OpenFOAM-2.2.x.git

wget http://downloads.sourceforge.net/project/foam/foam/2.2.2/ThirdParty-2.2.2.tgz?r=http%3A%2F%2Fwww.openfoam.org%2Fdownload%2Fgit.php&ts=1389174199&use_mirror=optimate

tar xzf ThirdParty-2.2.2.tgz

rm ThirdParty-2.2.2.tgz

cp -r $FOAM_INST_DIR/OpenFOAM-2.2.x/wmake/rules/linux64Icc $FOAM_INST_DIR/OpenFOAM-2.2.x/wmake/rules/linux64IccHani

sed -i s/fPIC/"fPIC -Nmpi -Nmkl -xavx"/g $FOAM_INST_DIR/OpenFOAM-2.2.x/wmake/rules/linux64IccHani/c++

 

COMPILATION:

------------

Open a new terminal window and type:

OF22x

foam

./Allwmake

 

Compile paraFoam:

-----------------

Open a new terminal window and type:

OF22x

foam3rdParty

./makeParaView

cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers

./Allwclean

./Allwmake

Raw notes from installing OpenFOAM-2.2.x in StuDAT (non-root), Redhat Enterprise 6.2, VT13

Note that minus signs and perhaps some other characters have been destroyed by Word, so copy-paste might not work!
ssh vcs64-6.studat.chalmers.se
cd /chalmers/sw/unsup64/
mkdir OpenFOAM
cd OpenFOAM
git clone git://github.com/OpenFOAM/OpenFOAM-2.2.x.git

wget http://downloads.sourceforge.net/project/foam/foam/2.2.0/ThirdParty-2.2.0.tgz?r=http%3A%2F%2Fwww.openfoam.org%2Fdownload%2Fgit.php&ts=1372400532&use_mirror=kent

tar xzf ThirdParty-2.2.0.tgz

rm ThirdParty-2.2.0.tgz

mv ThirdParty-2.2.0 ThirdParty-2.2.x

cp OpenFOAM-2.2.x/etc/bashrc OpenFOAM-2.2.x/etc/bashrcHani

cp OpenFOAM-2.2.x/etc/config/settings.sh OpenFOAM-2.2.x/etc/config/settingsHani.sh

sed -i s/settings.sh/settingsHani.sh/g OpenFOAM-2.2.x/etc/bashrcHani

sed -i s/"gcc_version=gcc-4.7.2"/"gcc_version=gcc-4.7.1"/g etc/config/settingsHani.sh

sed -i s/"gmp_version=gmp-5.0.4"/"gmp_version=gmp-5.0.2"/g etc/config/settingsHani.sh

sed -i s/"mpfr_version=mpfr-3.1.0"/"mpfr_version=mpfr-3.0.1"/g etc/config/settingsHani.sh

sed -i s/"WM_COMPILER=Gcc"/"WM_COMPILER=Gcc47"/g OpenFOAM-2.2.x/etc/bashrcHani

sed -i s/"foamCompiler=system"/"foamCompiler=ThirdParty"/g OpenFOAM-2.2.x/etc/bashrcHani

sed -i s/". \$WM\_PROJECT\_DIR\/etc\/bashrc"/". \$WM\_PROJECT\_DIR\/etc\/bashrcHani"/g etc/config/aliases.sh

echo "alias OF22x='export FOAM_INST_DIR=/chalmers/sw/unsup64/OpenFOAM;. \$FOAM_INST_DIR/OpenFOAM-2.2.x/etc/bashrcHani'" >> addToBashrc

gcc --version #Gives 4.4.6. Required: 4.5.0. NOT OK!

flex --version #Gives 2.5.35. Seems to have worked ok!

export FOAM_INST_DIR=/chalmers/sw/unsup64/OpenFOAM;. $FOAM_INST_DIR/OpenFOAM-2.2.x/etc/bashrcHani

cd ThirdParty-2.2.x

wget http://ftp.gnu.org/gnu/gmp/gmp-5.0.2.tar.gz

tar xzf gmp-5.0.2.tar.gz

rm gmp-5.0.2.tar.gz

wget http://www.mpfr.org/mpfr-3.0.1/mpfr-3.0.1.tar.gz

tar xzf mpfr-3.0.1.tar.gz

rm mpfr-3.0.1.tar.gz

wget http://www.multiprecision.org/mpc/download/mpc-0.9.tar.gz

tar xzf mpc-0.9.tar.gz

rm mpc-0.9.tar.gz

wget http://gcc-uk.internet.bs/releases/gcc-4.7.1/gcc-4.7.1.tar.gz

tar xzf gcc-4.7.1.tar.gz

rm gcc-4.7.1.tar.gz

./makeGcc47

. $FOAM_INST_DIR/OpenFOAM-2.2.x/etc/bashrcHani

foam

./Allwmake

 

ParaFoam:

qmake --version #Required: 4.6.2 or newer. bash: qmake: command not found

cmake --version #Gives 2.8.7. Required: 2.8.2 or newer. Ok!

Install Qt (check preferred version in $WM_THIRD_PARTY_DIR/makeQt)

cd $WM_THIRD_PARTY_DIR

#wget http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.3.tar.gz

or, in this case:

wget http://pkgs.fedoraproject.org/repo/pkgs/qt/qt-everywhere-opensource-src-4.7.3.tar.gz/49b96eefb1224cc529af6fe5608654fe/qt-everywhere-opensource-src-4.7.3.tar.gz

tar xzf qt-everywhere-opensource-src-4.7.3.tar.gz

rm qt-everywhere-opensource-src-4.7.3.tar.gz

./makeQt

cd ..

cp OpenFOAM-2.2.x/etc/config/paraview.sh OpenFOAM-2.2.x/etc/config/paraviewHani.sh

sed -i s/paraview/paraviewHani/g OpenFOAM-2.2.x/etc/bashrcHani

echo "export QT_DIR=\$WM_THIRD_PARTY_DIR/platforms/\$WM_ARCH\$WM_COMPILER/qt-4.7.3" >> $FOAM_INST_DIR/OpenFOAM-2.2.x/etc/config/paraviewHani.sh

echo "export QT_BIN_DIR=\$QT_DIR/bin" >> $FOAM_INST_DIR/OpenFOAM-2.2.x/etc/config/paraviewHani.sh

echo "export PATH=\$QT_BIN_DIR:\$PATH" >> $FOAM_INST_DIR/OpenFOAM-2.2.x/etc/config/paraviewHani.sh

echo "export LD_LIBRARY_PATH=\$QT_DIR/lib:\$LD_LIBRARY_PATH" >> $FOAM_INST_DIR/OpenFOAM-2.2.x/etc/config/paraviewHani.sh

echo "export LIBGL_ALWAYS_INDIRECT=y #See http://www.cfd-online.com/Forums/openfoam-installation/57218-parafoam-error-could-not-find-decent-visual.html" >> $FOAM_INST_DIR/OpenFOAM-2.2.x/etc/config/paraviewHani.sh

See also:

  http://www.cfd-online.com/Forums/blogs/wyldckat/533-related-issues-paraview-openfoam-fixes-solutions.html

  http://www.cfd-online.com/Forums/blogs/wyldckat/1203-paraview-3-12-0-superbuild-openfoam.html

NOTE: Qt problem gives the following message: "Application asked to unregister timer 0x67000013 which is not registered in this thread. Fix application.". Just move the pop-up window out of sight.

NOTE: Plot-Over-Line problem through ssh gives the following message: "X Error: BadLength (poly request too large or internal Xlib length error)". See: http://www.cfd-online.com/Forums/openfoam-paraview/94419-paraview-chrashed-using-plot-over-line.html. Can be fixed by running Paraview in remote configuration (should check this out).

Open a new terminal:

OF22x

cd $WM_THIRD_PARTY_DIR

cd platforms

ln -s linux64Gcc47 linux64Gcc

./makeParaView

cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers

wmSET

./Allwclean

./Allwmake

 

Compile Debug version, without recompiling ThirdParty:

cd /chalmers/sw/unsup64/OpenFOAM

echo "alias OF22xDebug='export FOAM_INST_DIR=/chalmers/sw/unsup64/OpenFOAM;. \$FOAM_INST_DIR/OpenFOAM-2.2.x/etc/bashrcHani WM_COMPILE_OPTION=Debug'" >> addToBashrc

cd $WM_THIRD_PARTY_DIR/platforms

ln -s linux64GccDPOpt linux64GccDPDebug

Open a new terminal:

OF22xDebug

foam

./Allwmake

cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers

#Skip wmSET since it will not set Debug, see alias wmSET

./Allwclean

./Allwmake

 

foam

cd ..

chmod -R go+Xr OpenFOAM-2.2.x

chmod -R go+Xr ThirdParty-2.2.x

Installation of Python etc. in StuDAT (non-root), Redhat Enterprise 6.2, HT12

Check out www.enthought.com for an academic licence of a complete package.

After installation by running the *.sh file, simply add the path:

alias EDP='export PATH=/chalmers/sw/unsup64/OpenFOAM/epd-7.3.1-rh5-x86_64/bin:$PATH'

This seems to work nicely!

Raw notes from installing OpenFOAM-1.6-ext in StuDAT (non-root), Redhat Enterprise 6.2, HT12

Note that minus signs and perhaps some other characters have been destroyed by Word, so copy-paste might not work!
See:
    http://www.cfd-online.com/Forums/openfoam-news-announcements-other/82445-extend-project-release-1-6-ext.html
    $WM_THIRD_PARTY_DIR/README.ThirdParty
ssh vcs64-6.studat.chalmers.se
cd /chalmers/sw/unsup64/OpenFOAM
git clone git://openfoam-extend.git.sourceforge.net/gitroot/openfoam-extend/OpenFOAM-1.6-ext
cd OpenFOAM-1.6-ext
echo "alias OF16ext='export FOAM_INST_DIR=/chalmers/sw/unsup64/OpenFOAM; export QT_THIRD_PARTY=1;. \$FOAM_INST_DIR/OpenFOAM-1.6-ext/etc/bashrc'" >> addToBashrc
(NOTE: "export QT_THIRD_PARTY=1" was actually added after running AllMake in foam3rdParty, but it should be ok to add it already above instead)
Open a new terminal window
OF16ext
foam3rdParty
./AllMake
./AllMake #To check the shorter output for possible problems
If QT_THIRD_PARTY was not set above:
    Need to say that the ThirdParty Qt should be installed:
    export QT_THIRD_PARTY=yes
    ./AllMake
    NOTE: The choice between ThirdParty/system installation for other software
          is done similarly, but inverse, using XXX_SYSTEM, see settings.sh
Open a new terminal window
OF16ext
foam
./Allwmake >& log_Allwmake&
./Allwmake >& log_Allwmake& #To make sure that everything compiled
NOTE: Problem with paraview remotely:
    vtkXOpenGLRenderWindow (0x28c4830): Could not find a decent visual
    vtkXOpenGLRenderWindow (0x28c4830): Cannot create GLX context.

Raw notes from installing OpenFOAM-2.1.x in StuDAT (non-root), Redhat Enterprise 6.2, HT12

Note that minus signs and perhaps some other characters have been destroyed by Word, so copy-paste might not work!
ssh vcs64-6.studat.chalmers.se
cd /chalmers/sw/unsup64/
mkdir OpenFOAM
cd OpenFOAM
git clone git://github.com/OpenFOAM/OpenFOAM-2.1.x.git
wget http://downloads.sourceforge.net/project/foam/foam/2.1.1/ThirdParty-2.1.1.tgz?r=http%3A%2F%2Fopenfoam.org%2Fdownload%2Fgit.php&ts=1344267545&use_mirror=garr
tar xzf ThirdParty-2.1.1.tgz
rm ThirdParty-2.1.1.tgz
mv ThirdParty-2.1.1 ThirdParty-2.1.x
cp OpenFOAM-2.1.x/etc/bashrc OpenFOAM-2.1.x/etc/bashrcHani
sed -i s/paraview/paraviewHani/g OpenFOAM-2.1.x/etc/bashrcHani
cp OpenFOAM-2.1.x/etc/config/paraview.sh OpenFOAM-2.1.x/etc/config/paraviewHani.sh
echo "alias OF21x='export FOAM_INST_DIR=/chalmers/sw/unsup64/OpenFOAM;. \$FOAM_INST_DIR/OpenFOAM-2.1.x/etc/bashrcHani'" >> addToBashrc
gcc --version #Gives 4.4.6. Required: 4.3.?, recommended: 4.4.?. Ok!
flex --version #Gives 2.5.35. Seems to have worked ok!
Open a new window and type:
OF21x
foam
./Allwmake

ParaFoam:
qmake --version #Required: 4.6.2 or newer. bash: qmake: command not found
cmake --version #Gives 2.8.7. Required: 2.8.2 or newer. Ok!
Install Qt (check preferred version in $WM_THIRD_PARTY_DIR/makeQt)
cd $WM_THIRD_PARTY_DIR
wget http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.3.tar.gz
tar xzf qt-everywhere-opensource-src-4.7.3.tar.gz
rm qt-everywhere-opensource-src-4.7.3.tar.gz
./makeQt
echo "export QT_DIR=\$WM_THIRD_PARTY_DIR/platforms/\$WM_ARCH\$WM_COMPILER/qt-4.7.3" >> $FOAM_INST_DIR/OpenFOAM-2.1.x/etc/config/paraviewHani.sh
echo "export QT_BIN_DIR=\$QT_DIR/bin" >> $FOAM_INST_DIR/OpenFOAM-2.1.x/etc/config/paraviewHani.sh
echo "export PATH=\$QT_BIN_DIR:\$PATH" >> $FOAM_INST_DIR/OpenFOAM-2.1.x/etc/config/paraviewHani.sh
echo "export LD_LIBRARY_PATH=\$QT_DIR/lib:\$LD_LIBRARY_PATH" >> $FOAM_INST_DIR/OpenFOAM-2.1.x/etc/config/paraviewHani.sh
echo "export LIBGL_ALWAYS_INDIRECT=y #See http://www.cfd-online.com/Forums/openfoam-installation/57218-parafoam-error-could-not-find-decent-visual.html" >> $FOAM_INST_DIR/OpenFOAM-2.1.x/etc/config/paraviewHani.sh
See also:
  http://www.cfd-online.com/Forums/blogs/wyldckat/533-related-issues-paraview-openfoam-fixes-solutions.html
  http://www.cfd-online.com/Forums/blogs/wyldckat/1203-paraview-3-12-0-superbuild-openfoam.html
NOTE: Qt problem gives the following message: "Application asked to unregister timer 0x67000013 which is not registered in this thread. Fix application.". Just move the pop-up window out of sight.
NOTE: Plot-Over-Line problem through ssh gives the following message: "X Error: BadLength (poly request too large or internal Xlib length error)". See: http://www.cfd-online.com/Forums/openfoam-paraview/94419-paraview-chrashed-using-plot-over-line.html. Can be fixed by running Paraview in remote configuration (should check this out).
Open a new terminal:
OF21x
cd $WM_THIRD_PARTY_DIR
./makeParaView
cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers
wmSET
./Allwclean
./Allwmake
Compile Debug version, without recompiling ThirdParty:
cd /chalmers/sw/unsup64/OpenFOAM
echo "alias OF21xDebug='export FOAM_INST_DIR=/chalmers/sw/unsup64/OpenFOAM;. \$FOAM_INST_DIR/OpenFOAM-2.1.x/etc/bashrcHani WM_COMPILE_OPTION=Debug'" >> addToBashrc
cd $WM_THIRD_PARTY_DIR/platforms
ln -s linux64GccDPOpt linux64GccDPDebug
Open a new terminal:
OF21xDebug
foam
./Allwmake

cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers
wmSET
./Allwclean
./Allwmake

Raw notes from installing OpenFOAM-2.0.x on my 64-bit laptop with Ubuntu-10.04 LTS 64-bit:

Follow original instructions, except for cmake:

OF20x

sed -i s/"cmake-2.8.4"/"cmake-2.8.5"/g $HOME/OpenFOAM/OpenFOAM-2.0.x/etc/config/myParaview.sh

sed -i s/"cmake-2.8.3"/"cmake-2.8.5"/g $THIRD_PARTY_DIR/makeCmake

cd $THIRD_PARTY_DIR
wget http://www.cmake.org/files/v2.8/cmake-2.8.5.tar.gz

tar xzf cmake-2.8.5.tar.gz

rm cmake-2.8.5.tar.gz

./makeCmake

 

Raw notes from installing OpenFOAM-1.6-ext on Glenn

 

Compilation at Glenn

====================

Add alias in $HOME/bashrc:

alias OF16ext_HJ_15Apr2013='module load gcc/4.6/4.6.3 openmpi/1.5.4; FOAM_INST_DIR=$SNIC_NOBACKUP/OpenFOAM; export WM_MPLIB=SYSTEMOPENMPI; . $FOAM_INST_DIR/OpenFOAM-1.6-ext_HJ_15Apr2013/etc/bashrc'

###THIS NOT NECESSARY IF WM_MPLIB IS SET WHILE SOURCING!!! ###

###cp etc/bashrc etc/bashrcChalmers

###sed -i s/"WM_MPLIB:=OPENMPI"/"WM_MPLIB:=SYSTEMOPENMPI"/g etc/bashrcChalmers

###sed -i s/"settings.sh"/"settingsChalmers.sh"/g etc/bashrcChalmers

###cp etc/settings.sh etc/settingsChalmers.sh

###THIS NOT NECESSARY IF WM_MPLIB IS SET WHILE SOURCING!!! ###

 

New terminal window

OF16ext_HJ_15Apr2013

(Every now and then: . $WM_PROJECT_DIR/etc/bachrcChalmers)

cd ThirdParty

./AllMake.stage1 >& log_AllMake

mv rpmBuild/RPMS/x86_64/cmake-2.8.6-linux64GccDPOpt.x86_64.rpm rpmBuild/RPMS/x86_64/cmake-2.8.6.x86_64.rpm

./AllMake.stage1 >& log_AllMake1

sed -i s/"https:\/\/wci.llnl.gov\/codes\/visit\/3rd_party\/libccmio-2.6.1.tar.gz"/"http:\/\/portal.nersc.gov\/svn\/visit\/tags\/2.4.2\/third_party\/libccmio-2.6.1.tar.gz"/g AllMake.stage3

./AllMake.stage3 >& log_AllMake3

mv rpmBuild/RPMS/x86_64/mesquite-2.1.2-linux64GccDPOpt.x86_64.rpm rpmBuild/RPMS/x86_64/mesquite-2.1.2.x86_64.rpm

mv rpmBuild/RPMS/x86_64/metis-5.0pre2-linux64GccDPOpt.x86_64.rpm rpmBuild/RPMS/x86_64/metis-5.0pre2.x86_64.rpm

mv rpmBuild/RPMS/x86_64/scotch-5.1.10b-linux64GccDPOpt.x86_64.rpm rpmBuild/RPMS/x86_64/scotch-5.1.10b.x86_64.rpm

mv rpmBuild/RPMS/x86_64/ParMetis-3.1.1-linux64GccDPOpt.x86_64.rpm rpmBuild/RPMS/x86_64/ParMetis-3.1.1.x86_64.rpm

mv rpmBuild/RPMS/x86_64/ParMGridGen-1.0-linux64GccDPOpt.x86_64.rpm rpmBuild/RPMS/x86_64/ParMGridGen-1.0.x86_64.rpm

mv rpmBuild/RPMS/x86_64/libccmio-2.6.1-linux64GccDPOpt.x86_64.rpm rpmBuild/RPMS/x86_64/libccmio-2.6.1.x86_64.rpm

mv rpmBuild/RPMS/noarch/PyFoam-0.5.7-1.noarch.rpm rpmBuild/RPMS/noarch/PyFoam-0.5.7.noarch.rpm

 

foam

sed -i s/ccache//g wmake/rules/linux64Gcc/c++ #Not available at Chalmers

 

./Allwmake >& log_Allwmake

 

Special note:

Found message in forum that mesquite can't be compiled with gcc-4.6

Compiled only mesquite after (using default gcc-4.4.6)

 

Raw notes on installation of OpenFOAM-1.5-dev on Glenn

Jag förberedde för installation i $SNIC_NOBACKUP eftersom det inte går att ha två versioner installerade samtidigt i hemkatalogen, p.g.a. quota:

 

mkdir $SNIC_NOBACKUP/OpenFOAM

cd $SNIC_NOBACKUP/OpenFOAM

 

Jag laddade ner ThirdParty och packade upp dem:

wget

http://downloads.sourceforge.net/project/foam/foam/1.5/ThirdParty.General.gtgz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Ffoam%2Ffiles%2Ffoam%2F1.5%2F&ts=1332070845&use_mirror=kent

wget

http://downloads.sourceforge.net/project/foam/foam/1.5/ThirdParty.linux64Gcc.gtgz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Ffoam%2Ffiles%2Ffoam%2F1.5%2F&ts=1332070784&use_mirror=heanet

tar xzf ThirdParty.General.gtgz

tar xzf ThirdParty.linux64Gcc.gtgz

rm ThirdParty.General.gtgz

rm ThirdParty.linux64Gcc.gtgz

 

Jag checkade ut 1.5-dev:

svn co

https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/OpenFOAM-1.5-dev

 

Jag skapade en alias i ~/.bashrc:

echo "alias OF15dev='module load gcc/4.6/4.6.2 openmpi/1.5.4; FOAM_INST_DIR=$SNIC_NOBACKUP/OpenFOAM; .

$FOAM_INST_DIR/OpenFOAM-1.5-dev/etc/bashrc'" >> ~/.bashrc

 

Jag öppnade ett nytt terminalfönster och skrev:

OF15dev

 

Nu till tricket. Av någon anledning så får Make/linux64GccDPOpt/options-filerna

radbrytningar i listan av bibliotek i LIB_LIBS. Det ger sig uttryck genom ett felmeddelande innehållande "missing separator". Lösningen är att i filen:

OpenFOAM-1.5-dev/wmake/rules/linux64Gcc/general

lägga till -P i slutet av CPP-raden.

Om man har råkat testa att kompilera utan denna ändrig först så är det viktigt att städa bort tidigare kompileringar innan man försöker med denna ändring. Om lnInclude redan finns så görs den inte om, och då kvarstår problemet. Kör då:

foam

rmdepall

wcleanMachine linux64GccDPOpt

wcleanLnIncludeAll

 

Slutligen är det bara att kompliera som vanligt enligt:

foam

./Allwmake >& log_Allwmake

 

Högst troligt har src/OpenFOAM och src/finiteVolume misslyckats (kolla log-filen). Gå i så fall till src/OpenFOAM resp src/finiteVolume och gör:

rmdepall

rm -rf lnInclude

rm -rf Make/linux64GccDPOpt

wmake libso

Jag har inte lyckats att få detta att fungera i scripten av någon konstig anledning.

Kör sedan igen:

foam

./Allwmake >& log_Allwmake

 

Man får meddelanden enligt följande, vilket vi kan ignorera:

make: Warning: File `Make/linux64GccDPOpt/dontIncludeDeps' has modification time 12 s in the future

make: warning:  Clock skew detected.  Your build may be incomplete.

 

Raw notes from installing OpenFOAM-2.0.x in FoDAT (non-root), Redhat Enterprise 5.6, HT11
Note that minus signs and perhaps some other characters have been destroyed by Word, so copy-paste might not work!

This info should also be available in 00README_installation

uname -a:

Linux sugi.medic.chalmers.se 2.6.39-1.el5.elrepo #1 SMP PREEMPT Fri Jun 3 19:17:28 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
cd /scratch/hani/
mkdir OpenFOAM
cd OpenFOAM/
git clone git://github.com/OpenCFD/OpenFOAM-2.0.x.git
wget --no-check-certificate https://downloads.sourceforge.net/project/foam/foam/2.0.1/ThirdParty-2.0.1.gtgz?r=http%3A%2F%2Fopenfoam.com%2Fdownload%2Fgit.php&ts=1312968761&use_mirror=switch
tar xzf ThirdParty-2.0.1.gtgz
rm ThirdParty-2.0.1.gtgz
mv ThirdParty-2.0.1 ThirdParty-2.0.x
echo "alias OF20x='export FOAM_INST_DIR=/scratch/hani/OpenFOAM; source $FOAM_INST_DIR/OpenFOAM-2.0.x/etc/bashrc'" >> $HOME/.bashrc
Open a new window
OF20x
cd $WM_THIRD_PARTY_DIR
gcc --version #Required: 4.3.?, recommended: 4.4.?. The one default is too old!
See $WM_THIRD_PARTY_DIR/makeGcc for which packages are needed
wget ftp://ftp.gmplib.org/pub/gmp-5.0.1/gmp-5.0.1.tar.gz
tar xzf gmp-5.0.1.tar.gz
rm gmp-5.0.1.tar.gz
wget http://www.mpfr.org/mpfr-2.4.2/mpfr-2.4.2.tar.gz
tar xzf mpfr-2.4.2.tar.gz
rm mpfr-2.4.2.tar.gz
wget http://www.multiprecision.org/mpc/download/mpc-0.8.1.tar.gz
tar xzf mpc-0.8.1.tar.gz
rm mpc-0.8.1.tar.gz
wget ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-4.5.1/gcc-4.5.1.tar.gz
tar xzf gcc-4.5.1.tar.gz
rm gcc-4.5.1.tar.gz
./makeGcc #Can be killed and restarted
sed -i s/"export WM_COMPILER=Gcc"/"export WM_COMPILER=Gcc45"/g $FOAM_INST_DIR/OpenFOAM-2.0.x/etc/bashrc
sed -i s/"foamCompiler=system/"foamCompiler=ThirdParty"/g $FOAM_INST_DIR/OpenFOAM-2.0.x/etc/bashrc
sed -i s/"gcc-4.5.2"/"gcc-4.5.1"/g $FOAM_INST_DIR/OpenFOAM-2.0.x/etc/bashrc
flex --version #Available, but it will not work properly (“error: no ‘int yyFlexLexer::ywrap()’ member function declared in class ‘yyFlexer’”,):

cd $WM_THIRD_PARTY_DIR
wget http://downloads.sourceforge.net/project/flex/flex/flex-2.5.35/flex-2.5.35.tar.gz?r=http%3A%2F%2Fflex.sourceforge.net%2F&ts=1282292981&mirror=garr
tar xzf flex-2.5.35.tar.gz
rm flex-2.5.35.tar.gz
cd flex-2.5.35
./configure --prefix $WM_THIRD_PARTY_DIR/platforms/linux64/flex-2.5.35
make
make install
Set in settings.sh:
_foamAddPath $WM_THIRD_PARTY_DIR/platforms/linux64/flex-2.5.35/bin
For all the files that complained about flex, add in Make/options:
-I$(WM_THIRD_PARTY_DIR)/platforms/$(WM_ARCH)/flex-2.5.35/include
I.e.:
  src/triSurface/Make/options
  src/surfMesh/Make/options
  src/thermophysicalModels/reactionThermo/Make/options
  applications/utilities/mesh/conversion/ansysToFoam/Make/options
  applications/utilities/mesh/conversion/fluent3DMeshToFoam/Make/options
  applications/utilities/mesh/conversion/fluentMeshToFoam/Make/options
  applications/utilities/mesh/conversion/gambitToFoam/Make/options
Open new terminal window and type:
OF20x
foam
./Allwmake >& log_Allwmake_1&

Parafoam:
qmake --version #Required: 3.6.2 or newer. bash: qmake: command not found
cmake --version #Required: 2.8.2 or newer. Ok!
cd $WM_THIRD_PARTY_DIR
wget http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.3.tar.gz
tar xzf qt-everywhere-opensource-src-4.7.3.tar.gz
./makeQt
echo "export QT_DIR=\$WM_THIRD_PARTY_DIR/platforms/\$WM_ARCH\$WM_COMPILER/qt-4.7.3" >> $FOAM_INST_DIR/OpenFOAM-2.0.x/etc/config/paraview.sh
echo "export QT_BIN_DIR=\$QT_DIR/bin" >> $FOAM_INST_DIR/OpenFOAM-2.0.x/etc/config/paraview.sh
echo "export PATH=\$QT_BIN_DIR:\$PATH" >> $FOAM_INST_DIR/OpenFOAM-2.0.x/etc/config/paraview.sh
echo "export LD_LIBRARY_PATH=\$QT_DIR/lib:\$LD_LIBRARY_PATH" >> $FOAM_INST_DIR/OpenFOAM-2.0.x/etc/config/paraview.sh

Open a new terminal:
OF20x
cd $WM_THIRD_PARTY_DIR
./makeParaView
cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers
wmSET
./Allwclean
./Allwmake

 

Compile 1.6-ext in Debug mode without re-compiling ThirdParty

First do soft links from linux64GccDPOpt to linux64GccDPDebug in the following

(ln -s linux64GccDPOpt linux64GccDPDebug)
[hani@vcs64-5 ThirdParty]$ find $WM_THIRD_PARTY_DIR -name linux64GccDPDebug
/chalmers/sw/unsup64/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/mesquite-2.1.2/platforms/linux64GccDPDebug
/chalmers/sw/unsup64/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/cmake-2.8.3/platforms/linux64GccDPDebug
/chalmers/sw/unsup64/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/ParMetis-3.1.1/platforms/linux64GccDPDebug
/chalmers/sw/unsup64/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/openmpi-1.4.3/platforms/linux64GccDPDebug
/chalmers/sw/unsup64/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/metis-5.0pre2/platforms/linux64GccDPDebug
/chalmers/sw/unsup64/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/ParMGridGen-1.0/platforms/linux64GccDPDebug
/chalmers/sw/unsup64/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/ParaView-3.8.1/platforms/linux64GccDPDebug
/chalmers/sw/unsup64/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/scotch-5.1.10b/platforms/linux64GccDPDebug

Then use WM_COMPILE_OPTION=Debug and run Allwmake

Installation of Python etc. in unsup64

 

Check out www.enthought.com for an academic licence of a complete package.

After installation by running the *.sh file, simply add the path:

alias EDP='export PATH=/chalmers/sw/unsup64/OpenFOAM/edp-7.1.2-rh5-x86_64/bin:$PATH'

This seems to work nicely!

 

Some initial attempts to install Python-2.6.7 and numpy-1.6.1:

2.7* did not work to make

Done directly in unsup64:
cd /chalmers/sw/unsup64/OpenFOAM/linuxSrc/
wget http://www.python.org/ftp/python/2.6.7/Python-2.6.7.tgz
tar xzf Python-2.6.7.tgz
rm Python-2.6.7.tgz
cd Python-2.6.7
Read README file:
Don't have PYTHONPATH and PYTHONHOME set when making Python
./configure --prefix /chalmers/sw/unsup64/OpenFOAM/Python-2.6.7
make
make install

add PATH to the bin directory of the installation, overriding other installations:

alias PNM='export PATH=/chalmers/sw/unsup64/OpenFOAM/Python-2.6.7/bin:$PATH;export PYTHONPATH=/chalmers/sw/unsup64/OpenFOAM/numpy-1.6.1/lib/python2.6/site-packages:$PYTHONPATH'

(the numpy part is of course so that Python finds numpy when importing)

 

Make sure to use Python2.6 first
/chalmers/sw/unsup64/OpenFOAM/linuxSrc/
wget --no-check-certificate https://downloads.sourceforge.net/project/numpy/NumPy/1.6.1/numpy-1.6.1.tar.gz?r=&ts=1313070315&use_mirror=netcologne
tar xzf numpy-1.6.1.tar.gz
rm numpy-1.6.1.tar.gz
cd numpy-1.6.1
python setup.py install --prefix /chalmers/sw/unsup64/OpenFOAM/numpy-1.6.1
export PYTHONPATH=/chalmers/sw/unsup64/OpenFOAM/numpy-1.6.1/lib/python2.6/site-packages:$PYTHONPATH

Compilation of gcc-4.3.1 and using it to compile OpenFOAM-1.5-dev

If you don't have the correct version of gcc (4.3.1 or newer, see gcc.gnu.org), then do the following (for 32 bit, some minor changes are required for 64 bit, like linux64 instead of linux):

1.      Install gcc 4.3.1. This requires that either any version of cc or gcc are available already. It also requires that two libraries, mpfr and gmp, are available, which is the reason to the lengthy installation procedure below:

cd $HOME/OpenFOAM/ThirdParty
mkdir gmp-4.3.2
mkdir mpfr-2.3.2
mv gcc-4.3.1 gcc-4.3.1_orig; mkdir -p gcc-4.3.1/platforms/linux
mkdir linuxSrc; cd linuxSrc
wget ftp://ftp.gmplib.org/pub/gmp-4.3.2/gmp-4.3.2.tar.gz
tar xzf gmp-4.3.2.tar.gz
cd gmp-4.3.2
./configure --prefix=$HOME/OpenFOAM/ThirdParty/gmp-4.3.2 2>&1 | tee log_configure
make 2>&1 | tee log_make #Check this file for error messages!
make check 2>&1 | tee log_make_check #Check this file for error messages!
make install 2>&1 | tee log_make_install #Check this file for error messages!
cd ..
wget http://www.mpfr.org/mpfr-2.3.2/mpfr-2.3.2.tar.gz
tar xzf mpfr-2.3.2.tar.gz
cd mpfr-2.3.2
./configure --prefix=$HOME/OpenFOAM/ThirdParty/mpfr-2.3.2 --with-gmp=$HOME/OpenFOAM/ThirdParty/gmp-4.3.2 2>&1 | tee log_configure
make 2>&1 | tee log_make #Check this file for error messages!
make check 2>&1 | tee log_make_check #Check this file for error messages!
make install 2>&1 | tee log_make_install #Check this file for error messages!
cd ..
wget http://gcc-uk.internet.bs/releases/gcc-4.3.1/gcc-4.3.1.tar.gz
tar xzf gcc-4.3.1.tar.gz
cd gcc-4.3.1
make distclean #This is only necessary if gcc has been built before, but doesn't hurt
./configure --prefix=$HOME/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux -enable-languages=c,c++ --with-gmp=$HOME/OpenFOAM/ThirdParty/gmp-4.3.2 --with-mpfr=$HOME/OpenFOAM/ThirdParty/mpfr-2.3.2 2>&1 | tee log_configure
make 2>&1 | tee log_make #Check this file for error messages!
make install 2>&1 | tee log_make_install #Check this file for error messages!

Before compiling OpenFOAM-1.5-dev we need to make sure that our freshly compiled gcc will be used, which is done by a change in $WM_PROJECT_DIR/etc/settings.h:
Change:

#compilerInstall=OpenFOAM
compilerInstall=System

to:

compilerInstall=OpenFOAM
#compilerInstall=System

Then open a new terminal window and do the following:

OF15dev
foam
./Allwmake 2>&1 | tee log_Allwmake

The compilation will take something in the order of four hours.

Problem with flex

If you get an error message saying something like: “error: no ‘int yyFlexLexer::ywrap()’ member function declared in class ‘yyFlexer’”, then that can be solved by compiling your own flex-2.5.35:

 

mkdir -p $WM_THIRD_PARTY_DIR/flex-2.5.35
cd $WM_THIRD_PARTY_DIR/linuxSrc
wget http://downloads.sourceforge.net/project/flex/flex/flex-2.5.35/flex-2.5.35.tar.gz?r=http%3A%2F%2Fflex.sourceforge.net%2F&ts=1282292981&mirror=garr
tar xzf flex-2.5.35.tar.gz
cd flex-2.5.35
./configure --prefix $WM_THIRD_PARTY_DIR/flex-2.5.35 2>&1 | tee log_configure
make 2>&1 | tee log_make
make install 2>&1 | tee log_make_install

Set in settings.sh:

export PATH=$WM_THIRD_PARTY_DIR/flex-2.5.35/bin:$PATH

For all the files that complained about flex, add in Make/options:
-I$(WM_THIRD_PARTY_DIR)/flex-2.5.35/include

Install VTK to make a GUI with a visualization window

Here I dump some preliminary information on how to install VTK in FoDAT

For some reason you need the tk_dev package in order to use Python wrap.

cd $HOME/OpenFOAM/linuxSrc

wget http://www.vtk.org/files/release/5.6/vtk-5.6.1.tar.gz

tar xzf vtk-5.6.1.tar.gz

cd ..

mkdir VTK-build

cd VTK-build

ccmake ../linuxSrc/VTK

In ccmake, press ‘c’ to configure, and ‘Enter’ to change values:

Make sure to set:

BUILD_SHARED_LIBS to ON

VTK_WRAP_PYTHON to ON

CMAKE_INSTALL_PREFIX to $HOME/OpenFOAM/VTK-build (or wherever you have put it)

Then press ‘c’ to configure again and ‘g’ to save the configuration and exit, and continue in the terminal window…

make

Before the next command it seems to be necessary to do “export PYTHONPATH=$FOAM_INST_DIR/VTK-build/lib/python2.4/site-packages”

make install

Then it failed since there was a directory missing. I just added it and run make install again.

Then set:

export LD_LIBRARY_PATH=/chalmers/sw/unsup64/OpenFOAM/VTK-build/bin:$FOAM_INST_DIR/VTK-build/lib/python2.4/site-packages/VTK-5.6.1-py2.4.egg/vtk:$FOAM_INST_DIR/VTK-build/lib/vtk-5.6:$LD_LIBRARY_PATH

export PYTHONPATH=/chalmers/sw/unsup64/OpenFOAM/VTK/Wrapping/Python:/chalmers/sw/unsup64/OpenFOAM/VTK-build/bin:$FOAM_INST_DIR/VTK-build/lib/python2.4/site-packages:$PYTHONPATH

i.e. note that the original VTK directory can not be removed. Don’t know why Wrapping is not installed to VTK-build.

Install PyQt4 to make a GUI

Here I dump some preliminary information on how to install PyQt4 in FoDAT:

First make sure that qt was installed in the same location as it is located, i.e. DON’T MOVE QT after it has been installed – it remembers the original path!

First source OpenFOAM and the available qt installation (see above for OF-1.7.x. Note: QMAKESPEC, below, should not be set before installing qt):

OF17x

Then install SIP:

cd $FOAM_INST_DIR

mkdir sip-4.11.2

cd $FOAM_INST_DIR/linuxSrc/sip-4.11.2

python configure.py –b $FOAM_INST_DIR/sip-4.11.2 –e $FOAM_INST_DIR/sip-4.11.2 –d $FOAM_INST_DIR/sip-4.11.2 –v $FOAM_INST_DIR/sip-4.11.2

Then install PyQt-x11-gpl-4.8.1:

cd $FOAM_INST_DIR/linuxSrc/PyQt-x11-gpl-4.8.1

export PYTHONPATH=$FOAM_INST_DIR/sip-4.11.2

export QTDIR=$FOAM_INST_DIR/ThirdParty-1.7.x/qt-everywhere-opensource-src-4.6.3

export QMAKESPEC=$QTDIR/mkspecs/linux-g++-64

python configure.py --verbose --confirm-license -b $FOAM_INST_DIR/PyQt-x11-gpl-4.8.1 -d $FOAM_INST_DIR/PyQt-x11-gpl-4.8.1

make

make install

The following is probably not needed:

export LD_LIBRARY_PATH=$FOAM_INST_DIR/PyQt-x11-gpl-4.8.1/PyQt:$LD_LIBRARY_PATH

The following IS needed:

export PYTHONPATH=$FOAM_INST_DIR/PyQt-x11-gpl-4.8.1:$PYTHONPATH

Qt documentation:

doc.qt.nokia.com

Old raw notes from installations in RedHat 5, Studat:

addToBashrc file

#aliases:

#OF* for OpenFOAM versions

#PF* for PyPoam versions

 

alias OF15dev='export FOAM_INST_DIR=/chalmers/sw/unsup64/OpenFOAM; . $FOAM_INST_DIR/OpenFOAM-1.5-dev/etc/bashrc'

alias OF16x='export FOAM_INST_DIR=/chalmers/sw/unsup64/OpenFOAM; . $FOAM_INST_DIR/OpenFOAM-1.6.x/etc/bashrc'

alias OF16xDebug='export FOAM_INST_DIR=/chalmers/sw/unsup64/OpenFOAM; export WM_COMPILE_OPTION=Debug; . $FOAM_INST_DIR/OpenFOAM-1.6.x/etc/bashrc'

alias OF16ext='export FOAM_INST_DIR=/chalmers/sw/unsup64/OpenFOAM; . $FOAM_INST_DIR/OpenFOAM-1.6-ext/etc/bashrcChalmers'

alias OF16extGcc431='export FOAM_INST_DIR=/chalmers/sw/unsup64/OpenFOAM; . $FOAM_INST_DIR/OpenFOAM-1.6-ext/etc/bashrcChalmersGcc431'

alias OF16extDebug='export WM_COMPILE_OPTION=Debug; export FOAM_INST_DIR=/chalmers/sw/unsup64/OpenFOAM; . $FOAM_INST_DIR/OpenFOAM-1.6-ext/etc/bashrcChalmers'

alias OF17x='export FOAM_INST_DIR=/chalmers/sw/unsup64/OpenFOAM;. $FOAM_INST_DIR/OpenFOAM-1.7.x/etc/bashrc'

alias OF17xWithPyFoamGUI='export FOAM_INST_DIR=/chalmers/sw/unsup64/OpenFOAM;. $FOAM_INST_DIR/OpenFOAM-1.7.x/etc/bashrc;export PYTHONPATH=$FOAM_INST_DIR/sip-4.11.2:$FOAM_INST_DIR/PyQt-x11-gpl-4.8.1:$FOAM_INST_DIR/PyFoam/lib/python2.4/site-packages:$FOAM_INST_DIR/PyFoam/bin:$FOAM_INST_DIR/VTK-build/Wrapping/Python:$FOAM_INST_DIR/VTK-build/bin:$FOAM_INST_DIR/VTK-build/lib/python2.4/site-packages:$PYTHONPATH;export QTDIR=$FOAM_INST_DIR/ThirdParty-1.7.x/qt-everywhere-opensource-src-4.6.3;export QMAKESPEC=$QTDIR/mkspecs/linux-g++-64;export LD_LIBRARY_PATH=$FOAM_INST_DIR/VTK-build/bin:$FOAM_INST_DIR/VTK-build/lib/python2.4/site-packages/VTK-5.6.1-py2.4.egg/vtk:$FOAM_INST_DIR/VTK-build/lib/vtk-5.6:$LD_LIBRARY_PATH'

alias OF17xDebug='export WM_COMPILE_OPTION=Debug; export FOAM_INST_DIR=/chalmers/sw/unsup64/OpenFOAM;. $FOAM_INST_DIR/OpenFOAM-1.7.x/etc/bashrc'

alias OF20x='export FOAM_INST_DIR=/chalmers/sw/unsup64/OpenFOAM; . $FOAM_INST_DIR/OpenFOAM-2.0.x/etc/bashrc'

alias PF='export PYTHONPATH=/chalmers/sw/unsup64/OpenFOAM/PyFoam/lib/python2.4/site-packages:$PYTHONPATH;export PATH=/chalmers/sw/unsup64/OpenFOAM/PyFoam/bin:$PATH'

alias PF056='export PYTHONPATH=/chalmers/sw/unsup64/OpenFOAM/PyFoam/lib/python2.4/site-packages:$PYTHONPATH;export PATH=/chalmers/sw/unsup64/OpenFOAM/PyFoam-0.5.6/bin:$PATH'

#Python, Numpy, Matplotlib:

alias PNM='export PATH=/chalmers/sw/unsup64/OpenFOAM/Python-2.6.7/bin:$PATH;export PYTHONPATH=/chalmers/sw/unsup64/OpenFOAM/numpy-1.6.1/lib/python2.6/site-packages:$PYTHONPATH'

alias EPD='export PATH=/chalmers/sw/unsup64/OpenFOAM/epd-7.1-2-rh5-x86_64/bin:$PATH'

Installation of OpenFOAM-1.7.x on RedHat 5, 64 bit, StuDat

It was not possible to compile with the system compiler.

It was not possible to compile the 4.4.3 gcc compiler.

I had to copy the compiled gcc, mpfr, gmp from ThirdParty into ThirdParty-1.7.x/platforms/linux64 (check the file structure!) and set the version numbers in etc/settings.sh

 

I also had to do the same flex procedure as for 1.5-dev:

Copy the already compiled flex from ThirdParty (compiled with configure/make/make install).

Add in settings.sh:

_foamAddPath $WM_THIRD_PARTY_DIR/flex-2.5.35/bin

_foamAddLib $WM_THIRD_PARTY_DIR/flex-2.5.35/lib

Add in Make/Options the following include flag:

-I$(WM_THIRD_PARTY_DIR)/flex-2.5.35/include

for all the libraries and applications that complain something like:

error: no 'int yyFlexLexer::yywrap()' member function declared in class 'yyFlexLexer'

 

Note that some applications wouldn't re-compile without explicitly doing wclean in those directories

Installation of OpenFOAM-1.5-dev on Redhat 5, 64-bit, StuDat:

 

Note: I did not bother to have the Paraview and the reader compiled, since I installed the pre-compiler 3.0.8 version. Let's see if it works! For that I had to change in bin/paraFoam:

caseFile=”$caseName.foam”

 

I needed to have the correct version of gcc. I installed it in ThirdParty, but then also Erik did it in the system. The way to use the good system gcc is:

vcs-select -p gcc-4.3.1

 

My installation of gcc:

Standard installation of gcc, mpfr and gmp

./configure --prefix ???c,c++  --with-mpfr= --with-gmp=

make

make install

Make sure to add the mpfr and gmp libraries in LD_LIBRARY_PATH, in settings.sh

Note that it is not possible to export those before sourcing OpenFOAM, since they will be delete

 

I needed to install flex. Typical error message:

error: no 'int yyFlexLexer::yywrap()' member function declared in class 'yyFlexLexer'

Installed in ThirdParty, using regular configure/make/make_install, and to set the path to that flex executable:

mkdir -p $WM_THIRD_PARTY_DIR/flex-2.5.35

cd $WM_THIRD_PARTY_DIR/linuxSrc

wget http://downloads.sourceforge.net/project/flex/flex/flex-2.5.35/flex-2.5.35.tar.gz?r=http%3A%2F%2Fflex.sourceforge.net%2F&ts=1282292981&mirror=garr

tar xzf flex-2.5.35.tar.gz

cd flex-2.5.35

./configure --prefix $WM_THIRD_PARTY_DIR/flex-2.5.35 >& log_configure

make >& log_make

make install >& log_make_install

Set in settings.sh:

export PATH=$WM_THIRD_PARTY_DIR/flex-2.5.35/bin:$PATH

I then also had to point at the correct include file in:

src/triSurface/Make/options:

EXE_INC = \

    -I$(WM_THIRD_PARTY_DIR)/zlib-1.2.3 \

    -I$(WM_THIRD_PARTY_DIR)/flex-2.5.35/include

and in:

src/thermophysicalModels/combustion/Make/options:

EXE_INC = \

    -I$(LIB_SRC)/finiteVolume/lnInclude \

    -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \

    -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \

    -I$(WM_THIRD_PARTY_DIR)/flex-2.5.35/include

same in:

fluentDataToFoam

gambitToFoam

ansysToFoam

fluent3DMeshToFoam

fluentMeshToFoam

Installation of Gcc in ThirdParty-1.5.x, RedHat 5, StuDat

Standard installation of gcc, mpfr and gmp

 

Standard installation of gcc, mpfr and gmp

 

./configure --prefix ???c,c++  --with-mpfr= --with-gmp=

make

make install

 

Make sure to add the mpfr and gmp libraries in LD_LIBRARY_PATH, in settings.sh

Note that it is not possible to export those before sourcing OpenFOAM, since they will be delete

Installation of Gcc in ThirdParty-1.7.x, RedHat 5, Studat

cd to ThirdParty-1.7.x

mkdir gcc-4.4.3

mkdir linuxSrc

cd linuxSrc

wget ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.4.3/gcc-4.4.3.tar.gz

tar xzf gcc-4.4.3.tar.gz

cd gcc-4.4.3

./configure --prefix=/scratch/hani/OpenFOAM/ThirdParty-1.7.x/gcc-4.4.3/platforms/linux64 -enable-languages=c,c++ --with-gmp=/chalmers/sw/sup64/gmp-5.0.1 --with-mpfr=/chalmers/sw/sup64/mpfr-3.0.0 >& log_configure

make >& log_make

Installation of numpy-1.6.1, RedHat 5, StuDat

Make sure to use Python2.6 first

/chalmers/sw/unsup64/OpenFOAM/linuxSrc/

wget --no-check-certificate https://downloads.sourceforge.net/project/numpy/NumPy/1.6.1/numpy-1.6.1.tar.gz?r=&ts=1313070315&use_mirror=netcologne

tar xzf numpy-1.6.1.tar.gz

rm numpy-1.6.1.tar.gz

cd numpy-1.6.1

python setup.py install --prefix /chalmers/sw/unsup64/OpenFOAM/numpy-1.6.1

export PYTHONPATH=/chalmers/sw/unsup64/OpenFOAM/numpy-1.6.1/lib/python2.6/site-packages:$PYTHONPATH

Installation of PyFoam-0.5.6, RedHat 5, Studat

Directly in unsup64, so write access is needed:

cd /chalmers/sw/unsup64/OpenFOAM/linuxSrc/

wget http://openfoamwiki.net/images/b/b8/PyFoam-0.5.6.tar.gz

tar xzf PyFoam-0.5.6.tar.gz

rm PyFoam-0.5.6.tar.gz

python setup.py install --prefix=/chalmers/sw/unsup64/OpenFOAM/PyFoam-0.5.6

echo "alias PF056='export PYTHONPATH=/chalmers/sw/unsup64/OpenFOAM/PyFoam/lib/python2.4/site-packages:\$PYTHONPATH;export PATH=/chalmers/sw/unsup64/OpenFOAM/PyFoam-0.5.6/bin:\$PATH'" >> /chalmers/sw/unsup64/OpenFOAM/addToBashrc

Installation of PyQt-x11-gpl-4.8.1, RedHat 5, StuDat

Basic procedure:

OF17x NOTE that qt was compiled in /scratch and then moved to /chalmers, which causes a problem!!! Re-compile qt in the correct location!!!

export PYTHONPATH=$FOAM_INST_DIR/sip-4.11.2

export QTDIR=$FOAM_INST_DIR/ThirdParty-1.7.x/qt-everywhere-opensource-src-4.6.3

export QMAKESPEC=$QTDIR/mkspecs/linux-g++-64

python configure.py --verbose --confirm-license -b $FOAM_INST_DIR/PyQt-x11-gpl-4.8.1 -d $FOAM_INST_DIR/PyQt-x11-gpl-4.8.1

make

make install

Installation of Python-2.6.7, RedHat 5, StuDat

Done directly in unsup64:

cd /chalmers/sw/unsup64/OpenFOAM/linuxSrc/

wget http://www.python.org/ftp/python/2.6.7/Python-2.6.7.tgz

tar xzf Python-2.6.7.tgz

rm Python-2.6.7.tgz

cd Python-2.6.7

Read README file:

Don't have PYTHONPATH and PYTHONHOME set when making Python

./configure --prefix /chalmers/sw/unsup64/OpenFOAM/Python-2.6.7

make

make install

Installation of sip-4.11.2, RedHat 5, StuDat

python configure.py -b $FOAM_INST_DIR/sip-4.11.2 -e $FOAM_INST_DIR/sip-4.11.2 -d $FOAM_INST_DIR/sip-4.11.2 -v $FOAM_INST_DIR/sip-4.11.2

Installation of Gcc-4.3.1, RedHat 5, StuDat, by support

# Hämta

cd /chalmers/sw/sup64/gcc-4.3.1/dist

wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.3.1/gcc-4.3.1.tar.bz2

# Installera

bzcat gcc-4.3.1.tar.bz2 | tar xvf -

mkdir objdir

cd objdir

setenv LD_LIBRARY_PATH "/chalmers/sw/sup64/gmp-4.3.2/lib:/chalmers/sw/sup64/mpfr-2.3.2/lib:/chalmers/sw/sup64/mpc-0.8.2/lib"

setenv LD_RUN_PATH "/chalmers/sw/sup64/gmp-4.3.2/lib:/chalmers/sw/sup64/mpfr-2.3.2/lib:/chalmers/sw/sup64/mpc-0.8.2/lib"

../gcc-4.3.1/configure --prefix=/chalmers/sw/sup64/gcc-4.3.1 \

                       --enable-languages="c,c++,fortran,objc" \

                       --with-gmp=/chalmers/sw/sup64/gmp-4.3.2 \

                       --with-mpfr=/chalmers/sw/sup64/mpfr-2.3.2 \

                       --with-mpc=/chalmers/sw/sup64/mpc-0.8.2 \

                       --disable-nls |& tee output.configure

make bootstrap MAKE="make -j 8" -j 8 |& tee output.make_bootstrap

make install |& tee output.make_install

# Fixa mjuklänkar för saknade manualblad.

cd /chalmers/sw/sup64/gcc-4.3.1/man/man1

ln g++.1 c++.1

ln -s c++.1 x86_64-unknown-linux-gnu-c++.1

ln -s g++.1 x86_64-unknown-linux-gnu-g++.1

ln -s gcc.1 x86_64-unknown-linux-gnu-gcc.1

ln -s gcc.1 x86_64-unknown-linux-gnu-gcc-4.3.1.1

ln -s gfortran.1 x86_64-unknown-linux-gnu-gfortran.1

# Fixa wrapprar.

cd /chalmers/sw/sup64/gcc-4.3.1

mkdir wbin

foreach i (`ls bin`)

foreach? cat - > wbin/${i} << EOF

foreach? #!/bin/sh

foreach? exec /chalmers/sw/sup64/gcc-4.3.1/bin/${i} \${1+"\$@"}

foreach? EOF

foreach? chmod a+x wbin/${i}

foreach? end

# Fixa filskydd

chgrp -R sup /chalmers/sw/sup64/gcc-4.3.1

chmod -R go=u,o-w /chalmers/sw/sup64/gcc-4.3.1

# Rensa.

rm -rf /chalmers/sw/sup64/gcc-4.3.1/dist/gcc-4.3.1

rm -rf /chalmers/sw/sup64/gcc-4.3.1/dist/objdir