Building DAKOTA: Difference between revisions

From ASCEND
Jump to navigation Jump to search
No edit summary
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
[https://dakota.sandia.gov Dakota] is an optimisation toolkit that we are evaluating as a wrapper for ASCEND simulations, to optimise complex systems. Note that Dakota is in no way a dependency or requirement for running ASCEND.
[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:
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:
Line 15: Line 15:
# build
# build
mkdir build && cd build
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local ..
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 8 -L Accept
cd test && ctest -j 4 -L Accept
</source>
</source>


These steps result in all tests passing. However 'make install' doesn't result in any files being placed in <tt>~/.local/bin</tt>, although it ''does'' result in files in <tt>~/.local/share/dakota</tt>. Not sure what is wrong there.
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>
 
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 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 6.10.s
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>

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