Error: DYNARE: can't open example1.mod

Dear all,

I am currently facing a problem with Dynare 4.1.1 for Octave 3.2.3 under Ubuntu 10.04. I have installed Dynare using: “deb dynare.org/ubuntu lucid main contrib”.

Following dynare.org/DynareWiki/Instal … anOrUbuntu I now should be able to launch Dynare with “dynare filename.mod”, but I guess I first have to indicate where the .mod files are located:

octave-3.2.3:1> dynare example1.mod

Configuring Dynare …
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.

error: DYNARE: can’t open example1.mod
error: called from:
error: /usr/share/octave/site/api-v37/m/dynare.m at line 110, column 5

So I change the directory to “/usr/share/doc/dynare-doc/examples”. Now I get:


octave-3.2.3:1> cd /usr/share/doc/dynare-doc/examples
octave-3.2.3:2> dynare example1.mod

Configuring Dynare …
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.

ERROR: Can’t open file example1.m for writing
Starting Dynare (version 4.1.1).
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

error: DYNARE: preprocessing failed
error: called from:
error: /usr/share/octave/site/api-v37/m/dynare.m at line 128, column 1

Thank you for your help!

best,
Matthias

Hi,

You indeed need to go to the directory where the MOD file is before running Dynare (using the “cd” command).

This is what you do in your second example, but I think it fails for another reason: here you are trying to run Dynare from a directory (“/usr/share/doc/dynare…”) where you most probably don’t have write permissions. You should copy your MOD file somewhere in your home directory and run it from there.

Best

Hi Sebastien,

thanks, it works fine now!

best,
Matthias

Hi,
I also have the same problem.

addpath C:\dynare\4.1.2
cd C:\dynare\4.1.2\examples
dynare example1.mod

Configuring Dynare …
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.

Starting Dynare (version 4.1.2).
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
    ERROR: Can’t open file example1.m for writing

??? Error using ==> dynare at 126
DYNARE: preprocessing failed

My guess is that this response from Sebastien is the one that matches my problem. “you are trying to run Dynare from a directory (“/usr/share/doc/dynare…”) where you most probably don’t have write permissions. You should copy your MOD file somewhere in your home directory and run it from there.”

I’m not so sure what is meant by home directory, but I copied the MOD file on my desktop. as you can see below, it didn’t work eaither but apparently for another reason.

cd C:\Documents and Settings\coheje\Desktop\Dynare
??? Error using ==> cd
Too many input arguments.

Jay

A home directory only exists under Linux and Mac. It is more or less equivalent to the “Document and Settings” folder under Windows.

Here your “CD” command fails because of the spaces in “Documents and Settings”. Try to enclose the filename between quotes.