Commit Graph

46 Commits (74ef3457b4805099ee9885b34173a0d0fd6aca61)

Author SHA1 Message Date
Sébastien Villemot 74ef3457b4
Use secure URL for link to GNU licenses 2021-06-09 17:21:00 +02:00
Sébastien Villemot 337b6f469c
New parallel_use_psexec command-line option
Ref. dynare!1843
2021-05-06 16:25:46 +02:00
Sébastien Villemot 7765efe95b
Windows: fix detection of location of MinGW compiler 2021-04-30 15:03:53 +02:00
Sébastien Villemot 07391e0f9f
Remove unused kludge 2021-02-01 12:07:33 +01:00
Sébastien Villemot 8e03f17350
Cleanup the “output” option
— output Julia files as soon as “language=julia” is passed, independently of
  the value of the “output” option
— drop the “dynamic” and “first” values of the “output” option, since they
  actually do nothing
— obey the “output” option even in the deterministic case

Ref. dynare#1600
2021-01-08 18:51:48 +01:00
Sébastien Villemot cd443a6083
Revert to accepting the “nolog” option, but do nothing about it
This is necessary to avoid an “unknown option” error.

Ref. dynare#1743
2021-01-06 15:50:30 +01:00
Sébastien Villemot 78874a01d3
No longer deal with the log file at the preprocessor level
Ref. dynare#1743
2021-01-06 14:19:33 +01:00
Sébastien Villemot 91db87b1cf
Forbid some basenames, since they will cause trouble
Closes: preprocessor#62
2020-12-16 18:21:55 +01:00
Sébastien Villemot 7e1563fdbb
Allow 'use_dll' option to be specified on the command line
Ref. Enteprise/dynare#4
2020-09-18 15:00:00 +02:00
Stéphane Adjemian (Charybdis) 27a8b3b70e
Added preprocessor option: notime.
Do not print the total computing time at the end of the driver.
2020-04-03 11:00:48 +02:00
Houtan Bastani 2813ef2d18
remove unused header 2020-02-21 19:51:04 +01:00
Houtan Bastani 28b98c7c0e
Rework the function that handles the macro-expansion of the .mod file 2020-02-20 15:30:46 +01:00
Houtan Bastani ac4749edf9
add undocumented `gui` option to preprocessor 2020-02-12 12:32:40 +01:00
Houtan Bastani de6ca5cdcc
Combine `DynareMain.cc` and `DynareMain2.cc` 2020-02-05 16:27:40 +01:00
Houtan Bastani 1dbbd87d3d
Remove options `noemptylinemacro` and `nolinemacro`; add option `linemacro`
This only concerns the situation when `savemacro` is also passed.

When `linemacro` is passed, the macro expanded .mod file is the same as before

When `linemacro` is not passed, the macro expanded .mod file is equivalent to what it was before when both `noemptylinemacro` and `nolinemacro` were passed.

closes #44
closes #45
2020-02-05 15:19:01 +01:00
Sébastien Villemot 0f3f6a2332
Add comments and simplify code in function that parses the --+ options: … +-- line 2020-01-23 18:45:02 +01:00
Sébastien Villemot 031c0cff5f
Various code simplifications and modernizations 2019-12-16 19:42:59 +01:00
Houtan Bastani 0ff7a9d2ab
introduce command line options: `exclude_eqs` and `include_eqs`
Allows for the inclusion/exclusion of a set of equations, specified either on the command line or in a text file.

If the equation has a single endogenous variable on the LHS, then the equation is moved. If not, if the equation has an `endogenous` tag then that variable is removed along with this equation. If not, then an error is thrown.

As a command line argument, `exclude_eqs` can take the form (same syntax for `include_eqs`):
* `exclude_eqs=eq1 to remove all equations declared as `[name=eq1]`
* `exclude_eqs=[eq 1, eq 2]` to remove all equations declared as `[name=eq 1]` or `[name=eq 2]`
* `exclude_eqs=[tagname=X]` to remove all equations declared as `[tagname=X]`
* `exclude_eqs=[tagname=(X, Y)]` to remove all equations declared as `[tagname=X]` or `[tagname=Y]`

When declared in a file, the file should be of the form:
```
eq 1
eq 2
```
to remove all equations declared as `[name=eq 1]` or `[name=eq 2]`.

It should be of the form:
```
tagname=
X
Y
```
to remove all equations declared as `[tagname=X]` or `[tagname=Y]`.
2019-11-26 14:16:00 +01:00
Stéphane Adjemian (Charybdis) 14b6cb6bee Fixed logic for output language. 2019-10-07 09:28:49 +02:00
Houtan Bastani 2ce6e411b4
remove unused headers 2019-10-04 10:57:36 +02:00
Houtan Bastani 2f6f0d8cf6
use filesystem::path instead of string to hold include paths passed on the command line 2019-10-04 10:57:36 +02:00
Houtan Bastani 031bc62f3a
macro processor: use filesystem after move to C++17, closes #31
ancillary to this change is the move of `paths` out of the Driver class into an argument to parsing/evaluation #32
2019-10-03 14:24:47 +02:00
Sébastien Villemot 0c755460b1
Use std::filesystem instead of boost::filesystem
Note that there is no equivalent of boost::filesystem::unique_path(), so I
implemented ModFile::unique_path() which does something similar.
2019-09-11 14:47:48 +02:00
Sébastien Villemot 8cdbdee315
Various cleanups around the “language” option
— allow “language=matlab” for symmetry (this is the default)
— remove the useless “cuda” and “python” values
— give a more meaningful error message when “output” is used in conjunction
  with “language=matlab”
2019-08-22 17:43:34 +02:00
Sébastien Villemot 82cd95a653
Remove some unnecessary headers 2019-05-02 15:30:33 +02:00
Houtan Bastani 21fe0f4bdc
avoid cast warnings when compiling boost headers 2019-04-23 14:57:03 +02:00
Sébastien Villemot b73d554ad2
Use Unicode copyright symbol (in UTF-8 encoding) 2019-04-16 11:35:31 +02:00
Houtan Bastani c6467af814
Read options at top of .mod file as long as they exist on the first *non empty* line
In other words, allow newlines before these options
2019-04-10 14:49:33 +02:00
Houtan Bastani 2a9c4b234a
maintain order of macro variables defined on command line when writing them to the .mod file
Before this commit, a dynare call such as
```
dynare <<mod file>> -Db=“A” -Da=@{b}
```
would not expand the value of `b` in `a` whereas
```
dynare <<mod file>> -Da=“A” -Db=@{a}
```
would expand the value of `a` into `b` because the arguments were stored in a map which printed the `@#define` statements in the .mod file in alphabetic order.
2019-04-10 12:51:45 +02:00
Sébastien Villemot 8a41a75c85
Apply modernize-raw-string-literal from clang-tidy
Use ReplaceShorterLiterals option to enforce replacement of all strings.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-raw-string-literal.html
2019-04-03 16:45:52 +02:00
Houtan Bastani a3e7547857
fix bug when defining variable with value on the command line with -D option (problem introduced in ee5fc6b16b) 2019-01-16 11:51:14 +01:00
Sébastien Villemot e7c9c26d2d
More modernizations with clang-tidy 2019-01-15 11:08:47 +01:00
Sébastien Villemot 01385d1f80
Simplify implementation of nopreprocessoroutput option
Simply redirect cout to /dev/null, instead of propagating a boolean
everywhere.
2018-12-20 17:08:45 +01:00
Sébastien Villemot 5784dce1ca
Remove the possibility of passing the mod-file as a string in the first shell argument
This feature is ill-designed and no longer needed by the GUI. And is not very
useful: it is not possible to interact with the preprocessor without using the
filesystem, since the preprocessor creates many files anyways.

If we really need to reimplement such a feature, it should rather be redesigned
by reading the modfile from standard input (cin). That could be triggered by
using "-" as the filename argument (as is already done by several standard Unix
utilities).
2018-12-20 17:08:05 +01:00
Sébastien Villemot 1393bf1d7e
Parse the options list at the top of the mod-file
Ref Dynare/dynare#1630
2018-12-19 16:14:40 +01:00
Houtan Bastani 5f5fd569dd
add onlymodel command line option 2018-11-07 15:35:03 +01:00
Sébastien Villemot ee5fc6b16b
Simplify parsing of options using C++ strings 2018-10-31 11:17:26 +01:00
Sébastien Villemot b337a5aec0
Fix usage 2018-10-29 14:55:02 +01:00
Sébastien Villemot 4a974bb428
The preprocessor now compiles the MEX when use_dll is specified
New options "mexext" and "matlabroot" are introduced, so that the preprocessor
knows where to find MATLAB and which architecture to compile for.

Only recent gcc is now supported. A set of optimization flags is used so that
compilation goes reasonably fast on large models.

Consequently, options "msvc", "mingw" and "cygwin" have been removed.
2018-10-26 18:09:13 +02:00
Sébastien Villemot 5e6b8f0a6b No longer test for __MINGW32__ macro, testing for _WIN32 is enough
Closes: Dynare/dynare#1315
2018-10-02 16:50:07 +02:00
Sébastien Villemot 4a04a38374 C++11: convert ExtendedPreprocessorTypes to class enums 2018-07-18 17:28:26 +02:00
Sébastien Villemot 946d105c04 Remove C and C++ preprocessor output types
This code is broken since the temporary terms array changes. It is probably not
worth maintaining it.
2018-07-17 16:52:11 +02:00
Houtan Bastani 0aea4f0cc4 introduce dynare command transform_unary_ops to create auxiliary variables for certain unary ops. This will be used for VARs and VECMs but can also be used for OLS, for example 2018-05-30 16:48:08 +02:00
Houtan Bastani 78295bf6fc remove version from preprocessor output 2018-02-21 17:26:16 +01:00
Houtan Bastani 1db815e00b clarify package/version info 2018-02-16 17:23:48 +01:00
Houtan Bastani b504f160ca move files to src directory 2018-02-15 11:48:04 +01:00