Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
preprocessor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dynare
preprocessor
Commits
c3dcc0e1
Commit
c3dcc0e1
authored
May 12, 2016
by
Houtan Bastani
Browse files
Options
Downloads
Patches
Plain Diff
preprocessor: add option no_2nd_order_params_derivs. #1187
parent
0b922739
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
DynareMain.cc
+6
-2
6 additions, 2 deletions
DynareMain.cc
DynareMain2.cc
+2
-2
2 additions, 2 deletions
DynareMain2.cc
ModFile.cc
+7
-7
7 additions, 7 deletions
ModFile.cc
ModFile.hh
+2
-1
2 additions, 1 deletion
ModFile.hh
with
17 additions
and
12 deletions
DynareMain.cc
+
6
−
2
View file @
c3dcc0e1
...
...
@@ -41,7 +41,7 @@ void main2(stringstream &in, string &basename, bool debug, bool clear_all, bool
bool
nograph
,
bool
nointeractive
,
bool
parallel
,
ConfigFile
&
config_file
,
WarningConsolidation
&
warnings_arg
,
bool
nostrict
,
bool
check_model_changes
,
bool
minimal_workspace
,
bool
compute_xrefs
,
FileOutputType
output_mode
,
LanguageOutputType
lang
LanguageOutputType
lang
,
bool
sec_order_param_deriv
#if defined(_WIN32) || defined(__CYGWIN32__)
,
bool
cygwin
,
bool
msvc
#endif
...
...
@@ -57,6 +57,7 @@ usage()
cerr
<<
"Dynare usage: dynare mod_file [debug] [noclearall] [onlyclearglobals] [savemacro[=macro_file]] [onlymacro] [nolinemacro] [notmpterms] [nolog] [warn_uninit]"
<<
" [console] [nograph] [nointeractive] [parallel[=cluster_name]] [conffile=parallel_config_path_and_filename] [parallel_slave_open_mode] [parallel_test]"
<<
" [-D<variable>[=<value>]] [-I/path] [nostrict] [fast] [minimal_workspace] [compute_xrefs] [output=dynamic|first|second|third] [language=C|C++|julia]"
<<
" [no_2nd_order_params_derivs]"
#if defined(_WIN32) || defined(__CYGWIN32__)
<<
" [cygwin] [msvc]"
#endif
...
...
@@ -90,6 +91,7 @@ main(int argc, char **argv)
bool
no_line_macro
=
false
;
bool
no_log
=
false
;
bool
no_warn
=
false
;
bool
sec_order_param_deriv
=
true
;
bool
warn_uninit
=
false
;
bool
console
=
false
;
bool
nograph
=
false
;
...
...
@@ -119,6 +121,8 @@ main(int argc, char **argv)
debug
=
true
;
else
if
(
!
strcmp
(
argv
[
arg
],
"noclearall"
))
clear_all
=
false
;
else
if
(
!
strcmp
(
argv
[
arg
],
"no_2nd_order_params_derivs"
))
sec_order_param_deriv
=
false
;
else
if
(
!
strcmp
(
argv
[
arg
],
"onlyclearglobals"
))
{
clear_all
=
false
;
...
...
@@ -318,7 +322,7 @@ main(int argc, char **argv)
main2
(
macro_output
,
basename
,
debug
,
clear_all
,
clear_global
,
no_tmp_terms
,
no_log
,
no_warn
,
warn_uninit
,
console
,
nograph
,
nointeractive
,
parallel
,
config_file
,
warnings
,
nostrict
,
check_model_changes
,
minimal_workspace
,
compute_xrefs
,
output_mode
,
language
compute_xrefs
,
output_mode
,
language
,
sec_order_param_deriv
#if defined(_WIN32) || defined(__CYGWIN32__)
,
cygwin
,
msvc
#endif
...
...
This diff is collapsed.
Click to expand it.
DynareMain2.cc
+
2
−
2
View file @
c3dcc0e1
...
...
@@ -30,7 +30,7 @@ main2(stringstream &in, string &basename, bool debug, bool clear_all, bool clear
bool
nograph
,
bool
nointeractive
,
bool
parallel
,
ConfigFile
&
config_file
,
WarningConsolidation
&
warnings
,
bool
nostrict
,
bool
check_model_changes
,
bool
minimal_workspace
,
bool
compute_xrefs
,
FileOutputType
output_mode
,
LanguageOutputType
language
LanguageOutputType
language
,
bool
sec_order_param_deriv
#if defined(_WIN32) || defined(__CYGWIN32__)
,
bool
cygwin
,
bool
msvc
#endif
...
...
@@ -51,7 +51,7 @@ main2(stringstream &in, string &basename, bool debug, bool clear_all, bool clear
mod_file
->
evalAllExpressions
(
warn_uninit
);
// Do computations
mod_file
->
computingPass
(
no_tmp_terms
,
output_mode
,
compute_xrefs
);
mod_file
->
computingPass
(
no_tmp_terms
,
output_mode
,
compute_xrefs
,
sec_order_param_deriv
);
// Write outputs
if
(
output_mode
!=
none
)
...
...
This diff is collapsed.
Click to expand it.
ModFile.cc
+
7
−
7
View file @
c3dcc0e1
...
...
@@ -469,7 +469,7 @@ ModFile::transformPass(bool nostrict)
}
void
ModFile
::
computingPass
(
bool
no_tmp_terms
,
FileOutputType
output
,
bool
compute_xrefs
)
ModFile
::
computingPass
(
bool
no_tmp_terms
,
FileOutputType
output
,
bool
compute_xrefs
,
bool
sec_order_param_deriv
)
{
// Mod file may have no equation (for example in a standalone BVAR estimation)
if
(
dynamic_model
.
equation_number
()
>
0
)
...
...
@@ -490,10 +490,10 @@ ModFile::computingPass(bool no_tmp_terms, FileOutputType output, bool compute_xr
const
bool
static_hessian
=
mod_file_struct
.
identification_present
||
mod_file_struct
.
estimation_analytic_derivation
;
FileOutputType
paramsDerivatives
=
none
;
if
(
mod_file_struct
.
identification_present
)
paramsDerivatives
=
first
;
if
(
mod_file_struct
.
estimation_analytic_derivation
)
paramsDerivatives
=
third
;
if
(
mod_file_struct
.
identification_present
||
!
sec_order_param_deriv
)
paramsDerivatives
=
first
;
static_model
.
computingPass
(
global_eval_context
,
no_tmp_terms
,
static_hessian
,
false
,
paramsDerivatives
,
block
,
byte_code
);
}
...
...
@@ -527,10 +527,10 @@ ModFile::computingPass(bool no_tmp_terms, FileOutputType output, bool compute_xr
||
mod_file_struct
.
estimation_analytic_derivation
||
output
==
third
;
FileOutputType
paramsDerivatives
=
none
;
if
(
mod_file_struct
.
identification_present
)
paramsDerivatives
=
first
;
if
(
mod_file_struct
.
estimation_analytic_derivation
)
paramsDerivatives
=
third
;
if
(
mod_file_struct
.
identification_present
||
!
sec_order_param_deriv
)
paramsDerivatives
=
first
;
dynamic_model
.
computingPass
(
true
,
hessian
,
thirdDerivatives
,
paramsDerivatives
,
global_eval_context
,
no_tmp_terms
,
block
,
use_dll
,
byte_code
,
compute_xrefs
);
}
}
...
...
This diff is collapsed.
Click to expand it.
ModFile.hh
+
2
−
1
View file @
c3dcc0e1
...
...
@@ -132,7 +132,8 @@ public:
//! Execute computations
/*! \param no_tmp_terms if true, no temporary terms will be computed in the static and dynamic files */
/*! \param compute_xrefs if true, equation cross references will be computed */
void
computingPass
(
bool
no_tmp_terms
,
FileOutputType
output
,
bool
compute_xrefs
);
/*! \param sec_order_param_deriv if true, compute second order param derivatives*/
void
computingPass
(
bool
no_tmp_terms
,
FileOutputType
output
,
bool
compute_xrefs
,
bool
sec_order_param_deriv
);
//! Writes Matlab/Octave output files
/*!
\param basename The base name used for writing output files. Should be the name of the mod file without its extension
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment