Building DAKOTA: Difference between revisions
Created page with "Dakota is an optimisation toolkit that we are evaluating as a wrapper for ASCEND simulations, to optimise complex systems. Since the documentation of Dakota is not updated to..." |
No edit summary |
||
| (14 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
[https://dakota.sandia.gov DAKOTA] (Design Analysis Kit for Optimisation and Terascale Applications) is an optimisation toolkit that we are evaluating as a wrapper for ASCEND as well as other simulations (eg [[Building Solstice|Solstice]]), to optimise complex systems. Note that Dakota is in no way a dependency or requirement for running ASCEND. | |||
Since the documentation of Dakota is not updated to Ubuntu 18.04, we have prepared the following concise instructions for getting it up and running on that distro: | |||
== Dakota 6.10 on Ubuntu 18.04 == | |||
<source lang=sh> | <source lang=sh> | ||
# install prerequisites | # install prerequisites | ||
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 gsl-bin libgsl0-dev subversion flex bison default-jdk doxygen texlive-latex-base | 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 gsl-bin libgsl0-dev subversion flex bison default-jdk doxygen texlive-latex-base | ||
# download and unpack the source code (version 6. | # download and unpack the source code (version 6.10) | ||
cd ~/src | cd ~/src | ||
wget https://dakota.sandia.gov/sites/default/files/distributions/public/dakota-6. | wget https://dakota.sandia.gov/sites/default/files/distributions/public/dakota-6.10-release-public.src.tar.gz | ||
tar zxf dakota-6. | tar zxf dakota-6.10*.gz | ||
cd dakota-6. | cd dakota-6.10.0.src | ||
# build | # build | ||
mkdir build && cd build | mkdir build && cd build | ||
cmake -DCMAKE_INSTALL_PREFIX= | cmake -DCMAKE_INSTALL_PREFIX=/home/john/.local .. | ||
# you can use 'make -j8' to go faster... | # you can use 'make -j8' to go faster, if you have more CPUs than my laptop... | ||
make -j4 | make -j4 | ||
cd test && ctest -j | cd test && ctest -j 4 -L Accept | ||
</source> | |||
These steps result in all tests passing. | |||
Note that you have to explicitly write out your installation path in the <tt>cmake</tt> line, hence <tt>-DCMAKE_INSTALL_PREFIX=/home/john/.local</tt>. If you write <tt>-DCMAKE_INSTALL_PREFIX=$HOME/.local</tt> or <tt>-DCMAKE_INSTALL_PREFIX=~/.local</tt>, it doesn't work. This seems like a bug. Assuming you've done this, you can then install dakota using | |||
<source lang=sh> | |||
make install | |||
export PATH=~/.local:$PATH LD_LIBRARY_PATH=~/.local/lib:$LD_LIBRARYPATH | |||
dakota --help | |||
</source> | </source> | ||
You can add the 'export' line to your <tt>~/.profile</tt> if you want it to be available automatically in future login sessions. | |||
If you want to be able to run optimisations of Python-based codes, you can use the 'black box' option (system call), or you can turn on the Python 'analysis driver', by adding the following to your <tt>cmake</tt> command line: | |||
<source lang=sh> | |||
-DDAKOTA_PYTHON=ON | |||
</source> | |||
It is possible to use Dakota in a 'sandwich' configuration, eg your program calls Dakota, which makes multiple evaluation calls back to a subroutine in your program again. We are working to figure out an example of how to do that firstly in Python. | |||
== Dakota 6.9 on Ubuntu 18.04 == | |||
Dakota 6.9 built using the same steps as above (for 6.10 on Ubuntu 18.04) results in the following error. The error is resolved by updating to Dakota version 6.10, or else reportedly by adding <tt>#include <cmath></tt> at the top of the file <tt>packages/external/JEGA/Utilities/include<JEGAConfig.hpp</tt>. | |||
<pre> | <pre> | ||
| Line 44: | Line 70: | ||
labs | labs | ||
</pre> | </pre> | ||
[[Category:Miscellany]] | |||
Latest revision as of 08:34, 6 August 2019
DAKOTA (Design Analysis Kit for Optimisation and Terascale Applications) is an optimisation toolkit that we are evaluating as a wrapper for ASCEND as well as other simulations (eg Solstice), to optimise complex systems. Note that Dakota is in no way a dependency or requirement for running ASCEND.
Since the documentation of Dakota is not updated to Ubuntu 18.04, we have prepared the following concise instructions for getting it up and running on that distro:
Dakota 6.10 on Ubuntu 18.04
Invalid language.
You need to specify a language like this: <source lang="html">...</source>
Supported languages for syntax highlighting:
a4c, abap, abc, abnf, actionscript, ada, agda, alan, algol, ampl, amtrix, applescript, arc, arm, as400cl, ascend, asciidoc, asp, aspect, assembler, ats, autohotkey, autoit, avenue, awk, ballerina, bat, bbcode, bcpl, bibtex, biferno, bison, blitzbasic, bms, bnf, boo, c, carbon, ceylon, charmm, chill, chpl, clean, clearbasic, clipper, clojure, clp, cmake, cobol, coffeescript, coldfusion, conf, cpp2, critic, crk, crystal, cs_block_regex, csharp, css, d, dart, delphi, diff, dockerfile, dts, dylan, ebnf, ebnf2, eiffel, elixir, elm, email, erb, erlang, euphoria, exapunks, excel, express, factor, fame, fasm, felix, fish, fortran77, fortran90, frink, fsharp, fstab, fx, gambas, gdb, gdscript, go, graphviz, haml, hare, haskell, haxe, hcl, html, httpd, hugo, icon, idl, idlang, inc_luatex, informix, ini, innosetup, interlis, io, jam, jasmin, java, javascript, js_regex, json, jsp, jsx, julia, kotlin, ldif, less, lhs, lilypond, limbo, lindenscript, lisp, logtalk, lotos, lotus, lua, luban, makefile, maple, markdown, matlab, maya, mercury, meson, miranda, mod2, mod3, modelica, moon, ms, msl, mssql, mxml, n3, nasal, nbc, nemerle, netrexx, nginx, nice, nim, nix, nsis, nxc, oberon, objc, ocaml, octave, oorexx, org, os, oz, paradox, pas, pdf, perl, php, pike, pl1, plperl, plpython, pltcl, po, polygen, pony, pov, powershell, pro, progress, ps, psl, pure, purebasic, purescript, pyrex, python, q, qmake, qml, qu, r, rebol, rego, rexx, rnc, rpg, rpl, rst, ruby, rust, s, sam, sas, scad, scala, scilab, scss, shellscript, slim, small, smalltalk, sml, snmp, snobol, solidity, spec, spn, sql, squirrel, styl, svg, swift, sybase, tcl, tcsh, terraform, tex, toml, tsql, tsx, ttcn3, txt, typescript, upc, vala, vb, verilog, vhd, vimscript, vue, wat, whiley, wren, xml, xpp, yaiff, yaml, yaml_ansible, yang, zig, znn
These steps result in all tests passing.
Note that you have to explicitly write out your installation path in the cmake line, hence -DCMAKE_INSTALL_PREFIX=/home/john/.local. If you write -DCMAKE_INSTALL_PREFIX=$HOME/.local or -DCMAKE_INSTALL_PREFIX=~/.local, it doesn't work. This seems like a bug. Assuming you've done this, you can then install dakota using
Invalid language.
You need to specify a language like this: <source lang="html">...</source>
Supported languages for syntax highlighting:
a4c, abap, abc, abnf, actionscript, ada, agda, alan, algol, ampl, amtrix, applescript, arc, arm, as400cl, ascend, asciidoc, asp, aspect, assembler, ats, autohotkey, autoit, avenue, awk, ballerina, bat, bbcode, bcpl, bibtex, biferno, bison, blitzbasic, bms, bnf, boo, c, carbon, ceylon, charmm, chill, chpl, clean, clearbasic, clipper, clojure, clp, cmake, cobol, coffeescript, coldfusion, conf, cpp2, critic, crk, crystal, cs_block_regex, csharp, css, d, dart, delphi, diff, dockerfile, dts, dylan, ebnf, ebnf2, eiffel, elixir, elm, email, erb, erlang, euphoria, exapunks, excel, express, factor, fame, fasm, felix, fish, fortran77, fortran90, frink, fsharp, fstab, fx, gambas, gdb, gdscript, go, graphviz, haml, hare, haskell, haxe, hcl, html, httpd, hugo, icon, idl, idlang, inc_luatex, informix, ini, innosetup, interlis, io, jam, jasmin, java, javascript, js_regex, json, jsp, jsx, julia, kotlin, ldif, less, lhs, lilypond, limbo, lindenscript, lisp, logtalk, lotos, lotus, lua, luban, makefile, maple, markdown, matlab, maya, mercury, meson, miranda, mod2, mod3, modelica, moon, ms, msl, mssql, mxml, n3, nasal, nbc, nemerle, netrexx, nginx, nice, nim, nix, nsis, nxc, oberon, objc, ocaml, octave, oorexx, org, os, oz, paradox, pas, pdf, perl, php, pike, pl1, plperl, plpython, pltcl, po, polygen, pony, pov, powershell, pro, progress, ps, psl, pure, purebasic, purescript, pyrex, python, q, qmake, qml, qu, r, rebol, rego, rexx, rnc, rpg, rpl, rst, ruby, rust, s, sam, sas, scad, scala, scilab, scss, shellscript, slim, small, smalltalk, sml, snmp, snobol, solidity, spec, spn, sql, squirrel, styl, svg, swift, sybase, tcl, tcsh, terraform, tex, toml, tsql, tsx, ttcn3, txt, typescript, upc, vala, vb, verilog, vhd, vimscript, vue, wat, whiley, wren, xml, xpp, yaiff, yaml, yaml_ansible, yang, zig, znn
You can add the 'export' line to your ~/.profile if you want it to be available automatically in future login sessions.
If you want to be able to run optimisations of Python-based codes, you can use the 'black box' option (system call), or you can turn on the Python 'analysis driver', by adding the following to your cmake command line:
Invalid language.
You need to specify a language like this: <source lang="html">...</source>
Supported languages for syntax highlighting:
a4c, abap, abc, abnf, actionscript, ada, agda, alan, algol, ampl, amtrix, applescript, arc, arm, as400cl, ascend, asciidoc, asp, aspect, assembler, ats, autohotkey, autoit, avenue, awk, ballerina, bat, bbcode, bcpl, bibtex, biferno, bison, blitzbasic, bms, bnf, boo, c, carbon, ceylon, charmm, chill, chpl, clean, clearbasic, clipper, clojure, clp, cmake, cobol, coffeescript, coldfusion, conf, cpp2, critic, crk, crystal, cs_block_regex, csharp, css, d, dart, delphi, diff, dockerfile, dts, dylan, ebnf, ebnf2, eiffel, elixir, elm, email, erb, erlang, euphoria, exapunks, excel, express, factor, fame, fasm, felix, fish, fortran77, fortran90, frink, fsharp, fstab, fx, gambas, gdb, gdscript, go, graphviz, haml, hare, haskell, haxe, hcl, html, httpd, hugo, icon, idl, idlang, inc_luatex, informix, ini, innosetup, interlis, io, jam, jasmin, java, javascript, js_regex, json, jsp, jsx, julia, kotlin, ldif, less, lhs, lilypond, limbo, lindenscript, lisp, logtalk, lotos, lotus, lua, luban, makefile, maple, markdown, matlab, maya, mercury, meson, miranda, mod2, mod3, modelica, moon, ms, msl, mssql, mxml, n3, nasal, nbc, nemerle, netrexx, nginx, nice, nim, nix, nsis, nxc, oberon, objc, ocaml, octave, oorexx, org, os, oz, paradox, pas, pdf, perl, php, pike, pl1, plperl, plpython, pltcl, po, polygen, pony, pov, powershell, pro, progress, ps, psl, pure, purebasic, purescript, pyrex, python, q, qmake, qml, qu, r, rebol, rego, rexx, rnc, rpg, rpl, rst, ruby, rust, s, sam, sas, scad, scala, scilab, scss, shellscript, slim, small, smalltalk, sml, snmp, snobol, solidity, spec, spn, sql, squirrel, styl, svg, swift, sybase, tcl, tcsh, terraform, tex, toml, tsql, tsx, ttcn3, txt, typescript, upc, vala, vb, verilog, vhd, vimscript, vue, wat, whiley, wren, xml, xpp, yaiff, yaml, yaml_ansible, yang, zig, znn
It is possible to use Dakota in a 'sandwich' configuration, eg your program calls Dakota, which makes multiple evaluation calls back to a subroutine in your program again. We are working to figure out an example of how to do that firstly in Python.
Dakota 6.9 on Ubuntu 18.04
Dakota 6.9 built using the same steps as above (for 6.10 on Ubuntu 18.04) results in the following error. The error is resolved by updating to Dakota version 6.10, or else reportedly by adding #include <cmath> at the top of the file packages/external/JEGA/Utilities/include<JEGAConfig.hpp.
/home/john/src/dakota-6.9.0.src/packages/external/JEGA/Utilities/src/DiscreteDesignVariableNature.cpp: In function ‘double JEGA::Utilities::relative_difference(double, double)’:
/home/john/src/dakota-6.9.0.src/packages/external/JEGA/Utilities/src/DiscreteDesignVariableNature.cpp:106:13: error: ‘isnan’ is not a member of ‘std’
if(std::isnan(arg_a) || std::isnan(arg_b)) return max_val;
^~~~~
/home/john/src/dakota-6.9.0.src/packages/external/JEGA/Utilities/src/DiscreteDesignVariableNature.cpp:106:34: error: ‘isnan’ is not a member of ‘std’
if(std::isnan(arg_a) || std::isnan(arg_b)) return max_val;
^~~~~
/home/john/src/dakota-6.9.0.src/packages/external/JEGA/Utilities/src/DiscreteDesignVariableNature.cpp:109:8: error: ‘fabs’ was not declared in this scope
if(fabs(arg_b) > max_val)
^~~~
/home/john/src/dakota-6.9.0.src/packages/external/JEGA/Utilities/src/DiscreteDesignVariableNature.cpp:109:8: note: suggested alternative: ‘labs’
if(fabs(arg_b) > max_val)
^~~~
labs
Scanning dependencies of target sandia_cubature_prb
/home/john/src/dakota-6.9.0.src/packages/external/JEGA/Utilities/src/DiscreteDesignVariableNature.cpp:123:13: error: ‘fabs’ was not declared in this scope
arg_a = fabs(arg_a);
^~~~
[ 40%] Building CXX object packages/external/VPISparseGrid/test/CMakeFiles/sandia_rules2_prb.dir/sandia_rules2_prb.cpp.o
/home/john/src/dakota-6.9.0.src/packages/external/JEGA/Utilities/src/DiscreteDesignVariableNature.cpp:123:13: note: suggested alternative: ‘labs’
arg_a = fabs(arg_a);
^~~~
labs