dynare issueshttps://git.dynare.org/Dynare/dynare/-/issues2021-11-24T10:32:33Zhttps://git.dynare.org/Dynare/dynare/-/issues/1823Fix or block interplay of stochastic Ramsey and block2021-11-24T10:32:33ZJohannes PfeiferFix or block interplay of stochastic Ramsey and block1. The attached file has a problem with the residual of the static model. It outputs residuals of the conditional steady state file that do not exist without `block` [rams1.mod](/uploads/708d194c770eb1cb8e1747f533139c19/rams1.mod)
2. Whe...1. The attached file has a problem with the residual of the static model. It outputs residuals of the conditional steady state file that do not exist without `block` [rams1.mod](/uploads/708d194c770eb1cb8e1747f533139c19/rams1.mod)
2. When overriding this and moving into `dyn_ramsey_static`, the `nblock`-input of the `+FNAME.static.m`-file is not set, suggesting that `block` is not supported in the first place.5.xSébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/1821evaluate_planner_objective does not compute expected utility correctly2021-10-18T16:43:48ZJohannes Pfeiferevaluate_planner_objective does not compute expected utility correctlySee the failed tests in !1945
The proximate cause is that the expected value `EU` in `evaluate_planner_objective.m` differs from what you would get when it were part of the variables in `oo_.mean`.See the failed tests in !1945
The proximate cause is that the expected value `EU` in `evaluate_planner_objective.m` differs from what you would get when it were part of the variables in `oo_.mean`.5.xhttps://git.dynare.org/Dynare/dynare/-/issues/1820Invalid memory accesses in local_state_space_iteration_2 when there are more ...2021-10-21T18:11:05ZSébastien VillemotInvalid memory accesses in local_state_space_iteration_2 when there are more shocks than statesIn [local_state_space_iteration_2](mex/sources/local_state_space_iterations/local_state_space_iteration_2.cc#L166), in function `ss2Iteration`, the block that computes `ghx·yhat+ghu·u` reads as follows:
```
for (int column = 0,...In [local_state_space_iteration_2](mex/sources/local_state_space_iterations/local_state_space_iteration_2.cc#L166), in function `ss2Iteration`, the block that computes `ghx·yhat+ghu·u` reads as follows:
```
for (int column = 0, column_ = 0; column < q; column++, column_ += m)
{
int i1 = variable+column_;
int i2 = column+particle__;
int i3 = column+particle___;
y[variable_] += ghx[i1]*yhat[i2];
y[variable_] += ghu[i1]*epsilon[i3];
}
for (int column = q, column_ = q*m; column < n; column++, column_ += m)
y[variable_] += ghx[variable+column_]*yhat[column+particle__];
```
This code makes the implicit assumption that `q⩽n`, i.e. that the number of shocks is less than or equal to the number of states. If `q>n`, it will try to read invalid memory references in `ghx` and `yhat`, and it will either crash or return dummy results.
The same problem is present in the `ss2Iteration_pruning` function.
The fix is simply to reorganize the loops, with one loop that only deals with the states and another one that deals with shocks.
@stepan-a If you agree with this diagnostic, I will take care of fixing it.5.xSébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/1819Fix bug in mex k-order-simulations (i.e. without pruning)2021-10-12T15:39:39ZJohannes PfeiferFix bug in mex k-order-simulations (i.e. without pruning)The mex-file `dynare_simul_` erroneously iterates on the policy function with a zero shock vector for the first (non-endogenous) period. As a consequence, results differ from the m-file-based simulations at second order and from a one at...The mex-file `dynare_simul_` erroneously iterates on the policy function with a zero shock vector for the first (non-endogenous) period. As a consequence, results differ from the m-file-based simulations at second order and from a one at a time sequential simulation (see https://forum.dynare.org/t/simult-results-different-with-loop/19053/3).
The bug will not affect
1. third order simulations with pruning, which are based on the m-file.
2. IRFs starting the stochastic steady state/ergodic mean in the absence of shocks due to it being the fixed point of the simulation.
The bug will typically hardly affect moment computations and IRFs at the ergodic mean due to the initial burn-in period. In that case, the initial condition should wash out.5.xhttps://git.dynare.org/Dynare/dynare/-/issues/1817Find workaround for warnings at Dynare startup under Octave2021-09-21T16:43:54ZSébastien VillemotFind workaround for warnings at Dynare startup under OctaveWhen Dynare starts under Octave, one gets:
```
warning: function /home/sebastien/dynare/unstable/matlab/+pac/+bgp/get.m shadows a built-in function
warning: called from
dynun at line 4 column 5
warning: function /home/sebastien/dyna...When Dynare starts under Octave, one gets:
```
warning: function /home/sebastien/dynare/unstable/matlab/+pac/+bgp/get.m shadows a built-in function
warning: called from
dynun at line 4 column 5
warning: function /home/sebastien/dynare/unstable/matlab/+pac/+bgp/set.m shadows a built-in function
warning: called from
dynun at line 4 column 5
```
This is the consequence of an [Octave bug](https://savannah.gnu.org/bugs/?46849).
A partial workaround was implemented in 4c0b2e8c4ec2df8f1833769db1c873486d2b87f7, but it does not suppress early warnings.
A better solution should be found.5.xSébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/1815bytecode locks .bin file after entering homotopy.2021-09-20T16:44:50ZJohannes Pfeiferbytecode locks .bin file after entering homotopy.Running [ireland.mod](/uploads/27aa0ebc6b17c399aa0a9f0ee2929c23/ireland.mod) triggers an exception
`Fatal error in bytecode: umfpack_dl_solve failed`
in the first iteration so that we enter homotopy mode. This it successful. But subseque...Running [ireland.mod](/uploads/27aa0ebc6b17c399aa0a9f0ee2929c23/ireland.mod) triggers an exception
`Fatal error in bytecode: umfpack_dl_solve failed`
in the first iteration so that we enter homotopy mode. This it successful. But subsequently, the mod-file cannot be run a second time due to `model/bytecode/dynamic.bin` being locked. It seems that
`SparseMatrix.cc` opens
```
SaveCode.open(file_name + "/model/bytecode/dynamic.bin", ios::in | ios::binary);
```
but never closes it in case of an exception.5.xSébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/1811Clarify auxiliary variable types2021-09-17T14:39:12ZJohannes PfeiferClarify auxiliary variable types- [x] Move https://archives.dynare.org/DynareWiki/AuxiliaryVariables to new Wiki
- [x] According to https://git.dynare.org/Dynare/dynare/-/blob/master/matlab/isauxiliary.m there are more than the 6 documented types
- [x] Check https://gi...- [x] Move https://archives.dynare.org/DynareWiki/AuxiliaryVariables to new Wiki
- [x] According to https://git.dynare.org/Dynare/dynare/-/blob/master/matlab/isauxiliary.m there are more than the 6 documented types
- [x] Check https://git.dynare.org/Dynare/dynare/-/blob/master/matlab/disp_dr.m for consistency (type 10 is missing)
- [x] Check whether type >8 still actually arises5.xhttps://git.dynare.org/Dynare/dynare/-/issues/1810macOS: solve installation problems2021-09-01T13:44:39ZJohannes PfeifermacOS: solve installation problemsSee https://forum.dynare.org/t/installation-failure-with-dynare-4-6-4/18563/18
and
https://github.com/Homebrew/discussions/discussions/1990#discussioncomment-1190489See https://forum.dynare.org/t/installation-failure-with-dynare-4-6-4/18563/18
and
https://github.com/Homebrew/discussions/discussions/1990#discussioncomment-11904895.xhttps://git.dynare.org/Dynare/dynare/-/issues/1808Update or remove https://archives.dynare.org/DynareWiki/EquationsTags2021-08-17T10:04:38ZJohannes PfeiferUpdate or remove https://archives.dynare.org/DynareWiki/EquationsTagsThe information there seems outdated or redundant, but it is still linked from the manual.The information there seems outdated or redundant, but it is still linked from the manual.5.xhttps://git.dynare.org/Dynare/dynare/-/issues/1807Manual: fix broken references2021-09-20T16:34:02ZJohannes PfeiferManual: fix broken referencesThe manual contains a bunch of broken internal references that seems to occur when referencing something that does not have a natural anchor. For example
```
.. _quote-note:
.. note::
Note on Quotes
```
and
```
...The manual contains a bunch of broken internal references that seems to occur when referencing something that does not have a natural anchor. For example
```
.. _quote-note:
.. note::
Note on Quotes
```
and
```
.. _VarianceDecomposition:
``VarianceDecomposition``
Decomposition of variance (unconditional variance, i.e. at
horizon infinity). [#f5]_
``VarianceDecompositionME``
Same as `VarianceDecomposition`_, but contains
```
do not work5.xhttps://git.dynare.org/Dynare/dynare/-/issues/1804Dynare++: fix --steps option2021-09-01T12:56:19ZJohannes PfeiferDynare++: fix --steps optionUsing
```
dynare++ --steps 1 example1.mod
```
returns
```
Caught TL exception: At ../tl/cc/t_container.hh:186:NaN or Inf asserted in TensorContainer::insert
```
See https://forum.dynare.org/t/steps-option-not-working/18634Using
```
dynare++ --steps 1 example1.mod
```
returns
```
Caught TL exception: At ../tl/cc/t_container.hh:186:NaN or Inf asserted in TensorContainer::insert
```
See https://forum.dynare.org/t/steps-option-not-working/186345.xSébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/1803Investigate reasons for incomplete source package distributed via Webpage2021-09-02T16:29:04ZJohannes PfeiferInvestigate reasons for incomplete source package distributed via WebpageSee https://forum.dynare.org/t/dynare-make-check-failed-tests/18600/5
This problem seems to affect only 4.6.4, i.e. may be superseded with the release of 4.7See https://forum.dynare.org/t/dynare-make-check-failed-tests/18600/5
This problem seems to affect only 4.6.4, i.e. may be superseded with the release of 4.75.xSébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/1799Document Occbin features2021-08-17T10:25:56ZJohannes PfeiferDocument Occbin features5.xJohannes PfeiferJohannes Pfeiferhttps://git.dynare.org/Dynare/dynare/-/issues/1797Octave on Mac Homebrew error with mkoctfile2021-09-15T15:49:13ZWilli Mutschlerwilli@mutschler.euOctave on Mac Homebrew error with mkoctfileWhen I compile from source on my Macbook Air (M1), I run into several issues with Octave. For instance, if I run `walsh.mod`, `mkoctfile` calls clang instead of `gcc`. This is most likely a Homebrew-specific problem.
```
Computing stati...When I compile from source on my Macbook Air (M1), I run into several issues with Octave. For instance, if I run `walsh.mod`, `mkoctfile` calls clang instead of `gcc`. This is most likely a Homebrew-specific problem.
```
Computing static model derivatives (order 1).
Computing dynamic model derivatives (order 1).
Processing outputs ...
Compiling static MEX...
"/usr/local/Cellar/octave/6.2.0_3/bin/mkoctfile" -O3 -g0 --param ira-max-conflict-table-size=1 -fno-forward-propagate -fno-gcse -fno-dce -fno-dse -fno-tree-fre -fno-tree-pre -fno-tree-cselim -fno-tree-dse -fno-tree-dce -fno-tree-pta -fno-gcse-after-reload --mex "walsh/model/src/static.c" -o "+walsh/static.mex"
clang: error: unknown argument: '-fno-forward-propagate'
clang: error: unknown argument: '-fno-dce'
clang: error: unknown argument: '-fno-dse'
clang: error: unknown argument: '-fno-tree-fre'
clang: error: unknown argument: '-fno-tree-pre'
clang: error: unknown argument: '-fno-tree-cselim'
clang: error: unknown argument '-fno-tree-dse'; did you mean '-fno-tree-dce'?
clang: error: unknown argument: '-fno-tree-pta'
clang: warning: optimization flag '-fno-gcse' is not supported [-Wignored-optimization-argument]
clang: warning: optimization flag '-fno-tree-dce' is not supported [-Wignored-optimization-argument]
clang: warning: optimization flag '-fno-gcse-after-reload' is not supported [-Wignored-optimization-argument]
Compilation failed
error: Dynare: preprocessing failed
error: called from
dynare at line 269 column 5
```5.xSébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/1792Clean up check_model.m2021-07-23T10:49:07ZJohannes PfeiferClean up check_model.mMost checks there strike me as wrong or outdated.
1. I think the preprocessor does substitutions for leads and lags of exogenous
2. `lead_lag_incidence` cannot be used to check the presence of a variable at a particular time period. We ...Most checks there strike me as wrong or outdated.
1. I think the preprocessor does substitutions for leads and lags of exogenous
2. `lead_lag_incidence` cannot be used to check the presence of a variable at a particular time period. We would need the Jacobian for that as we do in `model_diagnostics`.5.xhttps://git.dynare.org/Dynare/dynare/-/issues/1791bug in handling heteroskedastic shocks input2021-06-28T19:04:06ZMarco Rattobug in handling heteroskedastic shocks inputusing the attached modified mod file wrt test, with the following definitions:
```
heteroskedastic_shocks;
var e_b;
periods 100:120 125;
values 0.01 0.01;
var e_a;
periods 100:120 125;
scales 0 0;
end;
```
only triggers the ...using the attached modified mod file wrt test, with the following definitions:
```
heteroskedastic_shocks;
var e_b;
periods 100:120 125;
values 0.01 0.01;
var e_a;
periods 100:120 125;
scales 0 0;
end;
```
only triggers the last periods declared in heteroskdastic_shocks block (125) into `M_.heteroskedastic_shocks.Qhet`, ignoring all previous ones (100:125 in this case):
```
M_.heteroskedastic_shocks.Qhet.e_b
ans =
struct with fields:
time_value: 125
value: 0.0100
```
[fs2000_het.mod](/uploads/f5546deffa2da315852934a0b8fb60c7/fs2000_het.mod)5.xSébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/1789Regression in extended path2021-05-28T12:02:51ZJohannes PfeiferRegression in extended pathThe attached file runs in 4.6.4 but crashes in the unstable. We should add the file to the testsuite.
[rbc_OBC_pf.mod](/uploads/c34feb62e9e4bab503d399e7701a23e2/rbc_OBC_pf.mod)The attached file runs in 4.6.4 but crashes in the unstable. We should add the file to the testsuite.
[rbc_OBC_pf.mod](/uploads/c34feb62e9e4bab503d399e7701a23e2/rbc_OBC_pf.mod)5.xStéphane Adjemianstepan@adjemian.euStéphane Adjemianstepan@adjemian.euhttps://git.dynare.org/Dynare/dynare/-/issues/1783bug with auxiliary exo lags with loglinear2021-05-11T16:52:22ZMarco Rattobug with auxiliary exo lags with loglinearIn the new unit test `fs2000_het.mod`, (merge request !1844), I added a shock to the model to test `heteroskedastic_shocks`. doing that I noted a bug at the interaction between loglinear and auxiliary exo lag variables.
It turns out that...In the new unit test `fs2000_het.mod`, (merge request !1844), I added a shock to the model to test `heteroskedastic_shocks`. doing that I noted a bug at the interaction between loglinear and auxiliary exo lag variables.
It turns out that this modified mod file triggers an auxiliary lagged exo variable.
for this variable, ys is set to zero, which is then logged in `store_smoother_results`, resulting in inf's for that variable in `oo_.SmoothedVariables` etc.
Moreover, running forecast after that, this triggers nan for all forecasted variables.5.xhttps://git.dynare.org/Dynare/dynare/-/issues/1782Fix model_local_variable command2021-04-20T12:06:37ZJohannes PfeiferFix model_local_variable commandThe file [SW2007_4Forum.mod](/uploads/331476d7971f9497341297d7ee97f238/SW2007_4Forum.mod)
returns
`terminate called after throwing an instance of 'DataTree::UnknownLocalVariableException'`
See also https://forum.dynare.org/t/tex-output...The file [SW2007_4Forum.mod](/uploads/331476d7971f9497341297d7ee97f238/SW2007_4Forum.mod)
returns
`terminate called after throwing an instance of 'DataTree::UnknownLocalVariableException'`
See also https://forum.dynare.org/t/tex-output-unwanted-subscript-t/160725.xSébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/1781Check correctness of optimal policy with linear model2021-05-31T13:30:20ZJohannes PfeiferCheck correctness of optimal policy with linear model`stoch_simul` locally sets
if options_.order~=1 && M_.hessian_eq_zero
options_.order = 1;
However, `M_.hessian_eq_zero` only seems to apply to the original model, not the nonlinear one resulting from e.g. `ramsey_model`.
On top o...`stoch_simul` locally sets
if options_.order~=1 && M_.hessian_eq_zero
options_.order = 1;
However, `M_.hessian_eq_zero` only seems to apply to the original model, not the nonlinear one resulting from e.g. `ramsey_model`.
On top of that, the change is local, so `evaluate_planner_objective` will crash, because it expects `order=2`.
The same will happen when declaring `model(linear)`. Note that an additional check is in `stochastic_solvers`.
An example is
[ramsey_test.mod](/uploads/452ae65f88b2dde038ab7a844ec429ed/ramsey_test.mod)5.x