Sébastien Villemot
d584317a6a
Bytecode: remove unused methods
2023-10-10 16:54:09 -04:00
Sébastien Villemot
5e7b7ec7b0
Bytecode MEX: remove support for unused “plan” and “pfplan” arguments
2023-10-10 14:49:15 -04:00
Sébastien Villemot
82a2aeaae4
Block trust region MEX: gracefully handle the singular Jacobian case
...
When the Jacobian of the problem is singular, compute a solution to the least
squares problem instead of crashing.
Closes #1889
2023-09-26 15:30:33 +02:00
Sébastien Villemot
bf9434f95f
Remove warnings about cast between incompatible function types (-Wcast-function-type) under Windows
2023-09-22 14:22:47 +02:00
Sébastien Villemot
f4bcecc0d2
Add note about static_assert being a keyword in C23
2023-09-22 13:36:01 +02:00
Sébastien Villemot
4f1e5e1bc2
MS-SBVAR MEX: fixes related to C linkage (extern "C")
...
Also fix or remove various #ifdefs, and remove unused “int constant_seed”.
2023-09-22 13:31:44 +02:00
Sébastien Villemot
4a68cfcbd6
MS-SBVAR MEX: remove warning related to function not returning (-Wreturn-type)
2023-09-22 13:22:35 +02:00
Sébastien Villemot
a54b29a384
Remove warnings about uninitialized stuff (-Wuninitialized)
...
I have no idea why moving these statements around removes the warnings (at
least under GCC 13). Probably an issue internal to GCC.
2023-09-20 17:38:58 +02:00
Sébastien Villemot
70866c7b70
Remove warnings about comparison of integer expressions of different signedness (-Wsign-compare)
2023-09-20 16:48:29 +02:00
Sébastien Villemot
f23dd8c981
Remove warnings about impure functions that might not be evaluated (-Wfunction-elimination)
...
Mark various MATLAB/MEX primitives as pure.
2023-09-20 16:46:10 +02:00
Sébastien Villemot
e0bc9f29a1
Remove warnings about unused parameters (-Wunused-parameter)
2023-09-20 16:30:02 +02:00
Sébastien Villemot
6dd55726e6
Drop autoconf/automake build system
2023-09-20 15:33:44 +02:00
Sébastien Villemot
8c5d6f5eae
libkordersim: ensure strict Fortran standard compliance
...
The “order” variable was used before being typed. This is apparently accepted
by the GNU Fortran dialect.
2023-09-16 14:25:41 +02:00
Sébastien Villemot
9e7e069aa8
Fortran: use standard-compliant ieee_is_nan() instead of GNU extension isnan()
2023-09-16 14:25:40 +02:00
Sébastien Villemot
bd9943a695
Bytecode: fix memory leak in Evaluate class
...
The newly-created FBEGINBLOCK_ and FCALL_ instances were freed using a
base-class pointer. But the latter does not have a virtual destructor.
Those class instances are now stored by value in containers, so that the
destructor of the derived class is used.
2023-09-01 14:52:57 +02:00
Sébastien Villemot
b4f260aa01
folded_to_unfolded_dr MEX: remove unused variable
2023-07-27 17:29:32 +02:00
Sébastien Villemot
b1db895dee
block_trust_region MEX: remove unused parameter
2023-07-27 17:29:31 +02:00
Sébastien Villemot
0442fe785e
libkordersim: only BLAS is used, not LAPACK
2023-07-27 09:44:34 +02:00
Sébastien Villemot
9ff1d8556c
libkorder: remove mention of Dynare++ in the journal
...
By the way, use PACKAGE_VERSION macro (instead of VERSION), for consistency
with the preprocessor.
2023-07-26 16:30:51 +02:00
Normann Rion
710589eb5b
Adds pruning in k_order_simul
...
See issue #1643 about beyond-third-order pruning
2023-07-20 06:58:35 +01:00
Sébastien Villemot
5b8b63924d
Remove unneeded braces
2023-07-19 18:03:18 +02:00
Sébastien Villemot
661e5c7e9f
C++17 modernization: initialization in “if”-statement
2023-07-19 18:03:03 +02:00
Normann Rion
23dbb2b4b9
Fixes local_state_space_iteration_3 and adds a test comparing the various pruning routines used in dynare up to order 3.
...
The considered pruning routines can be found in
- `simult_.m`
- `local_state_space_iteration_2` MEX
- `local_state_space_iteration_3` MEX
- `pruned_state_space_system.m`
2023-07-04 19:15:43 +02:00
Sébastien Villemot
8b945dfd64
libkorder: use infinity instead of large constant in minimization algorith
...
By the way, also use C++17 initialization within “if” statement.
2023-07-04 11:20:51 +02:00
Sébastien Villemot
d6ea315a18
Bytecode: further improve some informative messages
2023-06-15 15:37:45 +02:00
Sébastien Villemot
192f136b96
Bytecode: improve some informative messages
2023-06-13 16:59:08 +02:00
Sébastien Villemot
277c5d4c4f
Bytecode: display real iteration time instead of CPU time
2023-06-13 16:59:08 +02:00
Sébastien Villemot
7c9e261355
Bytecode: fix treatment of maxit option
...
It would do one extra iteration.
2023-06-13 16:59:08 +02:00
Sébastien Villemot
dcf56b89cd
Bytecode: rework message verbosity
...
Now uses options_.verbosity to decide what to print:
– if options_.verbosity == 0, prints nothing
– if options_.verbosity >= 1, prints iteration counter and duration, and fatal errors
– if options_.verbosity >= 2, additionally print floating point exceptions and
details about algorithmic decisions
2023-06-13 16:59:07 +02:00
Sébastien Villemot
73b1850cb5
Bytecode: remove unused function
2023-06-13 16:58:06 +02:00
Sébastien Villemot
08d378c244
Bytecode: in evaluate+dynamic mode, return residuals with as many columns as periods
...
Previously it would also include initial and terminal conditions (i.e.
residuals would have periods+maximum_lag+maximum_lead columns). But we do not
care about residuals at the initial and terminal conditions.
This change is for consistency with the perfect_foresight_problem MEX.
2023-06-12 19:18:44 +02:00
Sébastien Villemot
90d790f1c3
Bytecode: fix error message
2023-06-12 19:18:44 +02:00
Sébastien Villemot
d814a4090b
Bytecode: improve display of residuals error during iterations
2023-06-12 15:12:00 +02:00
Sébastien Villemot
4210618dba
🐛 perfect_foresight_problem MEX: check over size of M_.dynamic_g1_sparse_colptr size was incorrect
2023-06-06 16:57:48 +02:00
Sébastien Villemot
e86aeaf787
C++20 modernization: use new standard mathematical constants
2023-05-25 19:07:23 +02:00
Sébastien Villemot
0f7ab97e69
🐛 local_state_space_iteration_3: real64 kind suffixes were missing for floating-point constants
...
Without the suffix, those constants were interpreted as
real32 (single-precision), hence leading to a loss of precision.
2023-05-24 21:18:23 +02:00
Sébastien Villemot
1b02026d1c
Fix GCC 13 warning about overloading that hides virtual methods of base class
2023-05-09 21:36:43 +02:00
Sébastien Villemot
aeff2bf48d
Fix GCC 13 warning about ambiguity of operator==() in C++20
...
In C++20, a==b can also be implicitly rewritten as b==a, assuming
commutativity. But if the operator==(const &) is not declared as const, and is
thus asymmetric, this results in an ambiguity because neither of a==b or b==a
is a better match according to the overload resolution rules.
2023-05-09 21:36:41 +02:00
Sébastien Villemot
030316f2d8
Bytecode: misc simplifications
2023-04-18 22:25:58 +02:00
Sébastien Villemot
afe147d88d
Bytecode: the class dynSparseMatrix is no longer derived from Evaluate
2023-04-18 18:10:45 +02:00
Sébastien Villemot
e22972849b
Bytecode: make Evaluate::{symbol_table, steady_state} private and const
2023-04-18 17:46:48 +02:00
Sébastien Villemot
4313640f80
Bytecode: allow better compiler optimization of the main evaluation function
...
Use the __restrict__ GCC extension on double* pointers, to avoid aliasing.
NB: the C “restrict” keyword does not exist in C++.
2023-04-18 17:45:15 +02:00
Sébastien Villemot
d71db85c71
Bytecode: move more cached information about current block out of the Evaluate class
2023-04-18 17:44:55 +02:00
Sébastien Villemot
36e8062e25
Bytecode: remove Evaluate::{EQN_block,EQN_block_number}
2023-04-18 17:37:35 +02:00
Sébastien Villemot
d789e6a4c5
Bytecode: move storage for variable and parameter values out of the Evaluate class
2023-04-18 17:37:33 +02:00
Sébastien Villemot
d0864689d2
Bytecode: minor simplification related to Evaluate::steady_state
2023-04-18 14:23:26 +02:00
Sébastien Villemot
73e4ced39a
Remove more unused Dynare++ code
...
In particular, the libkorder library no longer depends on MatIO.
2023-04-17 18:10:36 +02:00
Sébastien Villemot
99cd06c9fd
Move relevant Dynare++ files to mex/sources/libkorder/. Delete the others.
...
Also move some useful documentation to doc/.
2023-04-17 18:10:35 +02:00
Sébastien Villemot
36db88c56c
qmc_sequence MEX: use the Fortran version of John Burkardt’s code (instead of C++)
...
Incidentally, this greatly diminishes the compilation time of the MEX.
2023-04-15 16:19:35 +02:00
Sébastien Villemot
85351d751c
🐛 qmc_sequence MEX: large input seeds would be truncated
...
The int64 input seed was converted to a double before being converted back to
an int64. But large integers cannot be represented exactly in a double.
2023-04-15 15:48:55 +02:00