dynare issueshttps://git.dynare.org/Dynare/dynare/-/issues2019-02-08T08:30:47Zhttps://git.dynare.org/Dynare/dynare/-/issues/1291Error when running the OSR example in octave2019-02-08T08:30:47ZStéphane Adjemianstepan@adjemian.euError when running the OSR example in octave*Created by: felipeboralli*
When trying to run the Optimal simple rule example from the documentation, an error was generated in Octave.
GNU Octave, version 3.8.1 "i686-w64-mingw32".
Dynare unstable (version 2016-08-23).
Example run(th...*Created by: felipeboralli*
When trying to run the Optimal simple rule example from the documentation, an error was generated in Octave.
GNU Octave, version 3.8.1 "i686-w64-mingw32".
Dynare unstable (version 2016-08-23).
Example run(the same in the documentation):
```
var y inflation r;
varexo y_ inf_;
parameters delta sigma alpha kappa gammarr gammax0 gammac0 gamma_y_ gamma_inf_;
delta = 0.44;
kappa = 0.18;
alpha = 0.48;
sigma = -0.06;
gammarr = 0;
gammax0 = 0.2;
gammac0 = 1.5;
gamma_y_ = 8;
gamma_inf_ = 3;
model(linear);
y = delta * y(-1) + (1-delta)*y(+1)+sigma *(r - inflation(+1)) + y_;
inflation = alpha * inflation(-1) + (1-alpha) * inflation(+1) + kappa*y + inf_;
r = gammax0*y(-1)+gammac0*inflation(-1)+gamma_y_*y_+gamma_inf_*inf_;
end;
shocks;
var y_; stderr 0.63;
var inf_; stderr 0.4;
end;
optim_weights;
inflation 1;
y 1;
y, inflation 0.5;
end;
osr_params gammax0 gammac0 gamma_y_ gamma_inf_;
osr y;
```
Output with error:
```
>> dynare vtest
Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.
Using 32-bit preprocessor
Starting Dynare (version 2016-08-23).
Starting preprocessing of the model file ...
Found 3 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Processing outputs ...
done
Preprocessing completed.
error: strmatch: S must be a string
error: called from:
error: [redacted]\octave-3.8.1\share\octave\3.8.1\m\strings\strmatch.m at line 61, column 5
error: [redacted]\dynare-2016-08-23-win\matlab\osr.m at line 54, column 17
error: [redacted]\vtest.m at line 164, column 9
error: [redacted]\dynare-2016-08-23-win\matlab\dynare.m at line 223, column 1
```
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1286issue undeclared model variable errors at the end of model parsing2019-06-19T15:37:47ZHoutan Bastaniissue undeclared model variable errors at the end of model parsingCurrently, when a variable is in an equation but not declared, the preprocessor issues an error and stops parsing. This is a problem during model development as a user can potentially need to run dynare several times before catching all ...Currently, when a variable is in an equation but not declared, the preprocessor issues an error and stops parsing. This is a problem during model development as a user can potentially need to run dynare several times before catching all undeclared variables. To fix this, `preprocessor/ParsingDriver.cc` needs to be modified to check the existence of variables at the end of the `model` block.
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1285bytecode crash in Octave2019-06-19T15:37:47ZHoutan Bastanibytecode crash in Octave`tests/conditional_forecasts/5/fs2000_cal.mod` causes Octave 4.0.3 to crash. Seems like a memory management problem as the error message is:
```
computing the first order solution of the model as initial guess...*** Error in '/usr/bin/o...`tests/conditional_forecasts/5/fs2000_cal.mod` causes Octave 4.0.3 to crash. Seems like a memory management problem as the error message is:
```
computing the first order solution of the model as initial guess...*** Error in '/usr/bin/octave-cli': double free or corruption (out): 0x00000000020b3630 ***
panic: Aborted -- stopping myself...
```
This may also be linked to the testsuite error in Matlab.
4.5https://git.dynare.org/Dynare/dynare/-/issues/1278Clarify and debug macro processor arithmetic in define statements.2019-06-19T15:37:47ZJohannes PfeiferClarify and debug macro processor arithmetic in define statements.Using
```
@# define a=2
@# define b=3
@# define p= a/b
disp(@{p})
```
with `savemacro=temp onlymacro` results in
```
@#line "junk2.mod" 1
disp(0)
```
which is not the expected outcome.
```
@# define a=1
@# define b=2/3
@# define ...Using
```
@# define a=2
@# define b=3
@# define p= a/b
disp(@{p})
```
with `savemacro=temp onlymacro` results in
```
@#line "junk2.mod" 1
disp(0)
```
which is not the expected outcome.
```
@# define a=1
@# define b=2/3
@# define p= a/b
disp(@{p})
```
crashes the preprocessor on Windows
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1280grouping shocks in decompositions2019-06-19T15:37:47ZMarco Rattogrouping shocks in decompositionswould it be possible to allow a more flexible naming of the groups, allowing a sort of verbatim reading of what is before `=` .
the following syntax does not work
```
shock_groups;
...
Price Mark-up EA = emup;
Wage Mark-up EA = emuw;
.....would it be possible to allow a more flexible naming of the groups, allowing a sort of verbatim reading of what is before `=` .
the following syntax does not work
```
shock_groups;
...
Price Mark-up EA = emup;
Wage Mark-up EA = emuw;
...
end;
```
not sure if this can be modified, by allowing group names to be given inside brackets, as follows:
```
shock_groups;
...
(Price Mark-up EA) = emup;
(Wage Mark-up EA) = emuw;
...
end;
```
?
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1276bug in conditional forecast2019-06-19T15:37:47ZMarco Rattobug in conditional forecastThe conditional forecast is buggy.
Namely there is some inconsistency in indexing between decision rule and declaration order.
The way to fix it is to make sure that the pre-processor sets the vector of indices:
`constrained_vars_`
i...The conditional forecast is buggy.
Namely there is some inconsistency in indexing between decision rule and declaration order.
The way to fix it is to make sure that the pre-processor sets the vector of indices:
`constrained_vars_`
in decision rule order.
In fact, `imcforecast` assumes that `constrained_vars_` is in decision rule order
Moreover, one needs to fix `imcforecast` for the trend, since the latter is already defined in decision-rule ordering (so no need to use `inv_order_var`). I am going to make a pull request with the `imcforecast` fix, but I do not touch the pre-processor. If someone (@houtan?) could help with the latter.
Many thanks
4.5Houtan BastaniMarco RattoHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1272Account for MAC in AnalyseComputationalEnvironment.m and GiveCPUnumber.m2019-06-19T15:37:49ZJohannes PfeiferAccount for MAC in AnalyseComputationalEnvironment.m and GiveCPUnumber.mThe call to
`[si0 de0]=system('grep processor /proc/cpuinfo');`
should be
`[si0 de0]=system('sysctl -a | grep machdep.cpu | grep core_count');` (see http://fortysomethinggeek.blogspot.de/2012/11/getting-cpu-info-from-command-line-in.htm...The call to
`[si0 de0]=system('grep processor /proc/cpuinfo');`
should be
`[si0 de0]=system('sysctl -a | grep machdep.cpu | grep core_count');` (see http://fortysomethinggeek.blogspot.de/2012/11/getting-cpu-info-from-command-line-in.html)
`GiveCPUnumber.m` then also needs to be adjusted to account for this.
Related to #838
4.5https://git.dynare.org/Dynare/dynare/-/issues/1266bug with eig in Matlab R2012a2019-06-19T15:37:49ZHoutan Bastanibug with eig in Matlab R2012aOn line 197 of `matlab/identification_analysis.m`, we have `[V,D,W]=eig(cc);`. In older versions of Matlab, eig only has two output arguments and hence this causes an error. To calculate `W`, the left eigenvectors of cc, the documentatio...On line 197 of `matlab/identification_analysis.m`, we have `[V,D,W]=eig(cc);`. In older versions of Matlab, eig only has two output arguments and hence this causes an error. To calculate `W`, the left eigenvectors of cc, the documentation recommends `[W,junk] = eig(cc.'); W = conj(W)` separately.
4.5Marco RattoMarco Rattohttps://git.dynare.org/Dynare/dynare/-/issues/1264Block exogenous variables from being used in planner_objective2019-06-19T15:37:49ZJohannes PfeiferBlock exogenous variables from being used in planner_objectiveCurrently, exogenous variables in the `planner_objective` are simply ignored in the preprocessor. When using
```
var pai, c, n, r, a;
varexo u;
parameters beta, rho, epsilon, omega, phi, gamma;
beta=0.99;
gamma=3; //Frisch elast...Currently, exogenous variables in the `planner_objective` are simply ignored in the preprocessor. When using
```
var pai, c, n, r, a;
varexo u;
parameters beta, rho, epsilon, omega, phi, gamma;
beta=0.99;
gamma=3; //Frisch elasticity
omega=17; //price stickyness
epsilon=8; //elasticity for each variety of consumption
phi=1; //coefficient associated to labor effort disutility
rho=0.95; //coefficient associated to productivity shock
model;
a=rho*(a(-1))+u;
1/c=beta*(1/(c(+1)))*(r/(pai(+1))); //euler
omega*pai*(pai-1)=beta*omega*(c/(c(+1)))*(pai(+1))*(pai(+1)-1)+epsilon*exp(a)*n*(c/exp(a)*phi*n^gamma-(epsilon-1)/epsilon); //NK pc
//pai*(pai-1)/c = beta*pai(+1)*(pai(+1)-1)/c(+1)+epsilon*phi*n^(gamma+1)/omega-exp(a)*n*(epsilon-1)/(omega*c); //NK pc
(exp(a))*n=c+(omega/2)*((pai-1)^2);
end;
initval;
pai=1;
r=1/beta;
c=0.9671684882;
n=0.9671684882;
a=0;
u=0;
end;
histval;
a(0)=0.9;
end;
shocks;
var u; stderr 0.008;
end;
planner_objective(ln(c)-phi*((n^(1+gamma))/(1+gamma))*exp(u));
ramsey_policy(order=1,planner_discount=0.99);
```
the `exp(u)` does not appear in `_model_objective_static`. This is problematic, because in principle shocks at time t are part of the information set and should enter the objective. For that reason, @MichelJuillard agreed that we should block using exogenous variables in the objective and instead provide an error message like
`You cannot handle exogenous variables in the planner objective. Please define an auxiliary endogenous variable like eps_aux=epsilon and use it instead of the varexo`
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1219Tabular output of variance decomposition after Bayesian MH estimation2019-06-19T15:37:49ZStéphane Adjemianstepan@adjemian.euTabular output of variance decomposition after Bayesian MH estimation*Created by: BenjaminBorn*
Dear all,
Johannes asked me to open this as an issue. Would it be possible to provide the output from the conditional variance decomposition after Bayesian estimation in tabular form?
Thanks,
Benjamin
*Created by: BenjaminBorn*
Dear all,
Johannes asked me to open this as an issue. Would it be possible to provide the output from the conditional variance decomposition after Bayesian estimation in tabular form?
Thanks,
Benjamin
4.5https://git.dynare.org/Dynare/dynare/-/issues/1259normcdf is not supported using MSVC for use_dll2019-06-19T15:37:49ZTom Holdennormcdf is not supported using MSVC for use_dllnormcdf has a one line implementation using standard library functions (included in MSVC), namely:
```
double normcdf(double value)
{
return 0.5 * erfc(-value * M_SQRT1_2);
}
```
It seems a little unnecessary for this not to be supp...normcdf has a one line implementation using standard library functions (included in MSVC), namely:
```
double normcdf(double value)
{
return 0.5 * erfc(-value * M_SQRT1_2);
}
```
It seems a little unnecessary for this not to be supported with MSVC.
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1249Add preprocessor interface for setting perfect foresight tolerance2019-06-19T15:37:49ZJohannes PfeiferAdd preprocessor interface for setting perfect foresight toleranceCurrently, one must manually set `options_.dynatol.f`. I would suggest to use the name `TolFun` for the option.
While we are at it, I would also suggest to use an option `TolFun` for the `steady` command to set `options_.solve_tolf`
Currently, one must manually set `options_.dynatol.f`. I would suggest to use the name `TolFun` for the option.
While we are at it, I would also suggest to use an option `TolFun` for the `steady` command to set `options_.solve_tolf`
4.5Johannes PfeiferJohannes Pfeiferhttps://git.dynare.org/Dynare/dynare/-/issues/1237Investigate identification problem2019-06-19T15:37:49ZJohannes PfeiferInvestigate identification problemhttp://www.dynare.org/phpBB3/viewtopic.php?f=1&t=8234
Sent email with mod-file to @rattoma on June 1, 2016
http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=8234
Sent email with mod-file to @rattoma on June 1, 2016
4.5Marco RattoMarco Rattohttps://git.dynare.org/Dynare/dynare/-/issues/1232Remove onlyclearglobals option2019-06-19T15:37:49ZJohannes PfeiferRemove onlyclearglobals optionIt was introduced in master, but is now redundant with the `clear all` command being removed due to Matlab's JIT
It was introduced in master, but is now redundant with the `clear all` command being removed due to Matlab's JIT
4.5Johannes PfeiferJohannes Pfeiferhttps://git.dynare.org/Dynare/dynare/-/issues/1227Solve use_dll-incompatibility problem on Windows in master2019-06-19T15:37:49ZJohannes PfeiferSolve use_dll-incompatibility problem on Windows in masterAfter merging the `temporary_terms`-branch (https://github.com/DynareTeam/dynare/commit/127637ffd672fdd8143ee13f2a38234e597d94d3) the `c`-files created are not `C89`-compatible, but require `C99`. This is a problem for Windows machines a...After merging the `temporary_terms`-branch (https://github.com/DynareTeam/dynare/commit/127637ffd672fdd8143ee13f2a38234e597d94d3) the `c`-files created are not `C89`-compatible, but require `C99`. This is a problem for Windows machines as Visual Studio before version 2015 only supported `C89`, resulting in errors of the form
`error C2143: syntax error : missing ';' before 'type'`
Before Matlab version `R2014b` users could use the `cygwin`-option by using the provided `mexopts-win64.bat` from http://www.dynare.org/DynareWiki/ConfigureMatlabWindowsForMexCompilation, which should not have this restriction. Since `R2015b`, `mingw` is available, which also supports `C99` (#1226). Moreover, Visual Studio 2015 finally supports `C99` and has a free available version that is supported since `R2015b`. That leaves 64bit Matlab-versions between `R2014a` and `R2015a` unable to deal with the problem unless someone figures out how to solve #641 for `cygwin` (potentially following the advice on how to set up the `xml`-file at http://stackoverflow.com/questions/8552580/using-gcc-mingw-as-matlabs-mex-compiler). Given that there seems to be not that much demand for `use_dll` on Windows, I would propose for 4.5 to focus on the `mingw`-support and state the above restrictions clearly in the release notes and the manual
4.5https://git.dynare.org/Dynare/dynare/-/issues/1226Support mingw-compiler on Windows2019-06-19T15:37:49ZJohannes PfeiferSupport mingw-compiler on WindowsSince Matlab2014a, the `mexopts.bat` cannot be used anymore to set the mex-compiler to `cygwin`, rendering it pretty much useless for most recent versions. However, Mathworks now has a MinGW-addon (http://de.mathworks.com/help/matlab/mat...Since Matlab2014a, the `mexopts.bat` cannot be used anymore to set the mex-compiler to `cygwin`, rendering it pretty much useless for most recent versions. However, Mathworks now has a MinGW-addon (http://de.mathworks.com/help/matlab/matlab_external/install-mingw-support-package.html) that we should support.
For this, we need to
1. Allow for a `mingw` command line flag
2. Adjust `dyn_mex` with the respective case distinction and necessary flags
3. Update http://www.dynare.org/DynareWiki/ConfigureMatlabWindowsForMexCompilation
4.5Johannes PfeiferHoutan BastaniJohannes Pfeiferhttps://git.dynare.org/Dynare/dynare/-/issues/1215qz_criterium in estimation2019-06-19T15:37:49ZMarco Rattoqz_criterium in estimationI think it would be useful to allow option `qz_criterium` also in estimation, similarly to simulation. Would it be possible? Is there any strong reason for not allowing this?
I think it would be useful to allow option `qz_criterium` also in estimation, similarly to simulation. Would it be possible? Is there any strong reason for not allowing this?
4.5https://git.dynare.org/Dynare/dynare/-/issues/1209rework recent static model preprocessor changes2019-06-19T15:37:49ZHoutan Bastanirework recent static model preprocessor changesThe changes to the preprocessor made in 6e514b7d1bfc4b76fbc483da1da0ae7416de7cda have been made in the `computingPass` when they should have been made in the `transformPass`. Move these changes from `StaticModel::computingPass` to `Dynam...The changes to the preprocessor made in 6e514b7d1bfc4b76fbc483da1da0ae7416de7cda have been made in the `computingPass` when they should have been made in the `transformPass`. Move these changes from `StaticModel::computingPass` to `DynamicModel::toStatic`
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1211Check newrat-implementation and potentially port Michel's changes2019-06-19T15:37:49ZJohannes PfeiferCheck newrat-implementation and potentially port Michel's changesDuring his first try of removing `objective_function_penalty_base` @MichelJuillard made various changes to `newrat` that were reverted, but potentially still need to be ported to `master`. But I am not entirely sure what these commits do...During his first try of removing `objective_function_penalty_base` @MichelJuillard made various changes to `newrat` that were reverted, but potentially still need to be ported to `master`. But I am not entirely sure what these commits do. @rattoma Could you maybe have a look.
1. In the reverted commits https://github.com/DynareTeam/dynare/commit/fe077fc7103658aab7becba95167aa9d240b07f1 and https://github.com/DynareTeam/dynare/commit/f48a026d89828e9e322333263f56b733a719eb34 the initialization of `mr_hessian` was removed.
2. In https://github.com/DynareTeam/dynare/commit/5ade8d7c6fc71cc4ee4ffbb27dad2ed6b4cf8ccd the `newratflag`was passed to the optimizer, but this was reverted in https://github.com/DynareTeam/dynare/commit/d4cf3576e468202df9d1582a045dfcfd74e2e7db . What is the correct setting here?
3. In https://github.com/DynareTeam/dynare/commit/5ade8d7c6fc71cc4ee4ffbb27dad2ed6b4cf8ccd the part
```
if analytic_derivation,
hhx=hh;
else
hhx = reshape(dum,nx,nx);
end
```
was replaced by
`hhx=hh;`
But when I tried this, the program crashed in tests.
4.5https://git.dynare.org/Dynare/dynare/-/issues/1203In the latest unstable, sparse_hessian_times_B_kronecker_C.mexw64 has a depen...2019-06-19T15:37:50ZTom HoldenIn the latest unstable, sparse_hessian_times_B_kronecker_C.mexw64 has a dependency on libgomp-1.dllI was getting errors about missing dependencies. Running Dependency Walker on it revealed libgomp-1.dll as the problem. Copying this across from MinGW fixed the issue.
I was getting errors about missing dependencies. Running Dependency Walker on it revealed libgomp-1.dll as the problem. Copying this across from MinGW fixed the issue.
4.5