Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
export DAK_SRC=$HOME/DAKOTA/dakota-6.10.0-release-public-linux.x86_64-GUI-only
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
Explain:
Quote:
2. Create the installation directory ($DAKOTA), and copy DAKOTA source code on it.
cd DAKOTA
mkdir dakota-6.4.0
cd dakota-6.4.0
5. Copy file BuildDakotaTemplate.cmake and rename it to BuildDakotaCustom.cmake.
You can edit some features if you want, check the content inside for detail.
Quote:
cp ~/DAKOTA/dakota-6.4.0.src/cmake/BuildDakotaTemplate.cmake
~/DAKOTA/dakota-6.4.0.src/cmake/BuildDakotaCustom.cmake
6. Run ccmake
Quote:
ccmake -C ~/DAKOTA/dakota-6.4.0.src/cmake/BuildDakotaCustom.cmake
~/DAKOTA/dakota-6.4.0.src -DCMAKE_INSTALL_PREFIX=~/DAKOTA/dakota-6.4.0
Quote:
Cmake shows a simply GUI and when you enter in ccmake, first press the key
"c" to configure the script.
If any error appears, go to the last line to check. If no, press "e" to return the
main GUI.
In main GUI, press "t" to toggle some features. Now you can move down and
up the cursor. You can turn ON and OFF the features by press Enter.
Go down, find BUILD_SHARE_LIBS and turn it OFF (by default: it's turned ON).
We turn off this since it conflicts with a library in OPENFOAM (libsampling.io).
You also can move down to check the HAVE_X_GRAPHICS feature ON or OFF.
This function shows a graph when u run dakota.
All finish, press "c" again to configure all scripts. If no error appears, you can
press "e" to back to the main menu.
Finally press "g" to start generating the configuration.
7. Run make (The -j options is to compile in parallel, in this case I am compiling with 4
processors.)
Code:
make -j4
8. Install
Code:
make install
9. When you finish the compilation, do not forget to add the following environment
variables to your .bashrc file.
Code:
gedit ~/.bashrc
10. Add the following lines at the end of bashrc and save.
Quote:
export PATH=~/DAKOTA/dakota-6.4.0/bin:~/DAKOTA/dakota-6.4.0/test
export LD_LIBRARY_PATH=~/DAKOTA/dakota-6.4.0/bin:~/DAKOTA/dakota-6.4.0/lib
11. Test by typing: Dakota -v. The version number and build date should appear on the
terminal.
This all steps based on the hint by Dakota and the guide by Joegi in wikifoam.
Best regards,
B.Chien.
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.:
3. cd ~/OpenFOAM
mv dakota-6.4.0.Linux.x86_64 dakota-6.4.0
5. 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:
8. 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!
9. Then add the alias dakota640 to the personal .bashrc with the following command:
This way, whenever a new terminal window is opened, run the alias command that will load the
environment:
dakota640
dakota --version
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.:
3. cd ~/OpenFOAM
mv dakota-6.5.0.Linux.x86_64 dakota-6.5.0
5. 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:
8. 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!
9. Then add the alias dakota650 to the personal .bashrc with the following command:
This way, whenever a new terminal window is opened, run the alias command that will load the
environment:
dakota650
dakota --version
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 fi
le: 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
dakota: error while loading shared libraries: libXm.so.4: cannot open shared ob
ject file: No such file or directory
Possible solutions
On Ubuntu 16.04 x86_64, the package libxm4 needs to be installed:
Einstellungen
Category:
Installing Dakota
Running CMake to (1) configure Dakota options as well as external software locations and
options, and (2) generate a development environment-specific build tree.
Running the development environment's build process to compile and link, e.g., Unix
make; running Visual Studio or nmake on Windows.
Testing the build
Installing the build
This process will typically take from 10 minutes to an hour, depending on hardware and
operating system.
mkdir build
cd build
# configure the build tree
cmake -DCMAKE_INSTALL_PREFIX=/path/to/dakota-installation /path/to/dakota-
source
# compile/link, specifying the number of processors
make -j 4
# run a minimal set of Dakota tests
cd test && ctest -j 4 -L Accept
# install to specified directory
make install
Specifying Additional CMake Options
Dakota has a number of required and optional and external package dependencies, and has
numerous internal subpackages. Thus, it is often necessary to specify additional CMake options
and/or environment variables to configure the build. See links below for instructions and more
detailed examples.
Dakota INSTALL
==============
NOTE: The most up to date installation guidance and tips can be found
alongside the downloads on the Dakota website.
=================
Table of Contents
=================
Distribution Contents
Binary Quick Start
I. Install Unix-Like Binary (Linux RHEL6/7, or binary compatible, Mac OS
X)
II. Install Windows Executable
III. Test Binary Distribution installation.
Source Quick Start
Other Resources
=====================
Distribution Contents
=====================
bin-dist include Include files for Dakota and it's associated TPLs.
bin-dist lib Library files for Dakota and it's associated TPLs.
src-dist src The main source code repository for Dakota core.
==================
Binary Quick Start
==================
--------------------------------------------------------------------
I. Install Unix-Like Binary (Linux RHEL6/7 or binary compatible, Mac OS X)
--------------------------------------------------------------------
$ cd /path/to/Dakota/install/directory
$ tar xzvf /path/to/dakota-<release>.src.tar.gz
$ ls
dakota-<release>.<platform>
$ mv dakota-<release>.<platform> dakota
2. Make sure Dakota executables (and optionally test files and current
directory) are available on the PATH by typing 'which dakota' at command
line prompt.
If your PATH variable is set correctly, the path to the dakota binary
should be displayed.
$ which dakota
$INSTALL_DIR/bin/dakota
where $INSTALL_DIR will be the absolute path specified in step #1 above.
Go to Section III to test the binary installation.
If your PATH variable is NOT set correctly, you will get a message like
the following:
$ which dakota
/usr/bin/which: no dakota in (/usr/local/bin:/usr/local/sbin)
Continue with step #3 to set your PATH variable.
3. If your PATH is not set correctly, make the following change to your
appropriate shell login script:
Bash shell
----------
a. Edit the startup file ~/.bashrc in your favorite text editor
b. Modify and export PATH variable. Type the following line, replacing
$INSTALL_DIR with the absolute path to your installation directory,
e.g. /home/username.
export PATH=$INSTALL_DIR/bin:$INSTALL_DIR/test:$PATH
$ source ~/.bashrc
C shell
-------
a. Edit the startup file ~/.cshrc in your favorite text editor
b. Set path variable. Type the following line, replacing
$INSTALL_DIR with the absolute path to your installation directory,
e.g. /home/username.
$ source ~/.cshrc
4. If you intend to use the dakota Python package, add the path
$INSTALL_DIR/share/dakota/Python/ to the environment variable
PYTHONPATH.
This can be made permanent by making this change in ~/.bashrc or
~/.cshrc.
Adapt the instructions in step 3.
--------------------------------------------------------------------
II. Install Windows Executable
--------------------------------------------------------------------
C:\Users\name>
path=%path%;%install_dir%\bin;%install_dir%\test;%install_dir%\lib
Note that the path will be set only for as long as the cmd window
remains open. To permanently add Dakota to your path, consult the
documentation for your version of Windows.
3. If you intend to use the dakota Python package, add the path
%install_dir%\share\dakota\Python to the environment variable
PYTHONPATH. As
with the change to %path%, this change will be lost when the cmd Window
is
closed. Consult the documentation for your version of Windows to make an
environment variable persistent.
--------------------------------------------------------------------
III. Test Binary Distribution installation.
--------------------------------------------------------------------
1. At a terminal prompt (on Windows, dakota.exe), type 'dakota -v'. You
should
see Dakota version information displayed.
> dakota -v
Running serial executable in serial mode.
Dakota released <release date>.
Subversion revision ### build <build data & time>.
Dakota execution time in seconds;
Total CPU = ...
Total wall clock = ...
If you do not get the expected version information, you may use the
following Dakota wrapper script for your platform. This wrapper script
sets
expected environment variables and can be used instead of the executable
name. To test the Dakota installation use the following command:
==================
Source Quick Start
==================
2. Extract Dakota source archive file. In the example below, Dakota will
be extracted into the user's home directory, /home/username.
$ cd $HOME
$ tar xzvf /path/to/dakota-<release>.public.src.tar.gz
$ export DAK_SRC=$HOME/dakota-<release>.src
$ mkdir -p /path/to/Dakota/build/directory
$ export DAK_BUILD=/path/to/Dakota/build/directory
$ cp $DAK_SRC/cmake/BuildDakotaTemplate.cmake \
$DAK_SRC/cmake/BuildDakotaCustom.cmake
$ cd $DAK_BUILD
$ cmake -C $DAK_SRC/cmake/BuildDakotaCustom.cmake $DAK_SRC
$ make [-j#]
$ make install
$ export PATH=$DAK_INSTALL/bin:$DAK_INSTALL/test:$PATH
$ export
LD_LIBRARY_PATH=$DAK_INSTALL/lib:$DAK_INSTALL/bin:$LD_LIBRARY_PATH
$ export
DYLD_LIBRARY_PATH=$DAK_INSTALL/lib:$DAK_INSTALL/bin:$DYLD_LIBRARY_PATH
Miscellaneous Notes:
* 'make [-j#]': Dakota supports concurrent build processes
===============
Other Resources
===============
Topic include:
* accessing Dakota via Subversion repository checkout
* source installation dependencies
* source installation options
* Dakota CMake hints
* generating local documentation
* summary of distributed Dakota libraries
* installing commercial libraries, such as DOT, NPSOL, and NLPQL