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

Walkthrough: Installation of OpenFOAM-1.6-ext on openSUSE 12.2 64-bit

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 4 Post By wenterodt

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 24, 2012, 15:51
Default Walkthrough: Installation of OpenFOAM-1.6-ext on openSUSE 12.2 64-bit
  #1
New Member
 
Tammo Wenterodt
Join Date: Mar 2009
Posts: 24
Rep Power: 17
wenterodt is on a distinguished road
Installation of OpenFOAM-1.6-ext on openSUSE 12.2 64-bit
--------------------------------------------------------------------------------

We assume you have a fresh installation of openSUSE 12.2 64-bit, with all the
necessary updates already applied

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

# Installation of additional system packages:

sudo zypper install git
sudo zypper install openmpi-devel
sudo zypper install gnuplot
sudo zypper install -t pattern devel_qt4

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

# Download OpenFOAM-1.6-ext

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

# apply the hotfix for gcc4.7 by Philippose Rajan
git branch hotfix/gcc47
git checkout hotfix/gcc47

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

# We need to tweak our OpenFOAM setup using the prefs.sh file

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

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

# In order to speed up compilation, we can increase the number of processors
# to be used for compilations to the number of available processors
# i.e. change line 131 of ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc to e.g.
: ${WM_NCOMPPROCS:=4}; export WM_NCOMPPROCS

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

# We are going to use the system installed version of gcc-4.7.1

# Modify the etc/prefs.sh file to switch to gcc 4.7.1
sed -i s/"compilerInstall=System"/"compilerInstall=System\nWM_COMPILER=Gcc47"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh

# copy make rules from 4.6
cp -r ~/OpenFOAM/OpenFOAM-1.6-ext/wmake/rules/linux64Gcc46 ~/OpenFOAM/OpenFOAM-1.6-ext/wmake/rules/linux64Gcc47

# due to stricter name lookup rules in 4.7 we need to tell the compiler to lighten up on this
# in ~/OpenFOAM/OpenFOAM-1.6-ext/wmake/rules/linux64Gcc47/c++ add the compile option "-fpermissive" to line 11 so that it reads:
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC -fpermissive

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

# We are going to use the system installed version of openmpi-1.5.4
#
# No need to run AllMake.stage2
sed -i s/"#export WM_MPLIB=SYSTEMOPENMPI"/"export WM_MPLIB=SYSTEMOPENMPI"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
sed -i s/"#export OPENMPI_DIR=path_to_system_installed_openmpi"/"export OPENMPI_DIR=\/usr\/lib64\/mpi\/gcc\/openmpi"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
sed -i s/"#export OPENMPI_BIN_DIR=\$OPENMPI_DIR\/bin"/"export OPENMPI_BIN_DIR=\$OPENMPI_DIR\/bin"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh


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

# We are going to use the system installed development version of Qt 4.8.1
# (I actually used 4.8.3 from build.opensuse.org/KDE. Can someone please confirm if 4.8.1 works, too?)

# Uncomment and modify the initialization of the variables QT_DIR and QT_BIN_DIR in the
# file prefs.sh

sed -i s/"#export QT_DIR=path_to_system_installed_qt"/"export QT_DIR=\/usr"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
sed -i s/"#export QT_BIN_DIR=\$QT_DIR\/bin"/"export QT_BIN_DIR=\$QT_DIR\/bin"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh

# This section of the prefs.sh file should now look like this:

#export QT_THIRD_PARTY=1
export QT_DIR=/usr
export QT_BIN_DIR=$QT_DIR/bin

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

# Source this initial OpenFOAM environment to get the basic configuration for
# compilation
. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc

# Compile the ThirdParty packages

cd $WM_PROJECT_DIR/ThirdParty
./AllMake.stage1
./AllMake.stage3

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

# paraview needs some special care due to a bug which would prevent compilation. Two files have to be
# altered after download, preventing a smooth run of AllMake.stage4.
# Instead a function of AllMake.stage4 which calls rpmbuild is changed and executed several times
# in order to pass the correct options to rpmbuild, doing step by step.
# Each run but the last will end with an error message
# The author is aware of this being a dirty hack and open for constructive criticism.

# in order to first only download and unpack the paraview sources (without compiling, thus adding -bp option)
# change line 158 of ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/tools/makeThirdPartyFunctionsForRPM to
rpmbuild -bp --define "_topdir $buildBase" --dbpath $buildBase/rpmDB -bb ./SPECS/$specFile "$@"

# run the skript
./AllMake.stage4

# Now two files need to be altered (for details see http://www.vtk.org/Bug/view.php?id=12881)
# in ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/rpmBuild/BUILD/ParaView-3.12.0/Utilities/Xdmf2/vtk/Testing/Cxx/XdmfTestVTKIO.cxx
# in line 39 add
#include <unistd.h>

# in ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/rpmBuild/BUILD/ParaView-3.12.0/Qt/Core/pqServerManagerSelectionModel.h
# change line 75 such that it reads
ClearAndSelect = static_cast<int>(Clear) | static_cast<int>(Select)

# now change line 158 of ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/tools/makeThirdPartyFunctionsForRPM to
rpmbuild --short-circuit -bc --define "_topdir $buildBase" --dbpath $buildBase/rpmDB -bb ./SPECS/$specFile "$@"

# build paraview
./AllMake.stage4

# now change line 158 of ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/tools/makeThirdPartyFunctionsForRPM to
rpmbuild --short-circuit -bi --define "_topdir $buildBase" --dbpath $buildBase/rpmDB -bb ./SPECS/$specFile "$@"

# install paraview on build system
./AllMake.stage4

# now change line 158 of ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/tools/makeThirdPartyFunctionsForRPM to
rpmbuild --short-circuit -bb --define "_topdir $buildBase" --dbpath $buildBase/rpmDB -bb ./SPECS/$specFile "$@"

# create binaries from rpm
./AllMake.stage4

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

# Update your OpenFOAM environment to get the basic configuration from the newly
# compiled ThirdParty packages

. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc

# Compile OpenFOAM-1.6-ext

cd $WM_PROJECT_DIR
./Allwmake >& log.Allwmake &
tail -f log.Allwmake # To keep an eye on the compilation process

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

# Run a tutorial to check the basic functionality

cd $FOAM_TUTORIAL/incompressible/simpleFoam/pitzDaily
blockMesh >& log.blockMesh
simpleFoam >& log.simpleFoam
paraFoam

# You are done!

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

Tammo Wenterodt 2012-10-24

based on
Martin Beaudoin May 2012
http://openfoam-extend.git.sourcefor...s/heads/master
wenterodt is offline   Reply With Quote

Old   November 22, 2012, 10:04
Default
  #2
New Member
 
Jianxi Yao
Join Date: Apr 2011
Posts: 17
Rep Power: 15
jianxiyao is on a distinguished road
Quote:
Originally Posted by wenterodt View Post
Installation of OpenFOAM-1.6-ext on openSUSE 12.2 64-bit
--------------------------------------------------------------------------------

We assume you have a fresh installation of openSUSE 12.2 64-bit, with all the
necessary updates already applied

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

# Installation of additional system packages:

sudo zypper install git
sudo zypper install openmpi-devel
sudo zypper install gnuplot
sudo zypper install -t pattern devel_qt4

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

# Download OpenFOAM-1.6-ext

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

# apply the hotfix for gcc4.7 by Philippose Rajan
git branch hotfix/gcc47
git checkout hotfix/gcc47

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

# We need to tweak our OpenFOAM setup using the prefs.sh file

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

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

# In order to speed up compilation, we can increase the number of processors
# to be used for compilations to the number of available processors
# i.e. change line 131 of ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc to e.g.
: ${WM_NCOMPPROCS:=4}; export WM_NCOMPPROCS

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

# We are going to use the system installed version of gcc-4.7.1

# Modify the etc/prefs.sh file to switch to gcc 4.7.1
sed -i s/"compilerInstall=System"/"compilerInstall=System\nWM_COMPILER=Gcc47"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh

# copy make rules from 4.6
cp -r ~/OpenFOAM/OpenFOAM-1.6-ext/wmake/rules/linux64Gcc46 ~/OpenFOAM/OpenFOAM-1.6-ext/wmake/rules/linux64Gcc47

# due to stricter name lookup rules in 4.7 we need to tell the compiler to lighten up on this
# in ~/OpenFOAM/OpenFOAM-1.6-ext/wmake/rules/linux64Gcc47/c++ add the compile option "-fpermissive" to line 11 so that it reads:
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC -fpermissive

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

# We are going to use the system installed version of openmpi-1.5.4
#
# No need to run AllMake.stage2
sed -i s/"#export WM_MPLIB=SYSTEMOPENMPI"/"export WM_MPLIB=SYSTEMOPENMPI"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
sed -i s/"#export OPENMPI_DIR=path_to_system_installed_openmpi"/"export OPENMPI_DIR=\/usr\/lib64\/mpi\/gcc\/openmpi"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
sed -i s/"#export OPENMPI_BIN_DIR=\$OPENMPI_DIR\/bin"/"export OPENMPI_BIN_DIR=\$OPENMPI_DIR\/bin"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh


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

# We are going to use the system installed development version of Qt 4.8.1
# (I actually used 4.8.3 from build.opensuse.org/KDE. Can someone please confirm if 4.8.1 works, too?)

# Uncomment and modify the initialization of the variables QT_DIR and QT_BIN_DIR in the
# file prefs.sh

sed -i s/"#export QT_DIR=path_to_system_installed_qt"/"export QT_DIR=\/usr"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
sed -i s/"#export QT_BIN_DIR=\$QT_DIR\/bin"/"export QT_BIN_DIR=\$QT_DIR\/bin"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh

# This section of the prefs.sh file should now look like this:

#export QT_THIRD_PARTY=1
export QT_DIR=/usr
export QT_BIN_DIR=$QT_DIR/bin

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

# Source this initial OpenFOAM environment to get the basic configuration for
# compilation
. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc

# Compile the ThirdParty packages

cd $WM_PROJECT_DIR/ThirdParty
./AllMake.stage1
./AllMake.stage3

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

# paraview needs some special care due to a bug which would prevent compilation. Two files have to be
# altered after download, preventing a smooth run of AllMake.stage4.
# Instead a function of AllMake.stage4 which calls rpmbuild is changed and executed several times
# in order to pass the correct options to rpmbuild, doing step by step.
# Each run but the last will end with an error message
# The author is aware of this being a dirty hack and open for constructive criticism.

# in order to first only download and unpack the paraview sources (without compiling, thus adding -bp option)
# change line 158 of ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/tools/makeThirdPartyFunctionsForRPM to
rpmbuild -bp --define "_topdir $buildBase" --dbpath $buildBase/rpmDB -bb ./SPECS/$specFile "$@"

# run the skript
./AllMake.stage4

# Now two files need to be altered (for details see http://www.vtk.org/Bug/view.php?id=12881)
# in ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/rpmBuild/BUILD/ParaView-3.12.0/Utilities/Xdmf2/vtk/Testing/Cxx/XdmfTestVTKIO.cxx
# in line 39 add
#include <unistd.h>

# in ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/rpmBuild/BUILD/ParaView-3.12.0/Qt/Core/pqServerManagerSelectionModel.h
# change line 75 such that it reads
ClearAndSelect = static_cast<int>(Clear) | static_cast<int>(Select)

# now change line 158 of ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/tools/makeThirdPartyFunctionsForRPM to
rpmbuild --short-circuit -bc --define "_topdir $buildBase" --dbpath $buildBase/rpmDB -bb ./SPECS/$specFile "$@"

# build paraview
./AllMake.stage4

# now change line 158 of ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/tools/makeThirdPartyFunctionsForRPM to
rpmbuild --short-circuit -bi --define "_topdir $buildBase" --dbpath $buildBase/rpmDB -bb ./SPECS/$specFile "$@"

# install paraview on build system
./AllMake.stage4

# now change line 158 of ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/tools/makeThirdPartyFunctionsForRPM to
rpmbuild --short-circuit -bb --define "_topdir $buildBase" --dbpath $buildBase/rpmDB -bb ./SPECS/$specFile "$@"

# create binaries from rpm
./AllMake.stage4

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

# Update your OpenFOAM environment to get the basic configuration from the newly
# compiled ThirdParty packages

. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc

# Compile OpenFOAM-1.6-ext

cd $WM_PROJECT_DIR
./Allwmake >& log.Allwmake &
tail -f log.Allwmake # To keep an eye on the compilation process

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

# Run a tutorial to check the basic functionality

cd $FOAM_TUTORIAL/incompressible/simpleFoam/pitzDaily
blockMesh >& log.blockMesh
simpleFoam >& log.simpleFoam
paraFoam

# You are done!

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

Tammo Wenterodt 2012-10-24

based on
Martin Beaudoin May 2012
http://openfoam-extend.git.sourcefor...s/heads/master

i am installing 1.6-ext on suse 12.2 gnome. problems occur at the stage1. the log is as follows:

This system rpm command: rpm

========================================
Starting ThirdParty AllMake: Stage1
========================================

Package name : cmake-2.8.8
Package URL : http://www.cmake.org/files/v2.8/cmake-2.8.8.tar.gz
RPM spec file name: cmake-2.8.8.spec
Additional flags :
Updating the ThirdParty environment variables before building package cmake-2.8.8
Download cmake-2.8.8.tar.gz from : http://www.cmake.org/files/v2.8/cmake-2.8.8.tar.gz
asking libproxy about url 'http://www.cmake.org/files/v2.8/cmake-2.8.8.tar.gz'
libproxy suggest to use 'wpad://'
case 2: libproxy setting to use 'wpad://'
Error parsing proxy URL wpad://: Unsupported scheme `wpad'.
Making package cmake-2.8.8 using RPM.
Building package cmake-2.8.8 using SPEC file : cmake-2.8.8.spec. Optional args:
error: File /home/yao/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/rpmBuild/SOURCES/cmake-2.8.8.tar.gz: No such file or directory
Installing package: cmake-2.8.8
Uninstalling cmake-2.8.8 using RPM: cmake-2.8.8-linux64Gcc46DPOpt.x86_64
Installing cmake-2.8.8 using RPM file: /home/yao/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/rpmBuild/RPMS/x86_64/cmake-2.8.8-linux64Gcc46DPOpt.x86_64.rpm
error: open of /home/yao/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/rpmBuild/RPMS/x86_64/cmake-2.8.8-linux64Gcc46DPOpt.x86_64.rpm failed: No such file or directory
Done installing package

========================================
Done ThirdParty AllMake: Stage1
========================================

anybody can give me some tips? thanks in advance.

Jianxi
jianxiyao is offline   Reply With Quote

Old   November 22, 2012, 17:08
Default
  #3
New Member
 
Jianxi Yao
Join Date: Apr 2011
Posts: 17
Rep Power: 15
jianxiyao is on a distinguished road
I have solved the problem :Error parsing proxy URL wpad://: Unsupported scheme `wpad'.

The new one is "error: open of /home/yao/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/rpmBuild/RPMS/x86_64/cmake-2.8.8-linux64Gcc46DPOpt.x86_64.rpm"

I think I miss something!?
jianxiyao is offline   Reply With Quote

Old   November 22, 2012, 17:09
Default
  #4
New Member
 
Jianxi Yao
Join Date: Apr 2011
Posts: 17
Rep Power: 15
jianxiyao is on a distinguished road
And "tools/makeThirdPartyFunctionsForRPM:line 158: rpmbuild: not found command"
jianxiyao is offline   Reply With Quote

Old   January 10, 2013, 10:18
Thumbs up reconfirmation of qt 4.8.1, that it works on suse 12.2 64 bit
  #5
Member
 
Andreas Ruopp
Join Date: Aug 2009
Location: Stuttgart / Germany
Posts: 31
Rep Power: 16
andyru is on a distinguished road
@wenterodt:
Thank you very much for the explanation!

Everything worked perfektly, also with:
#QMake version 2.01a
#Using Qt version 4.8.1 in /usr/lib64
I can confirm this!

Best regards,

Andreas
andyru is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Openfoam installation on OpenSuse 11.1 Bufacchi OpenFOAM Installation 1 June 15, 2010 19:55
OpenFOAM Live USB based on openSUSE 11.1 created with SUSE Studio alberto OpenFOAM 40 May 23, 2010 16:15
OpenFOAM 1.5 installation on OpenSUSE 11.0 bigphil OpenFOAM Installation 16 April 29, 2009 06:28
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 14:25


All times are GMT -4. The time now is 21:15.