Problems with the .log-file

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.

Problems with the .log-file

Postby Daniel Bendel » Thu Feb 09, 2012 3:20 pm

I have the following problem:

I do SMM with dynare. Since I use the from the .mod-file generated .m-file for minizisation of my distance function.
1. question:
what does this code do?
"
diary off;
logname_ = 'DSGE.log';
if exist(logname_, 'file')
delete(logname_)
end
diary(logname_)
"
What is the diary command doing?

2. When I do iteration, I often get the following error message:
Warning: File not found or permission denied
regarding the .log-file

What should I do to solve this problem?

Greets,
Daniel
Germany, Cologne
Daniel Bendel
 
Posts: 134
Joined: Tue Nov 15, 2011 1:06 pm
Location: Cologne, Germany

Re: Problems with the .log-file

Postby jpfeifer » Thu Feb 09, 2012 6:57 pm

The diary command in Matlab writes all output in the command window into a textfile. The mentioned code stops all previous diaries, then deletes the log-file potentially already present (the if part) and starts a new diary. The problem with calling Dynare repeatedly is that sometimes Matlab is not fast enough with closing the text-files, leading to crashs. However, I am not aware of a command to suppress writing a diary. However, it might be sensible to implement such a command in the future.
------------
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: Problems with the .log-file

Postby Daniel Bendel » Fri Feb 10, 2012 8:33 am

Okay, thank you.

For everyone with the same problems:
Let your iteration don't go to far, so that you can save your results, and start the iteration again with these new results, otherwise you will lost a lot of time.
Germany, Cologne
Daniel Bendel
 
Posts: 134
Joined: Tue Nov 15, 2011 1:06 pm
Location: Cologne, Germany

Re: Problems with the .log-file

Postby SébastienVillemot » Fri Apr 20, 2012 4:16 pm

A new option "nolog" has been added to the Dynare preprocessor in the unstable branch. It will be included in the future Dynare 4.3 release.
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 4 guests

cron