fixed writing out entries in advective bc
[OpenFOAM-1.6-ext.git] / doc / buildInstructions / Ubuntu / 12.04 / Compilation_Ubuntu_12.04_64-bit.txt
blobff09e2485dea3654ffde880bb6f83b0f50923235
1 Installation of OpenFOAM-1.6-ext on Ubuntu 12.04 64-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 OpenGL: sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
23 # You can also install everything at once:
24 sudo apt-get install git flex bison rpm g++ zlib1g-dev binutils-dev \
25      openmpi-bin libopenmpi-dev libxext-dev libxt-dev libxrender-dev \
26      libgl1-mesa-dev libglu1-mesa-dev
28 --------------------------------------------------------------------------------
30 # If you need to compile swak4Foam, it is a good idea to install Mercurial (hg)
31 # sudo apt-get install mercurial
33 --------------------------------------------------------------------------------
35 # Minor correction for make/gmake
36 sudo ln -s /usr/bin/make /usr/bin/gmake
38 --------------------------------------------------------------------------------
40 # Download OpenFOAM-1.6-ext
41 mkdir ~/OpenFOAM
42 cd ~/OpenFOAM
43 git clone git://openfoam-extend.git.sourceforge.net/gitroot/openfoam-extend/OpenFOAM-1.6-ext
45 --------------------------------------------------------------------------------
47 # Create the file etc/prefs.sh
48 cp ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh-EXAMPLE ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
50 --------------------------------------------------------------------------------
52 # Use the system compiler
53 sed -i s/"compilerInstall=System"/"compilerInstall=System\nWM_COMPILER=Gcc46"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
55 --------------------------------------------------------------------------------
57 # Use the system installation of OpenMPI
58 sed -i s/"#export WM_MPLIB=SYSTEMOPENMPI"/"export WM_MPLIB=SYSTEMOPENMPI"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
59 sed -i s/"#export OPENMPI_DIR=path_to_system_installed_openmpi"/"export OPENMPI_DIR=\/usr"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
60 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
62 --------------------------------------------------------------------------------
64 # About QT4
66 # Ubuntu 12.04 comes with QT4 version 4.8.1
67 # Even thoug ParaView will compile with this version of QT, ParaView will also generate a bunch of
68 # warnings on the console at runtime. So we will be using the version of QT4 supplied with the
69 # ThirdParty packages.
71 #Uncomment the variable QT_THIRD_PARTY in the file prefs.sh
73 sed -i s/"#export QT_THIRD_PARTY=1"/"export QT_THIRD_PARTY=1"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
75 # This section of the prefs.sh file should now look like this:
77 export QT_THIRD_PARTY=1
78 #export QT_DIR=/usr
79 #export QT_BIN_DIR=$QT_DIR/bin
81 --------------------------------------------------------------------------------
83 # Source your OpenFOAM environment to get the basic configuration for
84 # compilation
85 . ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc
87 --------------------------------------------------------------------------------
89 # Compile the ThirdParty packages
90 cd $WM_PROJECT_DIR/ThirdParty
91 ./AllMake.stage1 >& log.AllMake.stage1 
92 #./AllMake.stage2 >& log.AllMake.stage2   # No need for this one
93 ./AllMake.stage3 >& log.AllMake.stage3 
94 ./AllMake.stage4 >& log.AllMake.stage4 
96 --------------------------------------------------------------------------------
98 # Update your OpenFOAM environment to get the basic configuration from the newly
99 # compiled ThirdParty packages
100 . ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc
102 # Compile OpenFOAM-1.6-ext
103 cd $WM_PROJECT_DIR
104 ./Allwmake >& log.Allwmake &  
105 tail -f log.Allwmake          # To keep an eye on the compilation process
107 --------------------------------------------------------------------------------
109 # Run a tutorial to check the basic functionality
110 cd $FOAM_TUTORIAL/incompressible/simpleFoam/pitzDaily
111 blockMesh >& log.blockMesh
112 simpleFoam >& log.simpleFoam
113 paraFoam
115 # You are done!
117 --------------------------------------------------------------------------------
118 Martin Beaudoin
119 May 2012