Difference between revisions of "OpenFOAM installation"
From Supercomputación y Cálculo Científico UIS
(Installation for OpenFOAM 2.3.1 (from sources)) |
(Finishing the guide, checks pending) |
||
Line 32: | Line 32: | ||
{{Command|<nowiki>aptitude search libreadline-dev</nowiki>}} | {{Command|<nowiki>aptitude search libreadline-dev</nowiki>}} | ||
{{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. | 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: | 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</nowiki>}} | {{Command|<nowiki>wget http://downloads.sourceforge.net/foam/OpenFOAM-2.3.1.tgz</nowiki>}} | ||
− | {{Command|<nowiki>wget http://downloads.sourceforge.net/foam/ThirdParty-2.3.1.tgz}} | + | {{Command|<nowiki>wget http://downloads.sourceforge.net/foam/ThirdParty-2.3.1.tgz</nowiki>}} |
− | + | Untar the files | |
− | + | {{Command|<nowiki>tar -xvzf OpenFoam-x.x.x | |
− | + | tar -xvzf ThirdParty-x.x.x</nowiki>}} | |
− | + | {{Note|<nowiki>The compilers must be: | |
− | + | GCC: 4.5.0 and above | |
− | + | LLVM Clang: 3.4 and above | |
− | + | 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. | |
− | Edit /etc/ | ||
{{File|/etc/mail/aliases|<pre><nowiki> | {{File|/etc/mail/aliases|<pre><nowiki> | ||
... | ... | ||
− | + | export FOAM_INST_DIR=/usr/local/OpenFOAM | |
− | + | foamDotFile=$FOAM_INST_DIR/OpenFOAM-2.3.1/etc/bashrc | |
− | + | [ -f $foamDotFile ] && . $foamDotFile | |
... | ... | ||
</pre></nowiki>}} | </pre></nowiki>}} | ||
− | + | Run ./Allwmake | |
− | {{Command|<nowiki>/ | + | {{Command|<nowiki>cd $FOAM_INST_DIR/OpenFOAM-2.3.1/</nowiki>}} |
− | + | {{Command|<nowiki>./Allwmake</nowiki>}} | |
− | + | Test! | |
− | + | {{Command|<nowiki>cd $FOAM_INST_DIR/OpenFOAM-2.3.1/bin/ | |
− | + | ./foamInstallationTest | |
− | .. | + | </nowiki>}} |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | {{ | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | {{Command|<nowiki> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</p> | </p> |
Revision as of 03:42, 27 April 2015
OpenFOAM Installation
OpenFOAM 2.3.1 over Debian 7.0
Installation
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
aptitude search flex
aptitude search bison
aptitude search cmake
aptitude search zlib1g-dev
aptitude search libopenmpi-dev
aptitude search openmpi-bin
aptitude search qt4-dev-tools
aptitude search libqt4-dev
aptitude search libqt4-opengl-dev
aptitude search gnuplot
aptitude search libxt-dev
aptitude search freeglut3-dev
aptitude search libqtwebkit-dev
aptitude search libreadline-dev
aptitude search libncurses-dev
Then you must create a folder that is accesible for all the users, like /usr/local or /opt.
mkdir /usr/local/OpenFOAM
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
wget http://downloads.sourceforge.net/foam/ThirdParty-2.3.1.tgz
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
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/mail/aliases
<nowiki> ... export FOAM_INST_DIR=/usr/local/OpenFOAM foamDotFile=$FOAM_INST_DIR/OpenFOAM-2.3.1/etc/bashrc [ -f $foamDotFile ] && . $foamDotFile ...</nowiki>
Run ./Allwmake
cd $FOAM_INST_DIR/OpenFOAM-2.3.1/
./Allwmake
Test!
cd $FOAM_INST_DIR/OpenFOAM-2.3.1/bin/
./foamInstallationTest