Sig Numerical Optimization / DAKOTA installation issues

From OpenFOAMWiki

DAKOTA installation issues

How to install DAKOTA in different Linux distributions:

  • Installing DAKOTA 6.0.0 and DAKOTA 6.1.0 in OpenSUSE (these instructions work with versions 12.3, 13.1 and 13.2)

To install DAKOTA in any directory of your preference, follow these steps:

1) Create the installation directory ($DAKOTA_INS), and copy DAKOTA source code on it

2) tar -xzf dakota-6.0.0-public-src.tar.gz

3) mkdir dakota-6.0.0

4) cd dakota-6.0.0

5) cp $DAKOTA_INS/dakota-6.0.0.src/cmake/BuildDakotaTemplate.cmake $DAKOTA_INS/dakota-6.0.0.src/cmake/BuildDakotaCustom.cmake

6) ccmake -C $DAKOTA_INS/dakota-6.0.0.src/cmake/BuildDakotaCustom.cmake $DAKOTA_INS/dakota-6.0.0.src -DCMAKE_INSTALL_PREFIX=$DAKOTA_INS/dakota-6.0.0

ccmake is the CMake curses interface. Project configuration settings may be specified interactively through this GUI. CMake is a cross-platform build system generator.  
As soon as you enter in ccmake, press first the key "c" to configure the script. After configuring all scripts you can start the installation.  
Press the key "t" to get the advanced options. Then turn off the option BUILD_SHARED_LIBS.  We turn off this option because there is a naming conflict between one 
library in OpenFOAM and one library in DAKOTA (  By doing this, we compile DAKOTA as a static library. 
By the way, while you are in ccmake you can configure many options of the compilation process, so feel free to take a look at all options. 
Personally speaking, I only need to compile DAKOTA as a static library and maybe enable MPI support.

7) make -j8

The -j options is to compile in parallel, in this case I am compiling with 8 processors. 

8) make install

When you finish the compilation, do not forget to add the following environment variables to your .bashrc file.
export PATH=$PATH:$DAKOTA_INS/dakota-6.0.0/bin:$DAKOTA_INS/dakota-6.0.0/test
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DAKOTA_INS/dakota-6.0.0/bin:$DAKOTA_INS/dakota-6.0.0/lib

--Joegi (talk) 16:35, 21 September 2014 (CEST)