Difference between revisions of "Installation/Dakota/CentOS SL RHEL"
(→Dakota 5.3.1 on CentOS 6.4)
(→Dakota 5.3.1 on CentOS 6.4)
|Line 121:||Line 121:|
if you get
if you get message
Revision as of 06:45, 21 December 2013
This page is dedicated to explaining how to install Dakota in:
- Community ENTerprise Operating System, aka CentOS.
- Red Hat Enterprise Linux, aka RHEL.
- Scientific Linux, aka SL.
In theory, all of the above follow the same versioning. Therefore, at the time this page was first written, RHEL, CentOS and SL were all at version 6.4.
If you do not yet feel comfortable using Linux, then perhaps you better first read the page Working with the Shell and train a bit with the shell/terminal environments, so you can have a better perception of the steps shown below.
2 Copy-Paste steps
A few notes before you start copy-pasting:
- Lines that start with # don't have to be copy-pasted. They are just comments to let you know what's going on.
- One wrong character is enough for breaking this guide, so make sure you can read the characters properly or that the installed language system does not break the copied characters!
2.1 Dakota 5.3.1 on CentOS 6.4
Instructions are available in this post: Dakota 5.3.1 installation with CentOS 6.4 and OF2.2.x - post #8
1) Install the following packages:
sudo su - yum install boost boost-system boost-signals boost-regex boost-filesystem boost-devel blas blas-devel lapack lapack-devel openmpi openmpi-devel openmotif openmotif-devel libX11 libXau libXext libXmu libXmu-devel libXp libXp-devel libXpm libXpm-devel
for other linux releases you can find a list of the required dependencies here 
2) Uncompress the source code tar from dakota website: http://dakota.sandia.gov/distributions/download.html
3) in the CMakeLists.txt do the following modifications:
3A) instead of:
option(BUILD_SHARED_LIBS "Build shared libraries?" ON) #145 line
set libraries as static in the following way:
# option(BUILD_SHARED_LIBS "Build shared libraries?" ON) # Build static libraries ONLY set(BUILD_STATIC_LIBS ON CACHE BOOL "Set to ON to build static libraries" FORCE) set(BUILD_SHARED_LIBS OFF CACHE BOOL "Set to ON to build DSO libraries" FORCE)
this modification is necessary because using shared libraries can create a conflict with an OpenFOAM library called "libsampling.so" which has the same name of a DAKOTA library. The problem disappeared by using static libraries.
3B) set to "on" the Documentation installation:
option(ENABLE_DAKOTA_DOCS "Enable DAKOTA documentation build." ON)
3C) add the following two lines:
set(BLAS_LIBS "/usr/lib64/libblas.so.3.2.1") set(LAPACK_LIBS "/usr/lib64/liblapack.so.3.2.1")
just above the lines (to find these lines search "LAPACK"):
if(MSVC) find_package(LAPACK REQUIRED NO_MODULE)
4) star the compilation process:
cd /home/yourPATH #where you want to install Dakota sudo cmake28 /home/download/DAKOTA/sourceCodeDistribution # where you downloaded the source code make dakota
5) set the directory of installation:
Open the cmake_install.cmake file with your favourite text editor:
set the variable CMAKE_INSTALL_PREFIX as:
then in terminal:
6) update the .bashrc by adding the following lines
export PATH=$PATH:/home/yourPATH/bin:/home/yourPATH/test export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/yourPATH/bin:/home/yourPATH/lib
7) open a new terminal or
and launch openFOAM 2.2
8) in the same terminal check that your Dakota installation is working by typing
if you get a message of this type:
DAKOTA version 5.3.1 released 05/15/2013. Subversion revision 1606 built Nov 17 2013 15:43:33.
everything should be OK.