Bug: crash from unused forward looking model local variables
Posted: Thu May 20, 2010 2:56 pm
If there is a model local variable that contains a lead of an endogenous variable, and that model local variable is never used, then Dynare crashes with "an instance of 'DataTree::UnknownDerivIDException'".
This happens in 4.1.1 and in the nightly build.
The attached model file demonstrates it. (A massively stripped down version of the model file I was working with.)
To see that the two conditions are above are necessary for the crash, change the first line of the file to:
and rerun. It will then use the model local variable which is sufficient to remove the crash.
Then undo this change, and instead comment out line 44. Now the forward looking local variable does not get defined and again the crash disappears.
Tom
This happens in 4.1.1 and in the nightly build.
The attached model file demonstrates it. (A massively stripped down version of the model file I was working with.)
To see that the two conditions are above are necessary for the crash, change the first line of the file to:
- Code: Select all
@#define crash = 0
and rerun. It will then use the model local variable which is sufficient to remove the crash.
Then undo this change, and instead comment out line 44. Now the forward looking local variable does not get defined and again the crash disappears.
Tom