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
Willi Mutschler
preprocessor
Commits
78874a01
Unverified
Commit
78874a01
authored
Jan 06, 2021
by
Sébastien Villemot
Browse files
No longer deal with the log file at the preprocessor level
Ref. dynare#1743
parent
7f77c4df
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/DynareMain.cc
View file @
78874a01
/*
* Copyright © 2003-202
0
Dynare Team
* Copyright © 2003-202
1
Dynare Team
*
* This file is part of Dynare.
*
...
...
@@ -52,6 +52,9 @@ macroExpandModFile(const string &filename, const string &basename, const istream
void
usage
()
{
/* "nolog" is in the following output, even though it is not parsed by the
preprocessor but by dynare.m, so that users get the right list of options
if they call the preprocessor from MATLAB/Octave. */
cerr
<<
"Dynare usage: dynare mod_file [debug] [noclearall] [onlyclearglobals] [savemacro[=macro_file]] [onlymacro] [linemacro] [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] [stochastic] [fast] [minimal_workspace] [compute_xrefs] [output=dynamic|first|second|third] [language=matlab|julia]"
...
...
@@ -132,7 +135,6 @@ main(int argc, char **argv)
bool
no_tmp_terms
=
false
;
bool
only_macro
=
false
;
bool
line_macro
=
false
;
bool
no_log
=
false
;
bool
no_warn
=
false
;
int
params_derivs_order
=
2
;
bool
warn_uninit
=
false
;
...
...
@@ -210,8 +212,6 @@ main(int argc, char **argv)
line_macro
=
true
;
else
if
(
s
==
"notmpterms"
)
no_tmp_terms
=
true
;
else
if
(
s
==
"nolog"
)
no_log
=
true
;
else
if
(
s
==
"nowarn"
)
no_warn
=
true
;
else
if
(
s
==
"warn_uninit"
)
...
...
@@ -497,7 +497,7 @@ main(int argc, char **argv)
if
(
output_mode
!=
FileOutputType
::
none
)
mod_file
->
writeExternalFiles
(
basename
,
language
);
else
mod_file
->
writeOutputFiles
(
basename
,
clear_all
,
clear_global
,
no_log
,
no_warn
,
console
,
nograph
,
mod_file
->
writeOutputFiles
(
basename
,
clear_all
,
clear_global
,
no_warn
,
console
,
nograph
,
nointeractive
,
config_file
,
check_model_changes
,
minimal_workspace
,
compute_xrefs
,
mexext
,
matlabroot
,
dynareroot
,
onlymodel
,
gui
,
notime
);
...
...
src/ModFile.cc
View file @
78874a01
/*
* Copyright © 2006-202
0
Dynare Team
* Copyright © 2006-202
1
Dynare Team
*
* This file is part of Dynare.
*
...
...
@@ -839,7 +839,7 @@ ModFile::computingPass(bool no_tmp_terms, FileOutputType output, int params_deri
}
void
ModFile
::
writeOutputFiles
(
const
string
&
basename
,
bool
clear_all
,
bool
clear_global
,
bool
no_log
,
bool
no_warn
,
ModFile
::
writeOutputFiles
(
const
string
&
basename
,
bool
clear_all
,
bool
clear_global
,
bool
no_warn
,
bool
console
,
bool
nograph
,
bool
nointeractive
,
const
ConfigFile
&
config_file
,
bool
check_model_changes
,
bool
minimal_workspace
,
bool
compute_xrefs
,
const
string
&
mexext
,
...
...
@@ -928,10 +928,7 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool clear_glo
<<
"%"
<<
endl
;
if
(
!
onlymodel
)
config_file
.
writeHooks
(
mOutputFile
);
mOutputFile
<<
"global_initialization;"
<<
endl
<<
"diary off;"
<<
endl
;
if
(
!
no_log
)
mOutputFile
<<
"diary('"
<<
basename
<<
".log');"
<<
endl
;
mOutputFile
<<
"global_initialization;"
<<
endl
;
if
(
minimal_workspace
)
mOutputFile
<<
"options_.minimal_workspace = true;"
<<
endl
;
...
...
@@ -1120,9 +1117,6 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool clear_glo
}
}
if
(
!
no_log
)
mOutputFile
<<
"diary off"
<<
endl
;
mOutputFile
.
close
();
if
(
hasModelChanged
)
...
...
src/ModFile.hh
View file @
78874a01
/*
* Copyright © 2006-202
0
Dynare Team
* Copyright © 2006-202
1
Dynare Team
*
* This file is part of Dynare.
*
...
...
@@ -165,7 +165,7 @@ public:
\param mingw Should the MEX command of use_dll be adapted for MinGW?
\param compute_xrefs if true, equation cross references will be computed
*/
void
writeOutputFiles
(
const
string
&
basename
,
bool
clear_all
,
bool
clear_global
,
bool
no_log
,
bool
no_warn
,
void
writeOutputFiles
(
const
string
&
basename
,
bool
clear_all
,
bool
clear_global
,
bool
no_warn
,
bool
console
,
bool
nograph
,
bool
nointeractive
,
const
ConfigFile
&
config_file
,
bool
check_model_changes
,
bool
minimal_workspace
,
bool
compute_xrefs
,
const
string
&
mexext
,
const
filesystem
::
path
&
matlabroot
,
...
...
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