investigate problem deleting files with ms-sbvar on windows 7
This is about the problem we discussed with ms_estimation under Windows 7, Matlab 7.8.0 (R2009a). In a nutshell, if msvar is run more than once in a single Matlab session, the init files created on the first run cannot subsequently be deleted. This is a problem as when the init files are not deleted, changes to the model made in the mod file are not reflected in the dynare run. Matlab does not believe that it has any files open – type fopen(‘all’) to check – but windows thinks that Matlab does in fact have these files open. A guess is that the C code may not have fflush()ed the write buffer to the files before closing.
Thanks for your help.
- Roland
To replicate the problem:
· Starting from a clean directory with only RM_test.mod and data_SwitchingFed11_demeaned.dat, run dynare. Should be successful. · Run dynare a second time. The log file output I get is pasted below. Windows cannot delete “init_RM_test.dat” and other files because they are said to be in use by Matlab.
(email 28 June 2013 12:00:08 PM GMT+02:00)