fixed writing out entries in advective bc
[OpenFOAM-1.6-ext.git] / doc / buildInstructions / Ubuntu / 12.04 / Compilation_Ubuntu_12.04_32-bit.txt
blob65c90b1ef61b8ee781842c35bb53e56b3002de56
1 Installation of OpenFOAM-1.6-ext on Ubuntu 12.04 32-bit
3 - Proceed with the installation of the OS
4 - Update your OS installation using "Update Manager".
5 - If asked to reboot your system, please do so.
7 --------------------------------------------------------------------------------
9 # Installation of additional system packages:
10 git:   sudo apt-get install git
11 flex:  sudo apt-get install flex
12 bison: sudo apt-get install bison
13 rpm:   sudo apt-get install rpm
14 g++:   sudo apt-get install g++
15 libz:  sudo apt-get install zlib1g-dev
16 binutils-dev : sudo apt-get install binutils-dev
17 openmpi: sudo apt-get install openmpi-bin libopenmpi-dev
18 libxext: sudo apt-get install libxext-dev
19 libxt  : sudo apt-get install libxt-dev
20 libXrender: sudo apt-get install libxrender-dev
21 libstdc++5: sudo apt-get install libstdc++5
22 OpenGL: sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
24 # You can also install everything at once:
25 sudo apt-get install git flex bison rpm g++ zlib1g-dev binutils-dev \
26      openmpi-bin libopenmpi-dev libxext-dev libxt-dev libxrender-dev \
27      libstdc++5 libgl1-mesa-dev libglu1-mesa-dev
29 --------------------------------------------------------------------------------
31 # If you need to compile swak4Foam, it is a good idea to install Mercurial (hg)
32 # sudo apt-get install mercurial
34 --------------------------------------------------------------------------------
36 # Minor correction for make/gmake
37 sudo ln -s /usr/bin/make /usr/bin/gmake
39 --------------------------------------------------------------------------------
41 # Download OpenFOAM-1.6-ext
42 mkdir ~/OpenFOAM
43 cd ~/OpenFOAM
44 git clone git://openfoam-extend.git.sourceforge.net/gitroot/openfoam-extend/OpenFOAM-1.6-ext
46 --------------------------------------------------------------------------------
48 # Create the file etc/prefs.sh
49 cp ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh-EXAMPLE ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
51 --------------------------------------------------------------------------------
53 # Use the system compiler
54 sed -i s/"compilerInstall=System"/"compilerInstall=System\nWM_COMPILER=Gcc46"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
56 --------------------------------------------------------------------------------
58 # Use the system installation of OpenMPI
59 sed -i s/"#export WM_MPLIB=SYSTEMOPENMPI"/"export WM_MPLIB=SYSTEMOPENMPI"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
60 sed -i s/"#export OPENMPI_DIR=path_to_system_installed_openmpi"/"export OPENMPI_DIR=\/usr"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
61 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
63 --------------------------------------------------------------------------------
65 # About QT4
67 # Ubuntu 12.04 comes with QT4 version 4.8.1
68 # Even thoug ParaView will compile with this version of QT, ParaView will also generate a bunch of
69 # warnings on the console at runtime. So we will be using the version of QT4 supplied with the
70 # ThirdParty packages.
72 #Uncomment the variable QT_THIRD_PARTY in the file prefs.sh
74 sed -i s/"#export QT_THIRD_PARTY=1"/"export QT_THIRD_PARTY=1"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
76 # This section of the prefs.sh file should now look like this:
78 export QT_THIRD_PARTY=1
79 #export QT_DIR=path_to_system_installed_qt
80 #export QT_BIN_DIR=$QT_DIR/bin
82 --------------------------------------------------------------------------------
84 # Source your OpenFOAM environment to get the basic configuration for
85 # compilation
86 . ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc
88 --------------------------------------------------------------------------------
90 # Compile the ThirdParty packages
91 cd $WM_PROJECT_DIR/ThirdParty
92 ./AllMake.stage1 >& log.AllMake.stage1 
93 #./AllMake.stage2 >& log.AllMake.stage2   # No need for this one
94 ./AllMake.stage3 >& log.AllMake.stage3 
95 ./AllMake.stage4 >& log.AllMake.stage4 
97 --------------------------------------------------------------------------------
99 # Update your OpenFOAM environment to get the basic configuration from the newly
100 # compiled ThirdParty packages
101 . ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc
103 # Compile OpenFOAM-1.6-ext
104 cd $WM_PROJECT_DIR
105 ./Allwmake >& log.Allwmake &  
106 tail -f log.Allwmake          # To keep an eye on the compilation process
108 --------------------------------------------------------------------------------
110 # Run a tutorial to check the basic functionality
111 cd $FOAM_TUTORIAL/incompressible/simpleFoam/pitzDaily
112 blockMesh >& log.blockMesh
113 simpleFoam >& log.simpleFoam
114 paraFoam
116 # You are done!
118 --------------------------------------------------------------------------------
119 Martin Beaudoin
120 May 2012