Commit Graph

115 Commits (a8f5bdd52525ca21a996bd27fd81305a38a4367b)

Author SHA1 Message Date
Sébastien Villemot a8f5bdd525
Build system: no longer need to pass -pthread or -mthreads for C++11 threads as of GCC 10 2023-01-05 17:58:42 +01:00
NormannR a245fbb390 Implements a Fortran update of the states variance-covariance matrix for the Kalman filter 2022-11-14 16:24:46 +00:00
NormannR 855887b249 Implements a logarithmic reduction Fortran routine and the associated test 2022-10-11 12:11:06 +02:00
Normann Rion d17204cc84 Implements a cycle reduction Fortran routine and the associated test.
The Fortran routine replaces the former Matlab code in matlab/cycle_reduction.m
2022-10-03 14:38:12 +02:00
Sébastien Villemot cc8b2fd920
Bump to C++20 standard (with GNU extensions)
In practice, for the time being, we limit ourselves to C++20 features available
in GCC 10.
2022-05-04 18:33:07 +02:00
Sébastien Villemot 2f6120de0c
Octave 7 compatibility fix: add --link-stand-alone when getting LDFLAGS from mkoctfile
Since Octave 7, LDFLAGS as returned by mkoctfile include -shared, which is
undesirable for generic LDFLAGS. Pass the --link-stand-alone option to strip
this flag.
2022-04-15 14:32:54 +02:00
Sébastien Villemot 39f47dc957
local_state_space_iteration_k MEX now uses the Fortran code (instead of the C++ code)
Closes: #1802
2022-02-04 11:49:46 +01:00
NormannR 5f828e241f Parallelizes local_state_space_iteration_fortran 2022-01-31 18:44:48 +01:00
Sébastien Villemot 79132ebe55
Build system: no longer use deprecated LFLAGS from mkoctfile
By the way, drop the -static-* flags from LDFLAGS in Windows mkoctfile stub. It
is no more needed and creates duplicates in the link command line (since those
flags are already in DL_LDFLAGS).
2022-01-24 12:52:24 +01:00
Sébastien Villemot ae5be8d717
Build system: add provisions for k_order_mean MEX under Octave 2021-12-16 10:42:37 +01:00
Sébastien Villemot 1144de4167
Bump version number 2021-12-08 14:23:26 +01:00
Sébastien Villemot 06fd42c19b
Drop the dynare_simul_ MEX in favour of the new Fortran k_order_simul MEX 2021-11-26 17:37:53 +01:00
Sébastien Villemot e155c5cbb2
macOS: fix compilation of MEX files against Homebrew’s octave
It is necessary to link MEX files against Octave libraries, as under Windows.
2021-10-25 18:02:46 +02:00
Sébastien Villemot f1a0bdb8e5
Build system: fix several warnings with Autoconf 2.70 2021-09-28 18:21:17 +02:00
Normann Rion 6475c52b3d Implements k-order simulation routine in Fortran (Ref: #1802)
`k_order_simul` may replace `dynare_simul_` in the long run
2021-09-24 09:11:15 +02:00
Sébastien Villemot 7083f1d692 Merge branch 'local_state_space_it' into 'master'
Implements the Fortran replacement of local_state_space_iteration_k (Ref #1802)

See merge request Dynare/dynare!1918
2021-09-22 15:54:17 +00:00
NormannR cab65dabb5 Implements `local_state_space_iteration_fortran`, the Fortran replacement of `local_state_space_iteration_k` (Ref #1802)
- Creates the library `libkordersim` with all the relevant Fortran routines to `folded_to_unfolded_dr` and `local_state_space_iteration_fortran`
   - Implements `folded_to_unfolded_dr`, which converts folded decision rule matrices to their unfolded counterparts
2021-09-22 16:28:46 +02:00
Sébastien Villemot 91e3348806
Windows package: fix bug introduced in c5120e1278 2021-09-21 18:40:54 +02:00
Sébastien Villemot 5d5fefca25
Bump version numbers 2021-07-23 15:57:19 +02:00
Normann Rion 3d27672c58
kth-order approximation of conditional welfare
Partially addresses issue #1680:
- unconditional welfare resorts to dynare++ simulation tools, which shall be updated very soon
TO DO:
- implement a function computing kth-order approximation of simulated moments of y
2021-06-15 15:04:31 +02:00
Sébastien Villemot 766fff88f6
Use secure URL for link to GNU licenses 2021-06-09 17:35:05 +02:00
Sébastien Villemot 0741963ca5
Build system: streamline handling of compilation flags for MEX
— allow the user to override compilation flags for MATLAB MEX (it was already
  working for the preprocessor, the MEX for Octave and Dynare++)
— increase the symmetry of MEX build infrastructure between MATLAB and Octave
— when linking MEX for Octave, do not add the output of “mkoctfile -p FLIBS”.
  It is unneeded, and it can create a conflict between the system compiler and
  a user-supplied compiler

By the way:
— restore optimization on macOS for C/C++ MEX (it had been removed in
  5df2392a09)
— remove -fno-omit-frame-pointer on MATLAB/Linux, since it would be cancelled
  by subsequent -O2 and should not be needed anyways
— remove FFLAGS under Octave, unused
2021-05-10 14:39:41 +02:00
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
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 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
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 400979fd44
macOS: fix handling LDFLAGS when building MEX for Octave
If something was already in LDFLAGS, it was concatenated without a whitespace,
leading to failure.
2020-06-15 18:29:42 +02:00
Sébastien Villemot 43ed7b2b69
Merge remote-tracking branch 'community/master' into enterprise 2020-03-27 16:28:41 +01:00
Sébastien Villemot 47e4649026
Add support for Fortran 2008 in MEX files
By the same token, remove unused support for Fortran 77.
2020-01-06 18:29:47 +01:00
Sébastien Villemot 4e314a529b
Bump minimal required Octave version to 4.4 2020-01-06 18:29:47 +01:00
Sébastien Villemot 39ed7c6742
Bump version number to 4.7-unstable 2019-12-20 17:20:07 +01:00
Houtan Bastani 0c77f7e92f
macOS packaging: compile against the version of Octave distributed via https://octave-app.org (currently 4.4.1) 2019-12-10 15:14:16 +01:00
Sébastien Villemot 6a26926892
Add new block_trust_region MEX
This MEX solves nonlinear systems of equations using a trust region algorithm.
The problem is subdivided in smaller problems by doing a block
triangularisation of the Jacobian at the guess value, using the
Dulmage-Mendelsohn algorithm.

The interface of the MEX is simply:

  [x, info] = block_trust_region(f, guess_value);

Where f is either a function handle or a string designating a function.
f must take one argument (the evaluation point), and return either one or two
arguments (the residuals and, optionally, the Jacobian).

On success, info=0; on failure, info=1.
2019-12-03 16:17:16 +01:00
Sébastien Villemot fedeeaad9f
Add support for Fortran 2008 in MEX files
By the same token, remove unused support for Fortran 77.
2019-12-03 16:17:00 +01:00
Sébastien Villemot 5cae192487
Build system: really error out if some dependency is missing
The changes in 8065e9d439 were not working as
intended, because AC_CHECK_PROG expect values and not actions. Hence
AC_MSG_ERROR was not properly executed.

By the way, simplify some test conditions using && instead of if/then/fi
blocks.
2019-11-28 14:43:44 +01:00
Sébastien Villemot 8065e9d439
Build system: by default, error out if some dependency is missing
In particular, if either MATLAB or Octave is missing, one needs to pass either
--disable-matlab or --disable-octave.

Moreover, several new configure flags have been introduced for disabling some
components:
--disable-doc
--disable-dynare++
--disable-mex-dynare++
--disable-mex-ms-sbvar
--disable-mex-kalman-steady-state
2019-11-26 13:53:42 +01:00
Houtan Bastani f8eb982767
octave configure: remove unnecessary library linking for macOS 2019-09-24 15:22:36 +02:00
Sébastien Villemot 0d0a0a9bbb
Bump to C++17
This means we now require GCC 8.

Boost filesystem library is no longer needed.

Ref preprocessor#16
2019-09-11 15:06:12 +02:00
Sébastien Villemot 9557061fa3
Add new num_procs MEX file for getting number of available processing units 2019-06-27 14:34:09 +02:00
Sébastien Villemot 7c39b12b7b
Always compile MEX files with OpenMP (when they can take advantage of it)
As a consequence, remove the --enable-openmp option of the configure script.
2019-06-25 17:26:17 +02:00
Sébastien Villemot 5b591fac42
New perfect_foresight_problem MEX file
It constructs the stacked residuals and jacobian of the perfect foresight
problem.

It is an almost perfect replacement for the perfect_foresight_problem.m
routine, while being much more efficient.

Note however that the DLL never return complex numbers (it instead puts NaNs at
the place where there would have been complex). This may create problems for
some MOD files; the algorithms will need to be adapted to use a more
line-search method.
2019-06-24 17:53:59 +02:00
Sébastien Villemot f5e2bfc30a
Ask GCC to warn about C-style casts (-Wold-style-cast)
Adapt the code accordingly.
2019-04-23 13:03:20 +02:00