Commit Graph

875 Commits (d43a057af3c7ad301afef3471358e88df2cb5bed)

Author SHA1 Message Date
Sébastien Villemot 47477e152a
Bump minimal Octave version to 6.2.0 2021-03-12 16:21:57 +01:00
Sébastien Villemot c0ccca26cb
macOS package: drop support for Octave
The current Octave support is utterly broken (both in stable and unstable), it
crashes Octave. It relies on an unofficial Octave app for
macOS (https://octave-app.org), which is infrequently updated.

This commits drop support for Octave in the macOS package. We will now tell our
macOS+octave users to use the Homebrew Dynare package (which is maintained by
the Homebrew team, and is in reasonably good shape).
2021-03-12 16:21:57 +01:00
Sébastien Villemot c9eb6920c9
local_state_space_iteration_k MEX: fix bug in output
In its output, the MEX was returning values for all endogenous variables, but
it was used in a context where only the variables from oo_.dr.restrict_var_list
were expected (as is done with local_state_space_iteration_2 MEX).

This commit fixes this discrepancy, and also fixes the test that was checking
that both MEX are returning the same output.

Closes: #1768
2021-03-10 13:45:29 +01:00
Sébastien Villemot 1a0ee5f055
Bytecode / sparse transpose: bug fix
The Jc vector has n+1 elements, where n is the number of columns. Moreover, the
size passed to memset() was wrong.
2021-02-09 16:05:11 +01:00
Sébastien Villemot c9f6d3a626
Bytecode: more simplifications and modernizations 2021-02-09 16:00:53 +01:00
Sébastien Villemot 4a1dbc5ca4
Bytecode: fix bug introduced in previous commit
map::at() does bound checking, and throws an exception if out-of-range,
contrary to [] operator which returns a new element.
2021-02-03 19:52:25 +01:00
Sébastien Villemot 4893f0e82c
Bytecode: various simplifications and modernizations 2021-02-03 18:10:31 +01:00
Sébastien Villemot 30cfb0b03c
Bytecode: bugfix in conditional forecast 2021-02-01 17:54:36 +01:00
Sébastien Villemot 967966876f
Bytecode: remove obsolete LINBCG stuff 2021-02-01 15:26:33 +01:00
Sébastien Villemot 743469bfd7
Bytecode: remove stuff for creating a standalone debugging executable
This code no longer compiles. And it’s possible to debug the MEX directly.
2021-02-01 15:26:33 +01:00
Sébastien Villemot bb5f58f55f
Bytecode: remove useless constant redefinition 2021-02-01 15:26:33 +01:00
Sébastien Villemot eb29dc003a
Bytecode: remove CUDA-specific stuff 2021-02-01 15:26:31 +01:00
Sébastien Villemot 5ef440ad9b
Bytecode: remove MSVC++ specific portions 2021-02-01 14:50:46 +01:00
Sébastien Villemot f9f50ff19a
Bytecode: port to C++11 using keyword
Performed using modernize-use-using from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-using.html
2021-02-01 14:50:46 +01:00
Sébastien Villemot 47357bb432
Bytecode: port to C++11 nullptr keyword
Performed using modernize-use-nullptr from clang-tidy.

Manual intervention to remove old-style C casts to nullptr.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2021-02-01 14:50:42 +01:00
Sébastien Villemot a2186b06b8
Bytecode: port to C++11 syntax for default constructors
Performed using modernize-use-equals-default from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-equals-default.html
2021-02-01 14:50:42 +01:00
Sébastien Villemot 1aa0286f6d
Bytecode: port to C++11 emplace_back() method on containers
Performed using modernize-use-emplace from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-emplace.html
2021-02-01 14:50:42 +01:00
Sébastien Villemot 93c6cb1c3c
Bytecode: use bool literals
Performed using modernize-use-bool-literals from clang-tidy

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html
2021-02-01 14:50:42 +01:00
Sébastien Villemot 1a4340cb80
Bytecode: port to C++11 auto keyword
Performed using modernize-use-auto from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-auto.html
2021-02-01 14:50:39 +01:00
Sébastien Villemot 63e922f637
Bytecode: port some constructors to pass-by-value using C++11 move semantics
Performed using modernize-pass-by-value from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-pass-by-value.html
2021-02-01 14:50:10 +01:00
Sébastien Villemot 7840d1396e
Bytecode: port to C++11 range-based for loops
Performed using modernize-loop-convert from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-loop-convert.html
2021-02-01 14:50:07 +01:00
Sébastien Villemot 2f587cf5c3
Bytecode: use C++ headers
Performed using modernize-deprecated-headers from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-deprecated-headers.html
2021-02-01 12:28:50 +01:00
Sébastien Villemot c050325e3d
Bytecode: C++17 modernization / convert the remaining enums to enum classes 2021-02-01 12:10:47 +01:00
Sébastien Villemot bc053018a0
Remove risky steady state (unfinished) code
Incidently, remove the possibility of passing model derivatives as arguments to
the k_order_perturbation. That possibility was only used by the risky steady
state code.

Closes: #1338
2021-01-22 11:32:36 +01:00
Stéphane Adjemian (Odysseus) 0e1c9312e2
Merge remote-tracking branch 'Dynare/master' into enterprise 2021-01-11 11:06:55 +01:00
Sébastien Villemot 93a8e60265
Build system: various macOS cleanups
– remove clang support
– we no longer support 32-bit
– simplify Darwin specific hacks for Octave MEX files
2020-12-18 15:40:48 +01:00
Sébastien Villemot e8d01abdca
Build system: remove obsolete comments 2020-12-18 15:40:48 +01:00
Sébastien Villemot 55e25bcb7f
perfect_foresight_problem MEX: check the return code of mexCallMATLAB() 2020-12-07 15:03:35 +01:00
Sébastien Villemot d06ae350c5
Build system: add --with-octave configure option to specify non-default install path
(cherry picked from commit bd97fdc1d5)
2020-12-02 18:52:36 +01:00
Sébastien Villemot bd97fdc1d5
Build system: add --with-octave configure option to specify non-default install path 2020-12-02 18:26:49 +01:00
Sébastien Villemot f104b9d517
Windows package: statically link MatIO and GSL in Octave MEX files
Closes: #1750
2020-11-18 15:31:06 +01:00
Sébastien Villemot a922505bbe
Another fix for Fedora, needed for building MEX for Octave 2020-11-13 10:05:40 +01:00
Sébastien Villemot 3a42c234fe
Fix build failures on Fedora
— FCFLAGS needs to contain the compilation flags used when compiling Octave,
  otherwise it fails at configure stage when looking for gfortran
— Explicitly add -L$OCTLIBDIR, because with Octave 5 it is no longer there, and
  on Fedora the Octave libraries are no in the default linker search path
2020-11-05 18:52:11 +01:00
Sébastien Villemot f7ee0b9441
Build system: add missing -fPIC flag for Fortran 2008 MEX files under Octave 2020-11-05 15:40:14 +01:00
Sébastien Villemot 4e16ffcda2
Fortran MEX interface: minor fix for interface to dgemv 2020-10-21 18:17:41 +02:00
Sébastien Villemot ce5aa33a33
k-order DLL: no longer write journal file on-disk, unless options_.debug = true
Closes: #1735
2020-10-15 17:19:30 +02:00
Stéphane Adjemian (Charybdis) e690c5de5a
Merge Enterprise/block_trust_region into enterprise. 2020-09-24 16:05:55 +02:00
Stéphane Adjemian (Charybdis) 17e6421ea3
Merged master into enterprise.
Fixed conflict in
 - doc/manual/source/running-dynare.rst
2020-09-23 15:28:19 +02:00
Sébastien Villemot 73253a0620
Bytecode + Block decomposition: fix crash with purely forward variables
After simulating a block containing purely forward variables (thus of type
“evaluate backward”), the it_ variable of the evaluator would be left in an
inconsistent state (typically 0, which means that taking the value of a lagged
variable would lead to an invalid read).

By the way, fix a symmetric problem for backward blocks (which could
potentially create a invalid read for purely backward models).

Ref. #1727
2020-09-22 16:45:44 +02:00
Sébastien Villemot 8803bc1479
Bytecode: minor improvement to debugging information 2020-09-22 16:42:33 +02:00
Sébastien Villemot 865ab47fa9
Provide block_trust_region MEX under solve_algo 13 and 14
- block trust region solver now available under solve_algo=13
  It is essentially the same as solve_algo=4, except that Jacobian by finite
  difference is not handled. A test file is added for that case
- block trust region solver with shortcut for equations that can be evaluated
  is now available under solve_algo=14 (in replacement of the pure-MATLAB solver)

Closes: Enterprise/dynare#3
2020-09-18 18:01:56 +02:00
Sébastien Villemot 7e21bf2a10
Block trust region MEX: use MATLAB’s dmperm for the Dulmage-Mendelsohn decomposition
It turns out that MATLAB’s implementation is significantly faster than my own
Fortran implementation.
2020-09-18 17:55:58 +02:00
Sébastien Villemot 35a162c6a6
Block trust region MEX: fix memory leak in MATLAB function closure 2020-09-18 17:55:58 +02:00
Sébastien Villemot adf1fdb009
Block trust region MEX: add safety check for squareness of blocks 2020-09-18 17:55:58 +02:00
Sébastien Villemot 9430b4e9ca
Block trust region MEX: add debugging information 2020-09-18 17:55:57 +02:00
Stéphane Adjemian (Odysseus) 248ad18846 Merge remote-tracking branch 'Dynare/master' into enterprise
Fixed conflicts in:

 - .gitlab-ci.yml
 - matlab/dynare_config.m
 - matlab/dynare_solve.m
 - matlab/initvalf.m
 - matlab/perfect-foresight-models/make_ex_.m
 - matlab/perfect-foresight-models/perfect_foresight_setup.m
 - mex/build/matlab/Makefile.am
 - mex/build/matlab/configure.ac
 - mex/build/octave/Makefile.am
 - mex/build/octave/configure.ac
 - mex/sources/Makefile.am
 - preprocessor
 - tests/Makefile.am
2020-09-17 14:53:32 +02:00
Sébastien Villemot f6c2471eef
New MEX for solving discrete Lyapunov equations with doubling algorithm
This is a Fortran 2008 rewrite of disclyap_fast.m.

Closes: #1737
2020-07-30 16:34:35 +02:00
Sébastien Villemot 3f53a94981
Add dpotrf to Fortran 2008 BLAS/LAPACK bindings 2020-07-30 16:34:35 +02:00
Sébastien Villemot ea18431230
Various improvements to mjdgges MEX 2020-07-30 16:34:33 +02:00
Sébastien Villemot f4a31a0d1f
Various improvements to Fortran 2008 interface to MATLAB MEX functions
— add interface for more functions (cell, logical, struct)
— add new mexPrintf wrapper that trims and prints a newline
— functions that take indices of type mwIndex now 1-based indices
— improve the wrapper for mxArrayToString so that it returns a character scalar
2020-07-30 14:45:50 +02:00