I’m generating data using one model and then estimate a slightly different model using that data. Some times I get this error message:

Configuring Dynare …

[mex] Generalized QZ.

[m] Sylvester equation solution.

[mex] Kronecker products.

[mex] Sparse kronecker products.

Starting Dynare …

Starting preprocessing of the model file …

4 equation(s) found

Processing derivation …

Processing Order 1… done

Processing Order 2… done

Processing outputs …

Preprocessing completed.

Starting Matlab computing …

??? Error using ==> dynare

DYNARE: preprocessing failed

Error in ==> mf_parsim_run2_tau4_randiv_aux at 79

dynare mf_est_randiv noclearall

I set the randn(‘seed’, number) in the .m file that runs the loop for generating the data and using it to estimate another model. If I rerun the model with the same seed, it runs fine but they may crash again for a different seed. Is there anything that may be causing this?

Thank you.

Hi,

There is at least something strange:

```
[mex] Generalized QZ.
[m] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
```

This means that MATLAB counldn’t detect the MEX file for sylvester equation solution. So something is broken in your Dynare installation. You should try to reinstall Dynare and make sure that your MATLAB path is clean.

Best,

Thank you for your response! I re-downloaded the 4.0.4 installation file, reinstalled Dynare, and added the matlab folder as described in the readme file but I’m still getting the [m] Sylvester equation solution in Dynare output. Is there a particular file that I need to be looking for? Does it matter that my Matlab version is from 2005? Also, I read that the [mex] vs [m] difference only affected the speed of calculation but not the outcome. Is that correct?

Thank you for your help.

Sorry, I resolved the previous issue–it had to do with setting the path. Things call the mex files now that I’m running everything out of 4.0.4 rather than 4.0.4/matlab folder. However, every now and then this error pops up:

??? Error using ==> diary

mf_parsim_tau4.log: Cannot open file: permission denied.

Error in ==> mf_parsim_tau4 at 23

diary mf_parsim_tau4.log

Error in ==> dynare at 102

evalin(‘base’,fname) ;

Error in ==> datagen_tau4 at 36

dynare mf_parsim_tau4 noclearall

Any suggestions regarding how to prevent this from happening? Thank you very much.

Actually, there were other problems with the program crashing (errors after attempts to write to and save files or popping up the shocks and variables graphs), but at least for now they seem to have been resolved by doing ‘rehash toolboxcache’. No idea why that helped but it does seem to work as it should now…