Sometimes it runs, sometimes it doesn't

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.

Sometimes it runs, sometimes it doesn't

Postby asidorov » Tue Jul 07, 2015 8:26 pm

Dear everybody,

I am a beginner and struggeling at the moment with the following problem:
Sometimes my code runs and sometimes it doesn't, sometimes it gets only through the half of the iterations required before it crashes.
At all times I get the same answer:

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

Error using dynare (line 174)
DYNARE: preprocessing failed

Error in Paper_bank_run (line 189)
dynare Paper_bank_run_DSGE noclearall

The problem lies within the second half (unanticipated run) of the matlab file, the first one works just fine (at least it seems that way). The second one calls the paper_bank_run_DSGE.mod file as part of its iteration process and that's where the 'fun' begins.

I would appreciate any suggestions! Thanks a lot in advance.
Attachments
Paper_basic_DSGE.mod
(3.11 KiB) Downloaded 77 times
Paper_bank_run_DSGE.mod
(3.22 KiB) Downloaded 65 times
Paper_bank_run.m
(8.68 KiB) Downloaded 68 times
asidorov
 
Posts: 2
Joined: Tue Apr 21, 2015 6:38 am

Re: Sometimes it runs, sometimes it doesn't

Postby jpfeifer » Wed Jul 08, 2015 3:30 am

I am not sure what you are actually iterating over, but if you call Dynare repeatedly, the preprocessor may be faster than your harddisk so that it tries to create files that your system is still deleting. If you cannot build your loop without running the preprocessor several times, it might be necessary to give the harddisk more time by adding a
Code: Select all
pause

command from Matlab. Try one second first.
------------
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: Sometimes it runs, sometimes it doesn't

Postby asidorov » Wed Jul 08, 2015 7:25 am

Thank you very much Johannes, it did the trick! As usual, the solution is pretty straightforward now that I know it^^

Just a short explanation to the file: It's about to become a model of a sunspot equilibrium, a 'random state' in which the bank is thrown and that triggers a bank run. Therefore I need to 'construct' a new path backwards from the steady state to the bank run (which happens after a shock). But there are still a few bugs, of course. But thanks to you I am on them now - previously I just couldn't see what I got^^
asidorov
 
Posts: 2
Joined: Tue Apr 21, 2015 6:38 am


Return to Dynare help

Who is online

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