1 Installation of OpenFOAM-1.6-ext on openSUSE 12.1 64-bit
2 --------------------------------------------------------------------------------
4 We assume you have a fresh installation of openSUSE 12.1 64-bit, with all the
5 necessary updates already applied
7 --------------------------------------------------------------------------------
9 # Installation of additional system packages:
11 sudo zypper install git
12 sudo zypper install openmpi-devel
13 sudo zypper install gnuplot
14 sudo zypper install -t pattern devel_qt4
16 --------------------------------------------------------------------------------
18 # Download OpenFOAM-1.6-ext
22 git clone git://openfoam-extend.git.sourceforge.net/gitroot/openfoam-extend/OpenFOAM-1.6-ext
25 --------------------------------------------------------------------------------
27 # We need to tweak our OpenFOAM setup using the prefs.sh file
29 cp ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh-EXAMPLE \
30 ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
32 --------------------------------------------------------------------------------
34 # We are going to use version system installed version of gcc 4.6.2
36 # Modify the etc/prefs.sh file to switch to gcc 4.6.2
37 sed -i s/"compilerInstall=System"/"compilerInstall=System\nWM_COMPILER=Gcc46"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
39 --------------------------------------------------------------------------------
41 # We are going to use the system installed version of openmpi-1.4.3
43 # No need to run AllMake.stage2
44 sed -i s/"#export WM_MPLIB=SYSTEMOPENMPI"/"export WM_MPLIB=SYSTEMOPENMPI"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
45 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
46 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
49 --------------------------------------------------------------------------------
51 # We are going to use the system installed development version of Qt (Version: 4.7.4-19.6.1)
53 # Uncomment and modify the initialization of the variables QT_DIR and QT_BIN_DIR in the
56 sed -i s/"#export QT_DIR=path_to_system_installed_qt"/"export QT_DIR=\/usr"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
57 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
59 # This section of the prefs.sh file should now look like this:
61 #export QT_THIRD_PARTY=1
63 export QT_BIN_DIR=$QT_DIR/bin
65 --------------------------------------------------------------------------------
69 # Version 3.8.1 of ParaView does not compile with gcc 4.6.2 on openSUSE 12.1
71 # I suggest you switch to ParaView 12.1
73 --------------------------------------------------------------------------------
75 # Source this initial OpenFOAM environment to get the basic configuration for
77 . ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc
79 # Compile the ThirdParty packages
81 cd $WM_PROJECT_DIR/ThirdParty
82 ./AllMake.stage1 >& log.AllMake.stage1
83 ./AllMake.stage3 >& log.AllMake.stage3
84 ./AllMake.stage4 >& log.AllMake.stage4
86 # You can keep an eye on the compilation process with the command tail e.g:
87 # tail -f log.AllMake.stage1
89 --------------------------------------------------------------------------------
91 # Update your OpenFOAM environment to get the basic configuration from the newly
92 # compiled ThirdParty packages
94 . ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc
96 # Compile OpenFOAM-1.6-ext
99 ./Allwmake >& log.Allwmake &
100 tail -f log.Allwmake # To keep an eye on the compilation process
102 --------------------------------------------------------------------------------
104 # Execute Allwmake a second time because of a bad library building sequence for
105 # the library -lfaceDecompositionMotionSolver
106 # Warning: Not sure if this is still necessary... MB 05/2012
108 ./Allwmake >& log.Allwmake2 &
109 tail -f log.Allwmake2 # To keep an eye on the compilation process
111 --------------------------------------------------------------------------------
113 # Run a tutorial to check the basic functionality
115 cd $FOAM_TUTORIAL/incompressible/simpleFoam/pitzDaily
116 blockMesh >& log.blockMesh
117 simpleFoam >& log.simpleFoam
122 --------------------------------------------------------------------------------