Install Dakota 6.11 on Ubuntu 18.04

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.

3 Build

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 .bashrc :

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"

source ~/.bashrc

Finally, you may need this command to verify the file permissions:

sudo chmod -R 777 *

4 Test

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~

5 GUI

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.

Author: zcp
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint polocy. If reproduced, please indicate source zcp !
评论
Valine utteranc.es
 Previous
从Hugo折腾到Hexo过程记录
1 前言本来对自己之前基于hugo的博客感觉挺满意的,直到某一天手贱点开了一篇关于如何把豆瓣读书等模块加入到博客中的文章,于是羡慕之情油然而生。在网上搜了一下发现是有个大佬写了个基于Hexo的小插件,顿时心灰意冷,因为当时从零基础
Next 
入坑Linux(3)——常用软件安装及配置
1 OpenFOAM相关用Linux的原因就是学习OpenFOAM,所以当然要摆在第一位!正如前面所说,我用的自定义镜像自带了使用OpenFOAM需要的一些工具,不用额外安装。不过后面我又下载了多个OpenFOAM版本,与其相关的
  TOC