Skip to content
This repository has been archived by the owner. It is now read-only.

Investigate crash in bytecode due to incompatible dimensions of jacobia_ #841

Closed
JohannesPfeifer opened this issue Jan 22, 2015 · 7 comments

Comments

Projects
None yet
5 participants
@JohannesPfeifer
Copy link
Contributor

commented Jan 22, 2015

See Email from 22.01.2015
The problem is due to some exogenous (e7, e8) being declared but not used in the model. Removing them solves the issue.

@houtanb houtanb added this to the 4.5 milestone Feb 11, 2015

@houtanb

This comment has been minimized.

Copy link
Member

commented Feb 11, 2015

The email, from Johannes

Hi Ferhat,

could you please have a look at the attached mod-file. It crashes with bytecode because the jacobia_ returned only has 92 columns while without bytecode it has 94. The problem is present in both master and 4.4.3

Best,
Johannes

@houtanb

This comment has been minimized.

Copy link
Member

commented Nov 24, 2015

@MichelJuillard this is waiting on your check of PR #1046

@houtanb

This comment has been minimized.

Copy link
Member

commented Jan 6, 2017

I ran the test suite on this branch and the following three tests failed:

  • estimation/fs2000_initialize_from_calib.mod
  • deterministic_simulations/multiple_lead_lags/AR2.mod
  • deterministic_simulations/multiple_lead_lags/AR2_forward.mod
    because they each had one exogenous variable that was declared and included in the shocks statement but was not referenced in the model block (e_f for the first test, x for the second two).

I ran the tests twice comparing the output with and without the extra exogenous variables and it is the same. This begs the question, why are there extra exogenous variables in these tests? Do they serve a purpose? In estimation/fs2000_initialize_from_calib.mod, @stepan-a removed e_f in d3ce3aa and @JohannesPfeifer reintroduced it in 3c5705d. The second two tests were introduced by @JohannesPfeifer.

The real question is, however, with this change, .mod files that worked with dynare will no longer work if they have at least one exogenous variable that is not used in the model block. I just want to make this clear before @MichelJuillard (eventually) merges this change.

@houtanb

This comment has been minimized.

Copy link
Member

commented Jan 9, 2017

In response to @MichelJuillard comment on #1046 (bringing the conversation here for posterity): I think this would align well with the nostrict option. We could say that, if nostrict is passed to dynare then any unused exogenous variables that are later referenced in a statement will pass, as is currently the case.

I also want to revisit the implementation I made on this branch. I will try to get to it this week but may not have the time before next week.

@houtanb

This comment has been minimized.

Copy link
Member

commented Jan 10, 2017

abc77c2 causes the preprocessor to stop with an error whenever an exogenous variable has been declared but not used in the model block. Passing the nostrict option to dynare reverts to the current behavior.

@houtanb

This comment has been minimized.

Copy link
Member

commented Jan 10, 2017

This passes the test suite save three cases:

  • moments/example1_var_decomp.mod
  • deterministic_simulations/multiple_lead_lags/sim_exo_lead_lag.mod
  • deterministic_simulations/multiple_lead_lags/sim_lead_lag.mod
    The first test fails because of junk and the last two tests fail because z_shock is declared but unused in the rest of the .mod file.
    @JohannesPfeifer do these extra variables serve any purpose?
@houtanb

This comment has been minimized.

Copy link
Member

commented Jan 18, 2017

I have looked at the changes I made previously and simplified them. @MichelJuillard the logic is, if there is at least one extra exogenous variable:

  1. The preprocessor stops with an error when the nostrict option has been passed
  2. The preprocessor continues the way it currently does if the nostrict option is passed.

To clarify, not yet to added is code that would remove the extra exogenous variables from the list of variables when nostrict is passed and said extra exogenous variables are not used in any statements.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.