Page 1 of 1

error: DYNARE: can't open example1.mod

PostPosted: Sat May 29, 2010 5:42 pm
by matthias
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 http://www.dynare.org/ubuntu lucid main contrib".

Following http://www.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

Re: error: DYNARE: can't open example1.mod

PostPosted: Mon Jun 07, 2010 3:29 pm
by SébastienVillemot
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

Re: error: DYNARE: can't open example1.mod

PostPosted: Tue Jun 15, 2010 7:56 am
by matthias
Hi Sebastien,

thanks, it works fine now!

best,
Matthias

Re: error: DYNARE: can't open example1.mod

PostPosted: Tue Jul 06, 2010 12:26 pm
by jay
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

Re: error: DYNARE: can't open example1.mod

PostPosted: Thu Aug 19, 2010 1:40 pm
by SébastienVillemot
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.