2018-10-25 16:31:53 +02:00
|
|
|
|
.. default-domain:: dynare
|
|
|
|
|
|
|
|
|
|
##############################
|
|
|
|
|
Installation and configuration
|
|
|
|
|
##############################
|
|
|
|
|
|
|
|
|
|
Software requirements
|
|
|
|
|
=====================
|
|
|
|
|
|
2021-11-16 16:53:50 +01:00
|
|
|
|
Packaged versions of Dynare are available for Windows (8.1, 10 and 11), several
|
2021-11-16 16:59:40 +01:00
|
|
|
|
GNU/Linux distributions (Debian, Ubuntu, Linux Mint, Arch Linux), macOS (12
|
|
|
|
|
“Monterey”), and FreeBSD. Dynare should work on other systems, but some
|
|
|
|
|
compilation steps are necessary in that case.
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
|
|
|
|
In order to run Dynare, you need one of the following:
|
|
|
|
|
|
2022-03-24 17:43:40 +01:00
|
|
|
|
* MATLAB, any version ranging from 8.3 (R2014a) to 9.12 (R2022a);
|
2022-09-06 11:22:13 +02:00
|
|
|
|
* GNU Octave, any version ranging from 6.2.0 to 7.2.0, with the statistics package
|
2021-11-09 18:15:11 +01:00
|
|
|
|
from `Octave-Forge`_. Note however that the Dynare installer for Windows
|
|
|
|
|
requires a more specific version of Octave, as indicated on the download
|
|
|
|
|
page.
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
The following optional extensions are also useful to benefit from
|
|
|
|
|
extra features, but are in no way required:
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
* If under MATLAB: the Optimization Toolbox, the Statistics Toolbox,
|
|
|
|
|
the Control System Toolbox;
|
|
|
|
|
|
2019-11-14 16:57:33 +01:00
|
|
|
|
* If under Octave, the following `Octave-Forge`_ packages: ``optim, io,
|
2019-02-18 19:24:42 +01:00
|
|
|
|
control``.
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Installation of Dynare
|
|
|
|
|
======================
|
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
After installation, Dynare can be used in any directory on your
|
|
|
|
|
computer. It is best practice to keep your model files in directories
|
|
|
|
|
different from the one containing the Dynare toolbox. That way you can
|
|
|
|
|
upgrade Dynare and discard the previous version without having to
|
|
|
|
|
worry about your own files.
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
On Windows
|
|
|
|
|
----------
|
|
|
|
|
|
2021-12-08 12:27:35 +01:00
|
|
|
|
Execute the automated installer called ``dynare-x.y-win.exe`` (where
|
|
|
|
|
``x.y`` is the version number), and follow the instructions. The
|
|
|
|
|
default installation directory is ``c:\dynare\x.y``.
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
After installation, this directory will contain several
|
|
|
|
|
sub-directories, among which are ``matlab``, ``mex`` and ``doc``.
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
The installer will also add an entry in your Start Menu with a
|
|
|
|
|
shortcut to the documentation files and uninstaller.
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
Note that you can have several versions of Dynare coexisting (for
|
|
|
|
|
example in ``c:\dynare``), as long as you correctly adjust your path
|
|
|
|
|
settings (see see :ref:`words-warning`).
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2019-10-14 12:03:40 +02:00
|
|
|
|
Also note that it is possible to do a silent installation, by passing the
|
|
|
|
|
``/S`` flag to the installer on the command line. This can be useful when
|
|
|
|
|
doing an unattended installation of Dynare on a computer pool.
|
|
|
|
|
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2019-10-14 12:01:37 +02:00
|
|
|
|
On GNU/Linux
|
|
|
|
|
------------
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2019-10-14 12:01:37 +02:00
|
|
|
|
On Debian, Ubuntu and Linux Mint, the Dynare package can be installed with:
|
|
|
|
|
``apt install dynare``. This will give a fully-functional Dynare installation
|
|
|
|
|
usable with Octave. If you have MATLAB installed, you should also do: ``apt
|
|
|
|
|
install dynare-matlab`` (under Debian, this package is in the ``contrib``
|
|
|
|
|
section). Documentation can be installed with ``apt install dynare-doc``. The
|
|
|
|
|
status of those packages can be checked at those pages:
|
|
|
|
|
|
|
|
|
|
* `Package status in Debian`_
|
|
|
|
|
* `Package status in Ubuntu`_
|
|
|
|
|
* `Package status in Linux Mint`_
|
|
|
|
|
|
|
|
|
|
On Arch Linux, the Dynare package is not in the official repositories, but is
|
|
|
|
|
available in the `Arch User Repository`_. The needed sources can be
|
|
|
|
|
downloaded from the `package status in Arch Linux`_.
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
Dynare will be installed under ``/usr/lib/dynare``. Documentation will
|
2021-10-08 12:32:38 +02:00
|
|
|
|
be under ``/usr/share/doc/dynare`` (only on Debian, Ubuntu and Linux Mint).
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
On macOS
|
|
|
|
|
--------
|
|
|
|
|
|
2021-10-08 12:46:23 +02:00
|
|
|
|
With MATLAB
|
|
|
|
|
^^^^^^^^^^^
|
|
|
|
|
|
2019-12-10 15:42:08 +01:00
|
|
|
|
To install Dynare for use with MATLAB, execute the automated installer called
|
2021-12-08 12:27:35 +01:00
|
|
|
|
``dynare-x.y.pkg`` (where *x.y* is the version number), and follow the
|
2019-12-10 15:42:08 +01:00
|
|
|
|
instructions. The default installation directory is
|
2021-12-08 12:27:35 +01:00
|
|
|
|
``/Applications/Dynare/x.y``. After installation, this directory will contain
|
2019-12-10 15:42:08 +01:00
|
|
|
|
several sub-directories, among which are ``matlab``, ``mex``, and ``doc``.
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
Note that several versions of Dynare can coexist (by default in
|
|
|
|
|
``/Applications/Dynare``), as long as you correctly adjust your path
|
|
|
|
|
settings (see :ref:`words-warning`).
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2019-12-10 15:42:08 +01:00
|
|
|
|
By default, the installer installs a version of GCC (for use with :opt:`use_dll`)
|
|
|
|
|
in the installation directory, under the ``.brew`` folder. To do so, it also
|
2021-10-08 12:46:23 +02:00
|
|
|
|
installs a version of Homebrew_ in the same folder and
|
2019-12-10 15:42:08 +01:00
|
|
|
|
Xcode Command Line Tools (this is an Apple product) in a system folder.
|
|
|
|
|
|
|
|
|
|
All of this requires a bit of time and hard disk space. The amount of time it
|
|
|
|
|
takes will depend on your computing power and internet connection. To reduce
|
|
|
|
|
the time the Dynare installer takes, you can install Xcode Command Line Tools
|
|
|
|
|
yourself (see :ref:`prerequisites-macos`). Dynare, Homebrew, and GCC use
|
|
|
|
|
about 600 MB of disk space while the Xcode Command Line Tools require about 400
|
|
|
|
|
MB.
|
|
|
|
|
|
|
|
|
|
If you do not use the :opt:`use_dll` option, you have the choice to forgo the
|
|
|
|
|
installation of GCC and hence Dynare will only take about 50 MB of disk space.
|
|
|
|
|
|
2021-10-08 12:46:23 +02:00
|
|
|
|
With Octave
|
|
|
|
|
^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
We don’t provide Dynare packages for macOS with Octave support, but there is a
|
|
|
|
|
Dynare package with Octave support in Homebrew_.
|
|
|
|
|
|
|
|
|
|
Once Homebrew_ is installed, run a terminal and install Dynare (and Octave) by
|
|
|
|
|
typing the following::
|
|
|
|
|
|
|
|
|
|
brew install dynare
|
|
|
|
|
|
|
|
|
|
Then open Octave by running the following in the same terminal::
|
|
|
|
|
|
|
|
|
|
octave --gui
|
|
|
|
|
|
|
|
|
|
Finally, at the Octave prompt, install some add-ons (you only have to do it
|
|
|
|
|
once)::
|
|
|
|
|
|
|
|
|
|
octave:1> pkg install -forge io statistics control struct optim
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2021-11-16 16:59:40 +01:00
|
|
|
|
On FreeBSD
|
|
|
|
|
----------
|
|
|
|
|
|
|
|
|
|
A `FreeBSD port for Dynare <https://www.freshports.org/science/dynare/>`__ is
|
|
|
|
|
available. It can be installed with::
|
|
|
|
|
|
|
|
|
|
pkg install dynare
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
|
|
|
|
For other systems
|
|
|
|
|
-----------------
|
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
You need to download Dynare source code from the `Dynare website`_ and
|
|
|
|
|
unpack it somewhere.
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
Then you will need to recompile the pre-processor and the dynamic
|
|
|
|
|
loadable libraries. Please refer to `README.md
|
2019-08-27 12:37:56 +02:00
|
|
|
|
<https://git.dynare.org/Dynare/dynare/blob/master/README.md>`__.
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
|
|
|
|
.. _compil-install:
|
|
|
|
|
|
|
|
|
|
Compiler installation
|
|
|
|
|
=====================
|
|
|
|
|
|
|
|
|
|
Prerequisites on Windows
|
|
|
|
|
------------------------
|
|
|
|
|
|
2019-12-04 14:46:44 +01:00
|
|
|
|
There are no prerequisites on Windows. Dynare now ships a compilation
|
2019-02-18 16:13:56 +01:00
|
|
|
|
environment that can be used with the :opt:`use_dll` option.
|
|
|
|
|
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2019-10-14 12:01:37 +02:00
|
|
|
|
Prerequisites on GNU/Linux
|
|
|
|
|
--------------------------
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2019-10-14 12:01:37 +02:00
|
|
|
|
Users of MATLAB under GNU/Linux need a working compilation environment
|
|
|
|
|
installed. Under Debian, Ubuntu or Linux Mint, it can be installed via ``apt
|
|
|
|
|
install build-essential``.
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2019-02-18 16:13:56 +01:00
|
|
|
|
Users of Octave under GNU/Linux should install the package for MEX file
|
2019-10-14 12:01:37 +02:00
|
|
|
|
compilation (under Debian, Ubuntu or Linux Mint, it can be done via ``apt
|
|
|
|
|
install liboctave-dev``).
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2019-12-10 15:42:08 +01:00
|
|
|
|
.. _prerequisites-macos:
|
|
|
|
|
|
2018-10-25 16:31:53 +02:00
|
|
|
|
Prerequisites on macOS
|
|
|
|
|
----------------------
|
|
|
|
|
|
2021-10-08 12:46:23 +02:00
|
|
|
|
With MATLAB
|
|
|
|
|
^^^^^^^^^^^
|
|
|
|
|
|
2019-12-06 14:57:46 +01:00
|
|
|
|
Dynare now ships a compilation environment that can be used with the
|
2019-12-10 15:42:08 +01:00
|
|
|
|
:opt:`use_dll` option. To install this environment correctly, the Dynare
|
|
|
|
|
installer ensures that the Xcode Command Line Tools (an Apple product) have
|
|
|
|
|
been installed on a system folder. To install the Xcode Command Line Tools
|
|
|
|
|
yourself, simply type ``xcode-select --install`` into the Terminal
|
|
|
|
|
(``/Applications/Utilities/Terminal.app``) prompt.
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2021-10-08 12:46:23 +02:00
|
|
|
|
With Octave
|
|
|
|
|
^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
The compiler can be installed via Homebrew_. In a terminal, run::
|
|
|
|
|
|
2022-09-06 12:05:50 +02:00
|
|
|
|
brew install gcc-12
|
2021-10-08 12:46:23 +02:00
|
|
|
|
|
2018-10-25 16:31:53 +02:00
|
|
|
|
Configuration
|
|
|
|
|
=============
|
|
|
|
|
|
|
|
|
|
For MATLAB
|
|
|
|
|
----------
|
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
.. highlight:: matlab
|
|
|
|
|
|
|
|
|
|
You need to add the ``matlab`` subdirectory of your Dynare
|
|
|
|
|
installation to MATLAB path. You have two options for doing that:
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
* Using the ``addpath`` command in the MATLAB command window:
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
Under Windows, assuming that you have installed Dynare in the
|
2021-12-08 12:27:35 +01:00
|
|
|
|
standard location, and replacing ``x.y`` with the correct version
|
2018-10-27 22:35:36 +02:00
|
|
|
|
number, type::
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2021-12-08 12:27:35 +01:00
|
|
|
|
>> addpath c:/dynare/x.y/matlab
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2019-10-14 12:01:37 +02:00
|
|
|
|
Under GNU/Linux, type::
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
>> addpath /usr/lib/dynare/matlab
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
Under macOS, assuming that you have installed Dynare in the standard
|
2021-12-08 12:27:35 +01:00
|
|
|
|
location, and replacing ``x.y`` with the correct version number,
|
2018-10-27 22:35:36 +02:00
|
|
|
|
type::
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2021-12-08 12:27:35 +01:00
|
|
|
|
>> addpath /Applications/Dynare/x.y/matlab
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
MATLAB will not remember this setting next time you run it, and you
|
|
|
|
|
will have to do it again.
|
|
|
|
|
|
|
|
|
|
* Via the menu entries:
|
|
|
|
|
|
|
|
|
|
Select the “Set Path” entry in the “File” menu, then click on “Add
|
|
|
|
|
Folder…”, and select the ``matlab`` subdirectory of ‘your Dynare
|
|
|
|
|
installation. Note that you *should not* use “Add with
|
|
|
|
|
Subfolders…”. Apply the settings by clicking on “Save”. Note that
|
|
|
|
|
MATLAB will remember this setting next time you run it.
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
|
|
|
|
|
2019-11-14 16:57:33 +01:00
|
|
|
|
For Octave
|
|
|
|
|
----------
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
You need to add the ``matlab`` subdirectory of your Dynare
|
|
|
|
|
installation to Octave path, using the ``addpath`` at the Octave
|
|
|
|
|
command prompt.
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
Under Windows, assuming that you have installed Dynare in the standard
|
2021-12-08 12:27:35 +01:00
|
|
|
|
location, and replacing “*x.y*” with the correct version number,
|
2018-10-27 22:35:36 +02:00
|
|
|
|
type::
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2021-12-08 12:27:35 +01:00
|
|
|
|
octave:1> addpath c:/dynare/x.y/matlab
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2019-10-14 12:01:37 +02:00
|
|
|
|
Under Debian, Ubuntu or Linux Mint, there is no need to use the ``addpath``
|
|
|
|
|
command; the packaging does it for you. Under Arch Linux, you need to do::
|
|
|
|
|
|
|
|
|
|
octave:1> addpath /usr/lib/dynare/matlab
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2021-10-08 12:46:23 +02:00
|
|
|
|
Under macOS, assuming you have installed Dynare via Homebrew_::
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2021-10-08 12:46:23 +02:00
|
|
|
|
octave:1> addpath /usr/local/lib/dynare/matlab
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
If you don’t want to type this command every time you run Octave, you
|
|
|
|
|
can put it in a file called ``.octaverc`` in your home directory
|
2019-05-13 12:23:04 +02:00
|
|
|
|
(under Windows this will generally be ``c:\Users\USERNAME`` while under macOS it is
|
2018-10-27 22:35:36 +02:00
|
|
|
|
``/Users/USERNAME/``). This file is run by Octave at every startup.
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _words-warning:
|
|
|
|
|
|
|
|
|
|
Some words of warning
|
|
|
|
|
---------------------
|
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
You should be very careful about the content of your MATLAB or Octave
|
|
|
|
|
path. You can display its content by simply typing ``path`` in the
|
|
|
|
|
command window.
|
|
|
|
|
|
|
|
|
|
The path should normally contain system directories of MATLAB or
|
|
|
|
|
Octave, and some subdirectories of your Dynare installation. You have
|
|
|
|
|
to manually add the ``matlab`` subdirectory, and Dynare will
|
|
|
|
|
automatically add a few other subdirectories at runtime (depending on
|
|
|
|
|
your configuration). You must verify that there is no directory coming
|
|
|
|
|
from another version of Dynare than the one you are planning to use.
|
|
|
|
|
|
|
|
|
|
You have to be aware that adding other directories (on top of the
|
|
|
|
|
dynare folders) to your MATLAB or Octave path can potentially create
|
|
|
|
|
problems if any of your M-files have the same name as a Dynare
|
|
|
|
|
file. Your routine would then override the Dynare routine, making
|
|
|
|
|
Dynare unusable.
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
.. warning::
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
2018-10-27 22:35:36 +02:00
|
|
|
|
Never add all the subdirectories of the ``matlab`` folder to the
|
|
|
|
|
MATLAB or Octave path. You must let Dynare decide which subdirectories
|
|
|
|
|
have to be added to the MATLAB or Octave path. Otherwise, you may
|
|
|
|
|
end up with a non optimal or un-usable installation of Dynare.
|
2018-10-25 16:31:53 +02:00
|
|
|
|
|
|
|
|
|
|
2019-10-14 12:01:37 +02:00
|
|
|
|
.. _Package status in Debian: https://packages.debian.org/sid/dynare
|
|
|
|
|
.. _Package status in Ubuntu: https://launchpad.net/ubuntu/+source/dynare
|
|
|
|
|
.. _Package status in Linux Mint: https://community.linuxmint.com/software/view/dynare
|
|
|
|
|
.. _Package status in Arch Linux: https://aur.archlinux.org/packages/dynare/
|
|
|
|
|
.. _Arch User Repository: https://wiki.archlinux.org/index.php/Arch_User_Repository
|
2018-10-27 22:35:36 +02:00
|
|
|
|
.. _Dynare website: https://www.dynare.org/
|
|
|
|
|
.. _Dynare wiki: https://git.dynare.org/Dynare/dynare/wikis
|
2019-10-08 16:29:07 +02:00
|
|
|
|
.. _Octave-Forge: https://octave.sourceforge.io/
|
2021-10-08 12:46:23 +02:00
|
|
|
|
.. _Homebrew: https://brew.sh
|