Difference between revisions of "OpenFOAM installation"
From Supercomputación y Cálculo Científico UIS
(Finishing the guide, checks pending) |
(some cleanup) |
||
Line 14: | Line 14: | ||
== Installation == | == Installation == | ||
− | First you need to check the required packages. They can be obtained using aptitude. Here is a complete list for the platform: | + | 1. First you need to check the required packages. They can be obtained using aptitude. Here is a complete list for the platform: |
− | + | {{Command|<nowiki>aptitude search build-essential | |
− | {{Command|<nowiki>aptitude search build-essential | + | {{Command|<nowiki>aptitude search flex |
− | {{Command|<nowiki>aptitude search flex | + | {{Command|<nowiki>aptitude search bison |
− | {{Command|<nowiki>aptitude search bison | + | {{Command|<nowiki>aptitude search cmake |
− | {{Command|<nowiki>aptitude search cmake | + | {{Command|<nowiki>aptitude search zlib1g-dev |
− | {{Command|<nowiki>aptitude search zlib1g-dev | + | {{Command|<nowiki>aptitude search libopenmpi-dev |
− | {{Command|<nowiki>aptitude search libopenmpi-dev | + | {{Command|<nowiki>aptitude search openmpi-bin |
− | {{Command|<nowiki>aptitude search openmpi-bin | + | {{Command|<nowiki>aptitude search qt4-dev-tools |
− | {{Command|<nowiki>aptitude search qt4-dev-tools | + | {{Command|<nowiki>aptitude search libqt4-dev |
− | {{Command|<nowiki>aptitude search libqt4-dev | + | {{Command|<nowiki>aptitude search libqt4-opengl-dev |
− | {{Command|<nowiki>aptitude search libqt4-opengl-dev | + | {{Command|<nowiki>aptitude search gnuplot |
− | {{Command|<nowiki>aptitude search gnuplot | + | {{Command|<nowiki>aptitude search libxt-dev |
− | {{Command|<nowiki>aptitude search libxt-dev | + | {{Command|<nowiki>aptitude search freeglut3-dev |
− | {{Command|<nowiki>aptitude search freeglut3-dev | + | {{Command|<nowiki>aptitude search libqtwebkit-dev |
− | {{Command|<nowiki>aptitude search libqtwebkit-dev | + | {{Command|<nowiki>aptitude search libreadline-dev |
− | {{Command|<nowiki>aptitude search libreadline-dev | ||
{{Command|<nowiki>aptitude search libncurses-dev</nowiki>}} | {{Command|<nowiki>aptitude search libncurses-dev</nowiki>}} | ||
− | Then you must create a folder that is accesible for all the users, like /usr/local or /opt. | + | 2. Then you must create a folder that is accesible for all the users, like /usr/local or /opt. |
{{Command|<nowiki>mkdir /usr/local/OpenFOAM</nowiki>}} | {{Command|<nowiki>mkdir /usr/local/OpenFOAM</nowiki>}} | ||
− | In that folder use the wget command to download the source package for both the base OpenFOAM and Third Party Scripts: | + | 3. In that folder use the wget command to download the source package for both the base OpenFOAM and Third Party Scripts: |
− | {{Command|<nowiki>wget http://downloads.sourceforge.net/foam/OpenFOAM-2.3.1.tgz | + | {{Command|<nowiki>wget http://downloads.sourceforge.net/foam/OpenFOAM-2.3.1.tgz |
{{Command|<nowiki>wget http://downloads.sourceforge.net/foam/ThirdParty-2.3.1.tgz</nowiki>}} | {{Command|<nowiki>wget http://downloads.sourceforge.net/foam/ThirdParty-2.3.1.tgz</nowiki>}} | ||
− | Untar the files | + | 4. Untar the files |
{{Command|<nowiki>tar -xvzf OpenFoam-x.x.x | {{Command|<nowiki>tar -xvzf OpenFoam-x.x.x | ||
tar -xvzf ThirdParty-x.x.x</nowiki>}} | tar -xvzf ThirdParty-x.x.x</nowiki>}} | ||
Line 44: | Line 43: | ||
LLVM Clang: 3.4 and above | LLVM Clang: 3.4 and above | ||
Intel ICC: 14.0.1</nowiki>}} | Intel ICC: 14.0.1</nowiki>}} | ||
− | Edit /etc/profile.d/apps.sh and add the following lines. Then replicate these changes in the apps.sh file of every node. | + | 5. Edit /etc/profile.d/apps.sh and add the following lines. Then replicate these changes in the apps.sh file of every node. |
− | {{File|/etc/ | + | {{File|/etc/profile.d/apps.sh|<pre><nowiki> |
... | ... | ||
export FOAM_INST_DIR=/usr/local/OpenFOAM | export FOAM_INST_DIR=/usr/local/OpenFOAM | ||
Line 52: | Line 51: | ||
... | ... | ||
</pre></nowiki>}} | </pre></nowiki>}} | ||
− | Run ./Allwmake | + | 6. Run ./Allwmake |
− | {{Command|<nowiki>cd $FOAM_INST_DIR/OpenFOAM-2.3.1/ | + | {{Command|<nowiki>cd $FOAM_INST_DIR/OpenFOAM-2.3.1/ |
{{Command|<nowiki>./Allwmake</nowiki>}} | {{Command|<nowiki>./Allwmake</nowiki>}} | ||
− | Test! | + | 7. Test! |
{{Command|<nowiki>cd $FOAM_INST_DIR/OpenFOAM-2.3.1/bin/ | {{Command|<nowiki>cd $FOAM_INST_DIR/OpenFOAM-2.3.1/bin/ | ||
− | ./foamInstallationTest | + | ./foamInstallationTest</nowiki>}} |
− | </nowiki>}} | ||
</p> | </p> |
Revision as of 03:45, 27 April 2015
OpenFOAM Installation
OpenFOAM 2.3.1 over Debian 7.0
Installation
1. First you need to check the required packages. They can be obtained using aptitude. Here is a complete list for the platform:
aptitude search build-essential
{{Command|<nowiki>aptitude search flex
{{Command|<nowiki>aptitude search bison
{{Command|<nowiki>aptitude search cmake
{{Command|<nowiki>aptitude search zlib1g-dev
{{Command|<nowiki>aptitude search libopenmpi-dev
{{Command|<nowiki>aptitude search openmpi-bin
{{Command|<nowiki>aptitude search qt4-dev-tools
{{Command|<nowiki>aptitude search libqt4-dev
{{Command|<nowiki>aptitude search libqt4-opengl-dev
{{Command|<nowiki>aptitude search gnuplot
{{Command|<nowiki>aptitude search libxt-dev
{{Command|<nowiki>aptitude search freeglut3-dev
{{Command|<nowiki>aptitude search libqtwebkit-dev
{{Command|<nowiki>aptitude search libreadline-dev
{{Command|<nowiki>aptitude search libncurses-dev
2. Then you must create a folder that is accesible for all the users, like /usr/local or /opt.
mkdir /usr/local/OpenFOAM
3. In that folder use the wget command to download the source package for both the base OpenFOAM and Third Party Scripts:
wget http://downloads.sourceforge.net/foam/OpenFOAM-2.3.1.tgz
{{Command|<nowiki>wget http://downloads.sourceforge.net/foam/ThirdParty-2.3.1.tgz
4. Untar the files
tar -xvzf OpenFoam-x.x.x
tar -xvzf ThirdParty-x.x.x
NOTE: The compilers must be:
GCC: 4.5.0 and above
LLVM Clang: 3.4 and above
Intel ICC: 14.0.1
5. Edit /etc/profile.d/apps.sh and add the following lines. Then replicate these changes in the apps.sh file of every node.
File: /etc/profile.d/apps.sh
<nowiki> ... export FOAM_INST_DIR=/usr/local/OpenFOAM foamDotFile=$FOAM_INST_DIR/OpenFOAM-2.3.1/etc/bashrc [ -f $foamDotFile ] && . $foamDotFile ...</nowiki>
6. Run ./Allwmake
cd $FOAM_INST_DIR/OpenFOAM-2.3.1/
{{Command|<nowiki>./Allwmake
7. Test!
cd $FOAM_INST_DIR/OpenFOAM-2.3.1/bin/
./foamInstallationTest