Dynare for Octave

Porting of Dynare to Octave is under progress. Development is done using Octave versions 3.0.0 and 3.0.1.

About Octave

Octave is a free clone of Matlab, running under Linux, Windows and MacOS.

It normally runs in a command window, and displays graphics in separate windows (using Gnuplot).

Some ressources:

Development of Dynare for Octave

A specific subversion branch has been created under branches/dynare_v4_octave. Note that this branch is supposed to work on both Matlab and Octave (using tests to differentiate between the two when necessary). Please report any failure to run under Matlab.

It is possible to view the differences between Matlab and Octave versions of Dynare by issuing:

svn diff http://www.cepremap.cnrs.fr/svn/dynare_v4 http://www.cepremap.cnrs.fr/svn/branches/dynare_v4_octave

Note: be aware that recent changes to Matlab version of Dynare may not have been yet merged into the Octave branch, and may thus appear as spurious differences.

Installing Dynare for Octave

GNU/Linux

For Debian "Lenny" or Ubuntu "Hardy Heron", see InstallOnDebianOrUbuntu.

For other distributions, you should begin by installing the octave3.0 package. Then download the SVN tree with:

svn checkout http://www.cepremap.cnrs.fr/svn/branches/dynare_v4_octave

Compile the preprocessor by typing make in the preprocessor directory.

Finally, compile the dynamic libraries (MEX-files) by typing octave build_octave.m from the mex/sources directory.

Windows

The recommended Octave distribution is the [http://sourceforge.net/project/showfiles.php?group_id=2888&package_id=40078 precompiled binaries from Octave Forge]. Pick up the octave-3.0.1-vs2008-setup.exe installer.

Note that this binary distribution has a bug which makes Octave crash everytime one types clear all (and therefore everytime one runs Dynare!). A simple workaround is to type the following command the first time you run Octave:

pkg rebuild -noauto ftp ann database

[http://wiki.octave.org/wiki.pl?CategoryInstall Other binary packages for Windows] are listed on Octave Wiki, but they look not very stable. Also note that the Cygwin package is quite outdated.

Then, form a Cygwin prompt, assuming you have installed the subversion package, download the source tree in the current directory with:

svn checkout http://www.cepremap.cnrs.fr/svn/branches/dynare_v4_octave

Compile the preprocessor by typing make in the preprocessor directory.

The dynamic libraries (MEX-files) can be compiled with [http://www.microsoft.com/express/download/default.aspx Microsoft Visual C++ 2008], which is now freely downloadable. The exact procedure will be soon detailed.

Running Dynare for Octave

First, you should run Octave.

Under Linux, at the prompt, just type:

octave

Under Windows, you should have a shortcut already installed in your Start menu.

It is also possible to run [http://www.gnu.org/software/octave/doc/interpreter/Emacs.html Octave under Emacs].

Then, from Octave, add the path to Dynare with the addpath command, as you would under Matlab:

addpath REPLACE_WITH_INSTALL_PATH/matlab

It is possible to autoexecute this command at each Octave start by adding it to the .octaverc startup file (under Linux, this file should be put in the home directory; under Windows, it should be put at the root of the user home under Documents and Settings).

Unless you tell it to do otherwise, Octave won't accept the short syntax when typing dynare command. In other words, to run Dynare on ramst.mod, you need to type:

dynare('ramst')

rather than:

dynare ramst

However, you can force Octave to accept the short syntax by typing the following (or by adding it to your .octaverc):

mark_as_command dynare

Current status of development

Main changes between Matlab and Octave versions of Dynare