Loop crashes

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.

Loop crashes

Postby petros_varth » Fri Oct 10, 2014 10:55 am

Hi All,

I am running a very large loop in which i change some of the parameters of my model.

However, most of the times this loop crashes with the following error:

Error: Can't open file two_country_currency_union_tn_dynamic.m for writing

Error using dynare (line 114)
DYNARE: preprocessing failed

Error in welfare_star_tn (line 49)
dynare two_country_currency_union_tn noclearall;


Any hints?

Best,

P.
petros_varth
 
Posts: 45
Joined: Wed Sep 30, 2009 5:35 pm

Re: Loop crashes

Postby jpfeifer » Fri Oct 10, 2014 11:48 am

If you only change parameters, you are not supposed to repeatedly call Dynare. Rather, run Dynare only once and then use the commands you want to run in a loop directly. See http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=4891
Whenever you run dynare itself, you are running the preprocessor, which re-creates all files. It seems that your machine is not quick enough in writing these files so that the previous iteration was not done yet with writing the created files, leading to the crash.
------------
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: Loop crashes

Postby hanz » Tue Oct 14, 2014 6:40 am

I had similar problems while using Dropbox. I paused syncing and the problem was solved.
hanz
 
Posts: 4
Joined: Tue Sep 30, 2014 7:36 am

Re: Loop crashes

Postby jpfeifer » Tue Oct 14, 2014 8:26 am

Let me reiterate my point. Although e.g. Wouter Den Haan and Eric Sims say so in their Dynare notes, you should always avoid running full Dynare within a loop or optimizer. If anyhow possible, make use of the Dynare rountines without running the preprocessor over and over again. This typically requires only small effort and increases speed by several magnitudes.
------------
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: No registered users and 12 guests