Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
ae76a8f8
Commit
ae76a8f8
authored
Jun 22, 2011
by
Sébastien Villemot
Browse files
Preprocessor: fix crash when no computational task is required
parent
1317e04c
Changes
3
Hide whitespace changes
Inline
Side-by-side
preprocessor/DynamicModel.cc
View file @
ae76a8f8
...
...
@@ -2683,6 +2683,8 @@ DynamicModel::computingPass(bool jacobianExo, bool hessian, bool thirdDerivative
{
assert(jacobianExo || !(hessian || thirdDerivatives || paramsDerivatives));
initializeVariablesAndEquations();
// Prepare for derivation
computeDerivIDs();
...
...
preprocessor/ModFile.cc
View file @
ae76a8f8
...
...
@@ -358,7 +358,6 @@ ModFile::computingPass(bool no_tmp_terms)
dynamic_model
.
toStatic
(
static_model
);
if
(
!
no_static
)
{
static_model
.
initializeVariablesAndEquations
();
if
(
mod_file_struct
.
stoch_simul_present
||
mod_file_struct
.
estimation_present
||
mod_file_struct
.
osr_present
||
mod_file_struct
.
ramsey_policy_present
||
mod_file_struct
.
identification_present
)
...
...
@@ -371,7 +370,6 @@ ModFile::computingPass(bool no_tmp_terms)
||
mod_file_struct
.
estimation_present
||
mod_file_struct
.
osr_present
||
mod_file_struct
.
ramsey_policy_present
||
mod_file_struct
.
identification_present
)
{
dynamic_model
.
initializeVariablesAndEquations
();
if
(
mod_file_struct
.
simul_present
)
dynamic_model
.
computingPass
(
true
,
false
,
false
,
false
,
global_eval_context
,
no_tmp_terms
,
block
,
use_dll
,
byte_code
);
else
...
...
preprocessor/StaticModel.cc
View file @
ae76a8f8
...
...
@@ -1065,6 +1065,8 @@ StaticModel::collect_first_order_derivatives_endogenous()
void
StaticModel
::
computingPass
(
const
eval_context_t
&
eval_context
,
bool
no_tmp_terms
,
bool
hessian
,
bool
block
,
bool
bytecode
)
{
initializeVariablesAndEquations
();
// Compute derivatives w.r. to all endogenous, and possibly exogenous and exogenous deterministic
set
<
int
>
vars
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment