First I’d like to thank Chien Nguyen for his blog, it’s very helpful for a noob to linux like me.
Dakota released the verison 6.11 on Fri 11/15/2019, and I’ll share you how I install it on Ubuntu18.04 step by step.
1 What is Dakota
It’s a powerful toolkit which include:
- optimization with gradient and nongradient-based methods;
- uncertainty quantification with sampling, reliability, stochastic expansion, and epistemic methods;
- parameter estimation using nonlinear least squares (deterministic) or Bayesian inference (stochastic); and
- sensitivity/variance analysis with design of experiments and parameter study methods.
2 Before installation
2.1 Install some nessesary packages
sudo apt-get install gcc g++ gfortran cmake cmake-curses-gui libboost-dev \ libboost-all-dev libblas-dev liblapack-dev libopenmpi-dev openmpi-bin \ openmpi-doc xorg-dev libmotif-dev
You can check the necessary packages from this website. I also installed the HDF5 here and the required version of HDF5 for Dakota 6.11 is 1.10.5.
2.2 Download the GUI and source code from official webiste.
And extract files to appropriate place.
I extracted the packages in
$HOME/DAKOTA and made two directories which will be used for build and install Dakota.
cd && mkdir DAKOTA cd DAKOTA mkdir dakota_build && mkdir dakota_installation export DAK_BUILD=$HOME/DAKOTA/dakota_build export DAK_INSTALL=$HOME/DAKOTA/dakota_installation export DAK_SRC=$HOME/DAKOTA/dakota-6.11.0-release-public.src-UI cd $DAK_BUILD cp $DAK_SRC/cmake/BuildDakotaTemplate.cmake $DAK_SRC/cmake/BuildDakotaCustom.cmake
Then, you can begin to build the source code with several options. You may check this website for more informations.
sudo cmake . $DAK_SRC/cmake/BuildDakotaCustom.cmake $DAK_SRC -DCMAKE_INSTALL_PREFIX=$DAK_INSTALL \ -DDAKOTA_HAVE_MPI:BOOL=TRUE \ -DDAKOTA_HAVE_HDF5:BOOL=TRUE
Run make and install:
sudo make -j4 sudo make install
Just wait for a few minutes and at last add the environment variables to
sudo gedit ~/.bashrc
Add the following lines at the end of bashrc and save
export PATH=”$PATH:export PATH="$PATH:$HOME/DAKOTA/dakota_installation/bin"
Finally, you may need this command to verify the file permissions:
sudo chmod -R 777 *
Now you can just open a terminal and input
dakota -v and if everything goes well you will see:
Dakota version 6.11 released Nov 15 2019. Repository revision c3efb375 (2019-11-07) built XXX XX XXXX XX:XX:XX
Congratulations! Let’s enjoy dakota now~
You guys may meet some problems when trying to open the dakota GUI, because the dakota GUI requires JAVA 8. jdk-8u231-linux-x64.tar.gz should be a good choice for you.