[Software] Dakota: Install Dakota 6.4 on Ubuntu 16.04 LTS

1. To install required libraries
sudo apt-get install gcc g++ gfortran cmake libboost-dev libboost-all-dev \
libblas-dev liblapack-dev libopenmpi-dev openmpi-bin openmpi-doc xorg-dev libmotif-dev

There is slight modification of the install option from the link.

2. To set environment variables
export DAK_SRC=/home/username/program/dakota-6.4.0.src
export DAK_BUILD=/home/username/program/dakota-6.4.0.build

cp $DAK_SRC/cmake/BuildDakotaTemplate.cmake \
        $DAK_SRC/cmake/BuildDakotaCustom.cmake

3. To modify $DAK_SRC/cmake/BuildDakotaCustom.cmake 
* mpi
set( DAKOTA_HAVE_MPI ON
     CACHE BOOL "Build with MPI enabled" FORCE)
set( MPI_CXX_COMPILER "/usr/bin/mpicxx"
     CACHE FILEPATH "Use MPI compiler wrapper" FORCE)
*boost
set(BOOST_ROOT
    "/usr/lib/x86_64-linux-gnu"
    CACHE PATH "Use non-standard Boost install" FORCE)
*install directory
set( CMAKE_INSTALL_PREFIX
     "/home/username/program/dakota-6.4.0.build"
     CACHE PATH "Path to Dakota installation" )

4. To build
cd $DAK_BUILD
cmake -C $DAK_SRC/cmake/BuildDakotaCustom.cmake $DAK_SRC
make [-j#]
make install (if there is an error try to use 'sudo make install')

5. To set environment variables
export PATH=$DAK_BUILD/bin:$DAK_BUILD/test:$PATH
# Dakota version < 6.6
export LD_LIBRARY_PATH=$DAK_BUILD:$DAK_BUILD/lib:$DAK_BUILD/bin 

Enjoy dakota 😊



댓글

이 블로그의 인기 게시물

[Software] Python으로 Google 검색결과 크롤링(crawling)하기

[Software] Fortran: 배열에서 중복 요소 제거하기