Dynare will not run in octave


I am unable to run dynare examples in octave…
I tried several version and got the message to try octave 4.4.0, which I did, but now dynare either crashes before finishing a run on example 1 and 2 or it shows some error message on undefined values.
I ran dynare successfully for years in matlab but do not have the licence any more.
What should I do?

What exactly is your error message and your system configuration (Dynare version, operating system, etc.)?

Hi again,
thanks for the quick response.
I installed octave 4.4.0 (as recommended when I ran dynare in 4.4.1), I used latest dynare, 4.5.6 and I use windows 10 pro.
Most of the time it crashed and therefore produces no error message but when in does than it’s something like this:

dynare example1

Configuring Dynare …
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.

Using 64-bit preprocessor
Starting Dynare (version 4.5.6).
Starting preprocessing of the model file …
Found 6 equation(s).
Evaluating expressions…done
Computing static model derivatives:

  • order 1
    Computing dynamic model derivatives:
  • order 1
  • order 2
    Processing outputs …
    Preprocessing completed.

error: value on right hand side of assignment is undefined


That is strange. @sebastien Do you have an idea?

Hi again,

it just got stranger…
It cannot run examples but it runs my own mod file, a DSGE with financial sector…
However it will not estimate it (though it did in matlab) stating first that it cannot handle inverse gamma prior due to a bug but than crashing on all subsequent trials…
I originally used inv_gamma, 0.15, 0.15 as a prior for my error terms…
alternatively I tried normal distribution, 0.01 and 0.1 and several other specifications but it cannot get passed plotting priors…
it crashes or calls an error from draw_prior_density…
Any idea of what prior to use to possibly overcome this? I am happy with a flatter prior…

That is unfortunately a limitation of Octave. You need to play around to see which specification for the prior works.

I admit I have no idea why example1.mod does not run in this case.

@tamara_b Just after the crash, could you please run the following two commands in a row and return their result:


HI again,

here is the output:
뙵狳>> lasterror.stack.file
ans = c:\dynare\4.5.6\matlab/modules/dates/src@dates\dates.m
ans = c:\dynare\4.5.6\matlab/modules/dates/src@dates\size.m
ans = c:\dynare\4.5.6\matlab\global_initialization.m
ans = c:\dynare\4.5.6\examples\example1.m
ans = c:\dynare\4.5.6\matlab\dynare.m

ans = 73
ans = 718
ans = 587
ans = 27
ans = 235

The problem occurs in the dates module. @stepan-a, does this ring a bell to you?

Hi again,

I found the answer to my prior problem on the forum…
I didn’t have statistics toolbox installed so:
pkg install -forge statistics
pkg load statistics
solved the problem and my code now runs just fine…

example files still make the octave crash though…

@sebastien no. Error message is too elliptic for me here to infer anything. I would need a mod file to reproduce the problem.

mod file is example1 from the dynare examples folder

@tamara_b We can’t reproduce your problem. It probably has to do with your execution environment, maybe your Octave installation which is broken in a subtle way… But without more details there’s not much we can do, sorry for that.