1 Installation of OpenFOAM-1.6-ext on Centos 5.5 64-bit
2 --------------------------------------------------------------------------------
4 Network download and installation from:
5 ftp://mirrors.usc.edu/pub/linux/distributions/centos/5.5/os/x86_64/
9 Packages from CentOS Extras: unchecked
11 Complete installation log: /root/install.log
13 Run Package updater to update your installation
15 --------------------------------------------------------------------------------
17 Add your user as a valid user for the command 'sudo'.
19 You will need to use the command 'visudo' as the user root for this.
21 I won't go into the details for this, there is a lot of info all over the Net
22 for doing this relatively minor adjustment.
24 In doubt, simply ask your local Unix guru.
26 --------------------------------------------------------------------------------
28 # Add the EPEL package repository:
29 sudo rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
31 --------------------------------------------------------------------------------
33 # Installation of additional system packages:
35 sudo yum install git-1.7.4.1-1.el5.x86_64
36 sudo yum install gcc.x86_64 gcc-c++.x86_64
37 sudo yum install bison.x86_64
38 sudo yum install flex.x86_64
39 sudo yum install rpm-build-4.4.2.3-22.el5.x86_64
40 sudo yum install zlib-devel-1.2.3-3.x86_64
41 sudo yum install libX11-devel.x86_64
42 sudo yum install libXext-devel.x86_64
43 sudo yum install libXrender-devel.x86_64
44 sudo yum install libXt-devel-1.0.2-3.2.el5.x86_64
46 # You can also install everything at once:
49 git-1.7.4.1-1.el5.x86_64 \
50 gcc.x86_64 gcc-c++.x86_64 \
53 rpm-build-4.4.2.3-22.el5.x86_64 \
54 zlib-devel-1.2.3-3.x86_64 \
56 libXext-devel.x86_64 \
57 libXrender-devel.x86_64 \
58 libXt-devel-1.0.2-3.2.el5.x86_64
60 --------------------------------------------------------------------------------
62 # Download OpenFOAM-1.6-ext
66 git clone git://openfoam-extend.git.sourceforge.net/gitroot/openfoam-extend/OpenFOAM-1.6-ext
69 --------------------------------------------------------------------------------
71 # We need to tweak our OpenFOAM setup using the prefs.sh file
73 cp ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh-EXAMPLE \
74 ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
76 --------------------------------------------------------------------------------
78 # We are going to use version 4.4.5 of gcc, provided by the ThirdParty packages
80 # The versions provided by Centos 5.5 are either too old, or a just a preview
81 # version of gcc 4.4.0, which is a bit 'green'.
83 # So the system installed compiler will only serve to compile gcc 4.4.5.
85 # Modify the etc/prefs.sh file to switch to gcc 4.4.5
86 sed -i s/"compilerInstall=System"/"compilerInstall=OpenFOAM\nWM_COMPILER=Gcc44"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
88 # Activate the compilation of gcc 4.4.5 in the ThirdParty/AllMake.stage1 file
89 sed -i 0,/"#( rpm_make -p gmp-5.0.1"/s//"( rpm_make -p gmp-5.0.1"/ ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/AllMake.stage1
90 sed -i 0,/"#( rpm_make -p mpfr-3.0.1"/s//"( rpm_make -p mpfr-3.0.1"/ ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/AllMake.stage1
91 sed -i 0,/"#( rpm_make -p gcc-4.4.5"/s//"( rpm_make -p gcc-4.4.5"/ ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/AllMake.stage1
93 # Add the wmake rules set for Gcc44
94 ln -s ~/OpenFOAM/OpenFOAM-1.6-ext/wmake/rules/linux64Gcc ~/OpenFOAM/OpenFOAM-1.6-ext/wmake/rules/linux64Gcc44
96 --------------------------------------------------------------------------------
99 # We are going to use the version of QT4 provided by the ThirdParty packages
101 # Uncomment and modify the initialization of the variables QT_THIRD_PARTY in the
104 sed -i s/"#export QT_THIRD_PARTY=1"/"export QT_THIRD_PARTY=1"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
106 # This section of the prefs.sh file should now look like this:
108 export QT_THIRD_PARTY=1
109 #export QT_DIR=path_to_system_installed_qt
110 #export QT_BIN_DIR=$QT_DIR/bin
113 --------------------------------------------------------------------------------
115 # Source this initial OpenFOAM environment to get the basic configuration for
117 . ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc
119 # You will get some warnings about missing file for gcc-4.4.5, and problem with
120 # your compiler installation.
121 # This is quite normal, your gcc-4.4.5 compiler is not even compiled and
122 # installed yet. Patience patience...
124 # Compile the ThirdParty packages, including the gcc 4.4.5 compiler
126 cd $WM_PROJECT_DIR/ThirdParty
127 ./AllMake >& log.AllMake &
128 tail -f log.AllMake # To keep an eye on the compilation process
130 --------------------------------------------------------------------------------
132 # Update your OpenFOAM environment to get the basic configuration from the newly
133 # compiled ThirdParty packages
135 . ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc
137 # Compile OpenFOAM-1.6-ext
140 ./Allwmake >& log.Allwmake &
141 tail -f log.Allwmake # To keep an eye on the compilation process
143 --------------------------------------------------------------------------------
145 # Execute Allwmake a second time because of a bad library building sequence for
146 # the library -lfaceDecompositionMotionSolver
148 ./Allwmake >& log.Allwmake2 &
149 tail -f log.Allwmake2 # To keep an eye on the compilation process
151 --------------------------------------------------------------------------------
153 # Run a tutorial to check the basic functionality
155 cd $FOAM_TUTORIAL/incompressible/simpleFoam/pitzDaily
156 blockMesh >& log.blockMesh
157 simpleFoam >& log.simpleFoam
162 --------------------------------------------------------------------------------