error: DYNARE: can't open example1.mod

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

error: DYNARE: can't open example1.mod

Postby matthias » Sat May 29, 2010 5:42 pm

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
matthias
 
Posts: 2
Joined: Sat May 29, 2010 5:23 pm

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

Postby SébastienVillemot » Mon Jun 07, 2010 3:29 pm

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
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

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

Postby matthias » Tue Jun 15, 2010 7:56 am

Hi Sebastien,

thanks, it works fine now!

best,
Matthias
matthias
 
Posts: 2
Joined: Sat May 29, 2010 5:23 pm

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

Postby jay » Tue Jul 06, 2010 12:26 pm

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
jay
 
Posts: 1
Joined: Tue Jul 06, 2010 12:13 pm

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

Postby SébastienVillemot » Thu Aug 19, 2010 1:40 pm

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.
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 9 guests