Page 1 of 1

Problems with the .log-file

PostPosted: Thu Feb 09, 2012 3:20 pm
by Daniel Bendel
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

Re: Problems with the .log-file

PostPosted: Thu Feb 09, 2012 6:57 pm
by jpfeifer
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.

Re: Problems with the .log-file

PostPosted: Fri Feb 10, 2012 8:33 am
by Daniel Bendel
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.

Re: Problems with the .log-file

PostPosted: Fri Apr 20, 2012 4:16 pm
by SébastienVillemot
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.