Running loops and error message

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.

Running loops and error message

Postby iacoviel » Sun Feb 22, 2015 4:23 pm

When I try running dynare in a loop, I sometimes get this error message

-----------
Processing outputs ...ERROR: Can't open file filename_static.m for writing

??? Error using ==> dynare at 114
DYNARE: preprocessing failed
--------------

Is there any way to avoid this? I have tried in some cases with success to slow down the execution of the loop, but that defeats a little bit the purpose. Any other suggestions?
iacoviel
 
Posts: 38
Joined: Wed Feb 01, 2006 6:25 pm

Re: Running loops and error message

Postby jpfeifer » Sun Feb 22, 2015 6:48 pm

Dear Matteo, what exactly are you trying to accomplish? Running the Dynare preprocessor within a loop is seldom necessary and very inefficient. Do you really want to recreate all Dynare files or are you only varying parameters within a loop? You can also send me the files in question per email so that I can provide you with more detailed feedback.

Best,

Johannes
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Running loops and error message

Postby iacoviel » Fri Feb 27, 2015 4:11 am

Hi Johannes

Your reply helped a lot and convinced me to bypass the pre-processor. I eventually managed to bypass invoking the pre-processor every time.

Every time I have to learn it again. Maybe for next time is there a handy reference on how to loop over parameters?

Thanks a lot
iacoviel
 
Posts: 38
Joined: Wed Feb 01, 2006 6:25 pm

Re: Running loops and error message

Postby jpfeifer » Fri Feb 27, 2015 7:24 am

Dear Matteo,

currently, the best reference is http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=4891. Better documenting this is on my to do list for my "Guide to Observation Equations".
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 7 guests