Installation/Dakota/Pre-built Binary Installation

From OpenFOAMWiki

1 Introduction

This page is dedicated to explaining how to install the pre-built binary packages that area available for Dakota to be used on Linux Distributions. This means that it's not necessary to build from source code, but it only provides the pre-built features that the Dakota packagers provided.

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:

  1. Lines that start with # don't have to be copy-pasted. They are just comments to let you know what's going on.
  2. 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 6.3

Notes


Installation steps:

  1. Download Dakota 6.3, specifically the Binary Executable for Linux, from here: Dakota Downloads page
  2. Unpack it within the folder ~/OpenFOAM, e.g.:
    cd ~/OpenFOAM
    tar -xf ~/Downloads/dakota-6.3-public-Linux.x86_64.tar.gz
  3. Rename the unpacked folder to dakota-6.3.0:
    mv dakota-6.3.0.Linux.x86_64 dakota-6.3.0
  4. The shell environment script code for loading this Dakota version can be placed inside the script dakota-6.3.0/bashrc with the following commands:
    echo 'DAKOTA_INSTALL=$HOME/OpenFOAM/dakota-6.3.0' > dakota-6.3.0/bashrc
    echo 'export PATH=$PATH:$DAKOTA_INSTALL/bin:$DAKOTA_INSTALL/test' >> dakota-6.3.0/bashrc
    echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DAKOTA_INSTALL/lib:$DAKOTA_INSTALL/bin' >> dakota-6.3.0/bashrc
  5. Load Dakota into the current shell environment with the following command:
    source $HOME/OpenFOAM/dakota-6.3.0/bashrc
  6. Then add the alias dakota630 to the personal .bashrc with the following command:
    echo 'alias dakota630="source $HOME/OpenFOAM/dakota-6.3.0/bashrc"' >> ~/.bashrc

    This way, whenever a new terminal window is opened, run the alias command that will load the environment:

    dakota630
  7. Now try running Dakota, with the following command:
    dakota --version

    If it gives any error, then check the Troubleshooting section below


2.2 Dakota 6.4

Notes
  • These instructions have been tested on Ubuntu 16.04 x86_64, but should work on any Linux Distribution with x86_64 architecture.


Installation steps:

  1. Download Dakota 6.4, specifically the Binary Executable for Linux, from here: Dakota Downloads page
  2. Unpack it within the folder ~/OpenFOAM, e.g.:
    cd ~/OpenFOAM
    tar -xf ~/Downloads/dakota-6.4-public-Linux.x86_64.tar.gz
  3. Rename the unpacked folder to dakota-6.4.0:
    mv dakota-6.4.0.Linux.x86_64 dakota-6.4.0
  4. The shell environment script code for loading this Dakota version can be placed inside the script dakota-6.4.0/bashrc with the following commands:
    echo 'DAKOTA_INSTALL=$HOME/OpenFOAM/dakota-6.4.0' > dakota-6.4.0/bashrc
    echo 'export PATH=$PATH:$DAKOTA_INSTALL/bin:$DAKOTA_INSTALL/test' >> dakota-6.4.0/bashrc
    echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DAKOTA_INSTALL/lib:$DAKOTA_INSTALL/bin' >> dakota-6.4.0/bashrc
  5. Load Dakota into the current shell environment with the following command:
    source $HOME/OpenFOAM/dakota-6.4.0/bashrc

    WARNING: If you already have another version of Dakota loaded into the current terminal, then start a new terminal without it being loaded it!

  6. Then add the alias dakota640 to the personal .bashrc with the following command:
    echo 'alias dakota640="source $HOME/OpenFOAM/dakota-6.4.0/bashrc"' >> ~/.bashrc

    This way, whenever a new terminal window is opened, run the alias command that will load the environment:

    dakota640
  7. Now try running Dakota, with the following command:
    dakota --version

    If it gives any error, then check the Troubleshooting section below


2.3 Dakota 6.5

Notes
  • These instructions have been tested on Ubuntu 16.04 x86_64, but should work on any Linux Distribution with x86_64 architecture.


Installation steps:

  1. Download Dakota 6.5, specifically the Binary Executable for Linux, from here: Dakota Downloads page
  2. Unpack it within the folder ~/OpenFOAM, e.g.:
    cd ~/OpenFOAM
    tar -xf ~/Downloads/dakota-6.5-public-Linux.x86_64.tar.gz
  3. Rename the unpacked folder to dakota-6.5.0:
    mv dakota-6.5.0.Linux.x86_64 dakota-6.5.0
  4. The shell environment script code for loading this Dakota version can be placed inside the script dakota-6.5.0/bashrc with the following commands:
    echo 'DAKOTA_INSTALL=$HOME/OpenFOAM/dakota-6.5.0' > dakota-6.5.0/bashrc
    echo 'export PATH=$PATH:$DAKOTA_INSTALL/bin:$DAKOTA_INSTALL/test' >> dakota-6.5.0/bashrc
    echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DAKOTA_INSTALL/lib:$DAKOTA_INSTALL/bin' >> dakota-6.5.0/bashrc
  5. Load Dakota into the current shell environment with the following command:
    source $HOME/OpenFOAM/dakota-6.5.0/bashrc

    WARNING: If you already have another version of Dakota loaded into the current terminal, then start a new terminal without it being loaded it!

  6. Then add the alias dakota650 to the personal .bashrc with the following command:
    echo 'alias dakota650="source $HOME/OpenFOAM/dakota-6.5.0/bashrc"' >> ~/.bashrc

    This way, whenever a new terminal window is opened, run the alias command that will load the environment:

    dakota650
  7. Now try running Dakota, with the following command:
    dakota --version

    If it gives any error, then check the Troubleshooting section below


3 Troubleshooting

3.1 libmpi.so.1 not found

Symptom
When running dakota, if the following error appears:
error while loading shared libraries: libmpi.so.1: cannot open shared object file: No such file or directory
Then it's because it's not able to find the correct Open-MPI library.
Possible solution
The following commands will fix this issue on Ubuntu 16.04 x86_64, but it will likely need re-adapting for other Linux Distributions:
ln -s /etc/alternatives/libmpi.so $DAKOTA_INSTALL/lib/libmpi.so.1


3.2 libXm.so.4 not found

Symptom
dakota: error while loading shared libraries: libXm.so.4: cannot open shared object file: No such file or directory
Possible solutions

On Ubuntu 16.04 x86_64, the package libxm4 needs to be installed:

sudo apt-get install libxm4