Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 4.3
  • 4.4
  • 4.5
  • 4.6
  • 5.x
  • 6.x
  • asm
  • aux_func
  • clang+openmp
  • dates-and-dseries-improvements
  • declare_vars_in_model_block
  • dmm
  • dragonfly
  • dynare_minreal
  • eigen
  • error_msg_undeclared_model_vars
  • estim_params
  • exo_steady_state
  • gpm-optimal-policy
  • julia
  • madysson
  • master
  • mex-GetPowerDeriv
  • penalty
  • separateM_
  • slice
  • sphinx-doc-experimental
  • static_aux_vars
  • time-varying-information-set
  • various_fixes
  • 3.062
  • 3.063
  • 4.0.0
  • 4.0.1
  • 4.0.2
  • 4.0.3
  • 4.0.4
  • 4.1-alpha1
  • 4.1-alpha2
  • 4.1.0
  • 4.1.1
  • 4.1.2
  • 4.1.3
  • 4.2.0
  • 4.2.1
  • 4.2.2
  • 4.2.3
  • 4.2.4
  • 4.2.5
  • 4.3.0
  • 4.3.1
  • 4.3.2
  • 4.3.3
  • 4.4-beta1
  • 4.4.0
  • 4.4.1
  • 4.4.2
  • 4.4.3
  • 4.5.0
  • 4.5.1
  • 4.5.2
  • 4.5.3
  • 4.5.4
  • 4.5.5
  • 4.5.6
  • 4.5.7
  • 4.6-beta1
  • 4.6.0
  • 4.6.0-rc1
  • 4.6.0-rc2
  • 4.6.1
  • 4.6.2
  • 4.6.3
  • 4.6.4
  • 4.7-beta1
  • 4.7-beta2
  • 4.7-beta3
  • 5.0
  • 5.0-rc1
  • 5.1
  • 5.2
  • 5.3
  • 5.4
  • 5.5
  • 6-beta1
  • 6-beta2
  • 6.0
  • 6.1
  • 6.2
  • 6.3
90 results

Target

Select target project
  • giovanma/dynare
  • giorgiomas/dynare
  • Vermandel/dynare
  • Dynare/dynare
  • normann/dynare
  • MichelJuillard/dynare
  • wmutschl/dynare
  • FerhatMihoubi/dynare
  • sebastien/dynare
  • lnsongxf/dynare
  • rattoma/dynare
  • CIMERS/dynare
  • FredericKarame/dynare
  • SumuduK/dynare
  • MinjeJeon/dynare
  • camilomrch/dynare
  • DoraK/dynare
  • avtishin/dynare
  • selma/dynare
  • claudio_olguin/dynare
  • jeffjiang07/dynare
  • EthanSystem/dynare
  • stepan-a/dynare
  • wjgatt/dynare
  • JohannesPfeifer/dynare
  • gboehl/dynare
  • chskcau/dynare-doc-fixes
27 results
Select Git revision
  • 4.3
  • 4.4
  • 4.5
  • 4.6
  • 5.x
  • 6.x
  • asm
  • aux_func
  • clang+openmp
  • dates-and-dseries-improvements
  • declare_vars_in_model_block
  • devel
  • dime_sampler
  • dmm
  • dragonfly
  • dynamic-striated
  • dynare_minreal
  • eigen
  • error_msg_undeclared_model_vars
  • estim_params
  • exceptions
  • exo_steady_state
  • filter_initial_state
  • gpm-optimal-policy
  • julia
  • madysson
  • master
  • mex-GetPowerDeriv
  • minor_edits
  • occbin
  • penalty
  • revert-42572535
  • rmExtraExo
  • separateM_
  • slice
  • sphinx-doc-experimental
  • static_aux_vars
  • time-varying-information-set
  • various_fixes
  • 3.062
  • 3.063
  • 4.0.0
  • 4.0.1
  • 4.0.2
  • 4.0.3
  • 4.0.4
  • 4.1-alpha1
  • 4.1-alpha2
  • 4.1.0
  • 4.1.1
  • 4.1.2
  • 4.1.3
  • 4.2.0
  • 4.2.1
  • 4.2.2
  • 4.2.3
  • 4.2.4
  • 4.2.5
  • 4.3.0
  • 4.3.1
  • 4.3.2
  • 4.3.3
  • 4.4-beta1
  • 4.4.0
  • 4.4.1
  • 4.4.2
  • 4.4.3
  • 4.5.0
  • 4.5.1
  • 4.5.2
  • 4.5.3
  • 4.5.4
  • 4.5.5
  • 4.5.6
  • 4.5.7
  • 4.6-beta1
  • 4.6.0
  • 4.6.0-rc1
  • 4.6.0-rc2
  • 4.6.1
  • 4.6.2
  • 4.6.3
  • 4.6.4
  • 4.7-beta1
  • 4.7-beta2
  • 4.7-beta3
  • 5.0
  • 5.0-rc1
  • 5.1
  • 5.2
  • 5.3
  • 5.4
  • 5.5
  • 6-beta1
  • 6-beta2
  • 6.0
  • 6.1
97 results
Show changes
Commits on Source (346)
Showing
with 1509 additions and 523 deletions
...@@ -8,6 +8,12 @@ ...@@ -8,6 +8,12 @@
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html # https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# Effective configuration can be obtained with: # Effective configuration can be obtained with:
# clang-format --dump-config # clang-format --dump-config
# The RemoveParentheses and RemoveSemicolon option are not permanently set,
# because the clang-format manual (as of version 19) states that these
# options can lead to incorrect formatting and thus their result should be
# carefully reviewed.
Language: Cpp Language: Cpp
Standard: c++20 Standard: c++20
ColumnLimit: 100 ColumnLimit: 100
...@@ -19,9 +25,12 @@ BreakInheritanceList: AfterColon ...@@ -19,9 +25,12 @@ BreakInheritanceList: AfterColon
Cpp11BracedListStyle: true Cpp11BracedListStyle: true
DeriveLineEnding: false DeriveLineEnding: false
IndentPPDirectives: AfterHash IndentPPDirectives: AfterHash
InsertNewlineAtEOF: true
PackConstructorInitializers: NextLine PackConstructorInitializers: NextLine
PPIndentWidth: 1 PPIndentWidth: 1
PointerAlignment: Left PointerAlignment: Left
# RemoveParentheses: ReturnStatement
# RemoveSemicolon: true
SpaceAfterTemplateKeyword: false SpaceAfterTemplateKeyword: false
SpaceBeforeParens: ControlStatements SpaceBeforeParens: ControlStatements
SpaceBeforeCpp11BracedList: true SpaceBeforeCpp11BracedList: true
variables: variables:
GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE_STRATEGY: recursive
TERM: linux TERM: linux
MATLAB_VERSION: R2024a MATLAB_VERSION: R2024b
OLD_MATLAB_VERSION: R2018b OLD_MATLAB_VERSION: R2018b
# To ensure that "false && true" fails, see https://gitlab.com/gitlab-org/gitlab-runner/-/issues/25394#note_412609647 # To ensure that "false && true" fails, see https://gitlab.com/gitlab-org/gitlab-runner/-/issues/25394#note_412609647
FF_ENABLE_BASH_EXIT_CODE_CHECK: 'true' FF_ENABLE_BASH_EXIT_CODE_CHECK: 'true'
...@@ -107,7 +107,7 @@ pkg_macOS_x86_64: ...@@ -107,7 +107,7 @@ pkg_macOS_x86_64:
script: script:
# Enforce the arm64 meson for rewrite, as a workaround to https://github.com/mesonbuild/meson/issues/12282 # Enforce the arm64 meson for rewrite, as a workaround to https://github.com/mesonbuild/meson/issues/12282
- env PATH="/opt/homebrew/bin:$PATH" meson rewrite kwargs set project / version "$VERSION" - env PATH="/opt/homebrew/bin:$PATH" meson rewrite kwargs set project / version "$VERSION"
- ln -s ~/tarballs macOS/deps/x86_64 - ln -s ~/tarballs macOS/deps/
- make -C macOS build-x86_64 - make -C macOS build-x86_64
cache: cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
...@@ -127,7 +127,7 @@ pkg_macOS_arm64: ...@@ -127,7 +127,7 @@ pkg_macOS_arm64:
script: script:
# Enforce the arm64 meson for rewrite, as a workaround to https://github.com/mesonbuild/meson/issues/12282 # Enforce the arm64 meson for rewrite, as a workaround to https://github.com/mesonbuild/meson/issues/12282
- env PATH="/opt/homebrew/bin:$PATH" meson rewrite kwargs set project / version "$VERSION" - env PATH="/opt/homebrew/bin:$PATH" meson rewrite kwargs set project / version "$VERSION"
- ln -s ~/tarballs macOS/deps/arm64 - ln -s ~/tarballs macOS/deps/
- make -C macOS build-arm64 - make -C macOS build-arm64
cache: cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
...@@ -142,11 +142,23 @@ pkg_macOS_arm64: ...@@ -142,11 +142,23 @@ pkg_macOS_arm64:
expire_in: 3 days expire_in: 3 days
needs: [ "build_doc" ] needs: [ "build_doc" ]
pkg_matlab_online:
stage: pkg
script:
- meson rewrite kwargs set project / version "$VERSION"
- cd scripts/matlab-online && ./packageDynare.sh
tags:
- matlab-online
artifacts:
paths:
- scripts/matlab-online/*.mltbx
expire_in: 3 days
needs: []
when: manual
test_matlab: test_matlab:
stage: test stage: test
script: script:
# Workaround for R2024a, that prevents lockups apparently linked to the ServiceHost daemon
- rm -rf ~/.MathWorks && ln -s /dev/null ~/.MathWorks
- meson test -C build-matlab --no-rebuild --num-processes $(($(nproc) * 3 / 4)) - meson test -C build-matlab --no-rebuild --num-processes $(($(nproc) * 3 / 4))
artifacts: artifacts:
paths: paths:
...@@ -164,6 +176,7 @@ test_old_matlab: ...@@ -164,6 +176,7 @@ test_old_matlab:
paths: paths:
- build-old-matlab/meson-logs/testlog.txt - build-old-matlab/meson-logs/testlog.txt
when: always when: always
needs: []
when: manual when: manual
test_octave: test_octave:
...@@ -186,6 +199,17 @@ test_clang_format: ...@@ -186,6 +199,17 @@ test_clang_format:
- ninja -C build-clang-format clang-format-check - ninja -C build-clang-format clang-format-check
needs: [] needs: []
test_clang_tidy:
stage: test
script:
# Hack needed for meson < 1.6.0 which only looks for unversioned clang-tidy
- mkdir -p ~/.local/bin && ln -s /usr/bin/clang-tidy-19 ~/.local/bin/clang-tidy
- export PATH="$HOME/.local/bin:$PATH"
- meson setup -Dbuild_for=octave build-clang-tidy
- ninja -C build-clang-tidy clang-tidy
needs: []
when: manual
# For the sign and deploy jobs, we don’t use the “needs” keyword, since we # For the sign and deploy jobs, we don’t use the “needs” keyword, since we
# don’t want those jobs to start before the “test” and “pkg” stages have # don’t want those jobs to start before the “test” and “pkg” stages have
# succeeded. Hence we stick to the “dependencies” keyword. # succeeded. Hence we stick to the “dependencies” keyword.
......
Announcement for Dynare 6.3 (on 2025-02-19)
===========================================
We are pleased to announce the release of Dynare 6.3.
This maintenance release fixes various bugs.
The Windows, macOS, MATLAB online and source packages are available for
download at [the Dynare website](https://www.dynare.org/download/).
This release is compatible with MATLAB versions ranging from 9.5 (R2018b) to
24.2 (R2024b), and with GNU Octave versions ranging from 7.1.0 to 9.4.0 (NB:
the Windows package requires version 9.4.0 specifically).
Here is a list of the problems identified in version 6.2 and that have been
fixed in version 6.3:
* OccBin with option `smoother_inversion_filter` would crash the MCMC
estimation if the `filtered_variables` or `filter_step_ahead` options were
used
* OccBin with option `smoother_inversion_filter` would use the PKF if
`mh_replic>0`
* OccBin with option `smoothed_state_uncertainty` would crash Dynare if the
MCMC smoother was run after the classical one
* OccBin's smoother would crash when encountering an internal error due to the
output of the linear smoother not having been computed
* Calling `model_info` with `differentiate_forward_vars` would crash
* The `identification` command would compute the asymptotic Hessian via
simulation instead of via moments as intended
* The `identification` command would crash during prior sampling if the initial
draw did not solve the model
* The `gsa_sample_file` was broken
* Optimization algorithm `mode_compute=5` (`newrat`) would crash with
`analytic_derivation`
* The `discretionary_policy` command would crash if the model was purely
forward-looking
* The `dsample` command would crash
* The `conditional_forecast_paths` block did not accept vector inputs
* For MCMC chains with fewer than 6000 draws, the default number of `sub_draws`
used to compute posterior moments was incorrect
* Bi-annual dates (e.g. `2024S1` or `2024H1`) were not accepted within Dynare
statements
* Plotting `dseries` did not correctly show dates on the x-axis
Announcement for Dynare 6.2 (on 2024-09-25)
===========================================
We are pleased to announce the release of Dynare 6.2.
This maintenance release fixes various bugs.
The Windows, macOS, MATLAB online and source packages are available for
download at [the Dynare website](https://www.dynare.org/download/).
This release is compatible with MATLAB versions ranging from 9.5 (R2018b) to
24.2 (R2024b), and with GNU Octave versions ranging from 7.1.0 to 9.2.0 (NB:
the Windows package requires version 9.2.0 specifically).
Here is a list of the problems identified in version 6.1 and that have been
fixed in version 6.2:
* The mixed complementarity problem (MCP) solver could fail or give wrong
results in some cases where there were multiple complementarity conditions
* The `qmc_sequence` MEX file from the macOS package would fail to load
* OccBin forecasts would crash in case of shocks with zero variance
* OccBin smoother would crash if simulation did not converge
* Computation of posterior moments could crash in large models
* The auxiliary particle filter and the Liu & West online filter
(`mode_compute=11`) required the Statistics Toolbox
* The auxiliary particle filter and the Liu & West online filter
(`mode_compute=11`) would not work with the `discretionary_policy` command
* The `discretionary_policy` command would crash if there were fewer than two
exogenous variables
* Using the `forecast` command with a model solved at `order>1` without
`varexo_det` would return forecasts based on a first order approximation
instead of providing an error message
* Using the `forecast` command with a model solved at `order=2` with
`varexo_det` and `pruning` would return forecasts without `pruning` instead
of providing an error message
* Using the `forecast` command with a model solved at `order=3` would crash
* SMC methods could return wrong posterior results if the Parallel Toolbox was
installed
* The Herbst-Schorfheide SMC sampler would crash at `order>1`
* Annualized shock decomposition would not output results if desired vintage
date did not coincide to an end-of-the-year Q4 period
* Using `rand_multivariate_student` as the proposal density in the
`tailored_random_block_metropolis_hastings` posterior sampler would return
wrong results
* The `onlyclearglobals` of the `dynare` command was not working as intended
* The `det_cond_forecast` command would crash with plans including only
expected shocks
* Estimation could crash in some rare cases when computing the 2nd order
moments of prior or posterior distribution
* Successive calls of the Herbst-Schorfheide SMC sampler could crash due to
some stale files being left on disk
* The shock decomposition plot could be wrong in the presence of leads/lags on
exogenous variables, or when the steady state is squeezed
Announcement for Dynare 6.1 (on 2024-05-02) Announcement for Dynare 6.1 (on 2024-05-02)
=========================================== ===========================================
......
...@@ -104,13 +104,13 @@ If you want a certain version (e.g. 5.x) , then add `--single-branch --branch 5. ...@@ -104,13 +104,13 @@ If you want a certain version (e.g. 5.x) , then add `--single-branch --branch 5.
If you want to compile for MATLAB, please run the following (after adapting the path to MATLAB): If you want to compile for MATLAB, please run the following (after adapting the path to MATLAB):
```sh ```sh
meson setup -Dmatlab_path=/usr/local/MATLAB/R2023b -Dbuildtype=debugoptimized build-matlab meson setup -Dmatlab_path=/usr/local/MATLAB/R2023b --buildtype=debugoptimized build-matlab
``` ```
The build directory will thus be `build-matlab`. The build directory will thus be `build-matlab`.
Or for Octave: Or for Octave:
```sh ```sh
meson setup -Dbuild_for=octave -Dbuildtype=debugoptimized build-octave meson setup -Dbuild_for=octave --buildtype=debugoptimized build-octave
``` ```
The build directory will thus be `build-octave`. The build directory will thus be `build-octave`.
...@@ -273,7 +273,7 @@ Now use the following commands if using MATLAB (adapt them for Octave, see above ...@@ -273,7 +273,7 @@ Now use the following commands if using MATLAB (adapt them for Octave, see above
cd /home/$USER/dynare cd /home/$USER/dynare
git clone --recurse-submodules https://git.dynare.org/dynare/dynare.git unstable git clone --recurse-submodules https://git.dynare.org/dynare/dynare.git unstable
cd unstable cd unstable
meson setup -Dmatlab_path=/usr/local/MATLAB/R2023b -Dfortran_args="[ '-B', '/home/$USER/dynare/slicot']" -Dbuildtype=debugoptimized build-matlab meson setup -Dmatlab_path=/usr/local/MATLAB/R2023b -Dfortran_args="[ '-B', '/home/$USER/dynare/slicot']" --buildtype=debugoptimized build-matlab
meson compile -C build-matlab meson compile -C build-matlab
``` ```
...@@ -318,7 +318,7 @@ cd dynare ...@@ -318,7 +318,7 @@ cd dynare
``` ```
- Configure Dynare from the source directory (adjust `matlab_path` if you use a different version than R2024a): - Configure Dynare from the source directory (adjust `matlab_path` if you use a different version than R2024a):
```sh ```sh
meson setup -Dmatlab_path=/usr/local/MATLAB/R2024a -Dbuildtype=debugoptimized build-matlab meson setup -Dmatlab_path=/usr/local/MATLAB/R2024a --buildtype=debugoptimized build-matlab
``` ```
- Compile: - Compile:
```sh ```sh
...@@ -362,7 +362,7 @@ cd dynare ...@@ -362,7 +362,7 @@ cd dynare
``` ```
- Configure Dynare from the source directory: - Configure Dynare from the source directory:
```sh ```sh
meson setup -Dmatlab_path=<…> -Dbuildtype=debugoptimized -Dprefer_static=true -Dfortran_args="['-B','/usr/local/lib']" build-matlab meson setup -Dmatlab_path=<…> --buildtype=debugoptimized --prefer-static -Dfortran_args="['-B','C:/msys64/usr/local/lib']" build-matlab
``` ```
where the path of MATLAB is specified. Note that you should use where the path of MATLAB is specified. Note that you should use
the MSYS2 notation and not put spaces in the MATLAB path, so you probably want the MSYS2 notation and not put spaces in the MATLAB path, so you probably want
...@@ -497,7 +497,7 @@ cd $DYNAREDIR/x13as ...@@ -497,7 +497,7 @@ cd $DYNAREDIR/x13as
curl -O https://www2.census.gov/software/x-13arima-seats/x13as/unix-linux/program-archives/x13as_asciisrc-v1-1-b61.tar.gz curl -O https://www2.census.gov/software/x-13arima-seats/x13as/unix-linux/program-archives/x13as_asciisrc-v1-1-b61.tar.gz
tar xf x13as_asciisrc-v1-1-b61.tar.gz tar xf x13as_asciisrc-v1-1-b61.tar.gz
sed -i '' 's/-static//g' makefile.gf sed -i '' 's/-static//g' makefile.gf
make -j$(sysctl -n hw.ncpu) -f makefile.gf FC=$BREWDIR/bin/gfortran LINKER=$BREWDIR/bin/gcc-14 FFLAGS="-O2 -std=legacy" LDFLAGS=-static-libgcc LIBS="$BREWDIR/lib/gcc/current/libgfortran.a /$BREWDIR/lib/gcc/current/libquadmath.a" PROGRAM=x13as make -j$(sysctl -n hw.ncpu) -f makefile.gf FC=$BREWDIR/bin/gfortran LINKER=$BREWDIR/bin/gcc-15 FFLAGS="-O2 -std=legacy" LDFLAGS=-static-libgcc LIBS="$BREWDIR/lib/gcc/current/libgfortran.a /$BREWDIR/lib/gcc/current/libquadmath.a" PROGRAM=x13as
sudo cp $DYNAREDIR/x13as/x13as /usr/local/bin/x13as sudo cp $DYNAREDIR/x13as/x13as /usr/local/bin/x13as
cd $DYNAREDIR cd $DYNAREDIR
x13as x13as
...@@ -520,7 +520,7 @@ If you want a certain version (e.g. 5.x) , then add `--single-branch --branch 5. ...@@ -520,7 +520,7 @@ If you want a certain version (e.g. 5.x) , then add `--single-branch --branch 5.
```sh ```sh
export BUILDDIR=build-matlab export BUILDDIR=build-matlab
export MATLABPATH=/Applications/MATLAB_R2023b.app export MATLABPATH=/Applications/MATLAB_R2023b.app
arch -$ARCH meson setup --native-file macOS/homebrew-native-$ARCH.ini -Dmatlab_path=$MATLABPATH -Dbuildtype=debugoptimized -Dfortran_args="['-B','$DYNAREDIR/slicot/lib']" $BUILDDIR arch -$ARCH meson setup --native-file macOS/homebrew-native-$ARCH.ini -Dmatlab_path=$MATLABPATH --buildtype=debugoptimized -Dfortran_args="['-B','$DYNAREDIR/slicot/lib']" $BUILDDIR
``` ```
where you need to adapt the path to MATLAB. where you need to adapt the path to MATLAB.
Similarly, if you want to compile for Octave, replace the `-Dmatlab_path` option by `-Dbuild_for=octave`, and change the build directory to `build-octave`. Similarly, if you want to compile for Octave, replace the `-Dmatlab_path` option by `-Dbuild_for=octave`, and change the build directory to `build-octave`.
......
...@@ -6,6 +6,7 @@ Bibliography ...@@ -6,6 +6,7 @@ Bibliography
* Abramowitz, Milton and Irene A. Stegun (1964): “Handbook of Mathematical Functions”, Courier Dover Publications. * Abramowitz, Milton and Irene A. Stegun (1964): “Handbook of Mathematical Functions”, Courier Dover Publications.
* Adjemian, Stéphane, Matthieu Darracq Parriès and Stéphane Moyen (2008): “Towards a monetary policy evaluation framework”, *European Central Bank Working Paper*, 942. * Adjemian, Stéphane, Matthieu Darracq Parriès and Stéphane Moyen (2008): “Towards a monetary policy evaluation framework”, *European Central Bank Working Paper*, 942.
* Adjemian, Stéphane and Michel Juillard (2025): “Stochastic Extended Path”, *Dynare Working Papers*, 84, CEPREMAP.
* Aguiar, Mark and Gopinath, Gita (2004): “Emerging Market Business Cycles: The Cycle is the Trend,” *NBER* Working Paper, 10734. * Aguiar, Mark and Gopinath, Gita (2004): “Emerging Market Business Cycles: The Cycle is the Trend,” *NBER* Working Paper, 10734.
* Amisano, Gianni and Tristani, Oreste (2010): “Euro area inflation persistence in an estimated nonlinear DSGE model”, *Journal of Economic Dynamics and Control*, 34(10), 1837–1858. * Amisano, Gianni and Tristani, Oreste (2010): “Euro area inflation persistence in an estimated nonlinear DSGE model”, *Journal of Economic Dynamics and Control*, 34(10), 1837–1858.
* Andreasen, Martin M., Jesús Fernández-Villaverde, and Juan Rubio-Ramírez (2018): “The Pruned State-Space System for Non-Linear DSGE Models: Theory and Empirical Applications,” *Review of Economic Studies*, 85(1), 1-49. * Andreasen, Martin M., Jesús Fernández-Villaverde, and Juan Rubio-Ramírez (2018): “The Pruned State-Space System for Non-Linear DSGE Models: Theory and Empirical Applications,” *Review of Economic Studies*, 85(1), 1-49.
...@@ -65,7 +66,7 @@ Bibliography ...@@ -65,7 +66,7 @@ Bibliography
* Koopman, S. J. and J. Durbin (2003): “Filtering and Smoothing of State Vector for Diffuse State Space Models,” *Journal of Time Series Analysis*, 24(1), 85–98. * Koopman, S. J. and J. Durbin (2003): “Filtering and Smoothing of State Vector for Diffuse State Space Models,” *Journal of Time Series Analysis*, 24(1), 85–98.
* Kuntsevich, Alexei V. and Franz Kappel (1997): “SolvOpt - The solver for local nonlinear optimization problems (version 1.1, Matlab, C, FORTRAN)”, University of Graz, Graz, Austria. * Kuntsevich, Alexei V. and Franz Kappel (1997): “SolvOpt - The solver for local nonlinear optimization problems (version 1.1, Matlab, C, FORTRAN)”, University of Graz, Graz, Austria.
* Laffargue, Jean-Pierre (1990): “Résolution d’un modèle macroéconomique avec anticipations rationnelles”, *Annales d’Économie et Statistique*, 17, 97–119. * Laffargue, Jean-Pierre (1990): “Résolution d’un modèle macroéconomique avec anticipations rationnelles”, *Annales d’Économie et Statistique*, 17, 97–119.
* Liu, Jane and Mike West (2001): “Combined parameter and state estimation in simulation-based filtering”, in *Sequential Monte Carlo Methods in Practice*, Eds. Doucet, Freitas and Gordon, Springer Verlag. * Liu, Jane and Mike West (2001): “Combined parameter and state estimation in simulation-based filtering”, in *Sequential Monte Carlo Methods in Practice*, Eds. Doucet, Freitas and Gordon, Springer Verlag, Chapter 10, 197-223.
* Murray, Lawrence M., Emlyn M. Jones and John Parslow (2013): “On Disturbance State-Space Models and the Particle Marginal Metropolis-Hastings Sampler”, *SIAM/ASA Journal on Uncertainty Quantification*, 1, 494–521. * Murray, Lawrence M., Emlyn M. Jones and John Parslow (2013): “On Disturbance State-Space Models and the Particle Marginal Metropolis-Hastings Sampler”, *SIAM/ASA Journal on Uncertainty Quantification*, 1, 494–521.
* Mutschler, Willi (2015): “Identification of DSGE models - The effect of higher-order approximation and pruning“, *Journal of Economic Dynamics & Control*, 56, 34-54. * Mutschler, Willi (2015): “Identification of DSGE models - The effect of higher-order approximation and pruning“, *Journal of Economic Dynamics & Control*, 56, 34-54.
* Mutschler, Willi (2018): “Higher-order statistics for DSGE models”, *Econometrics and Statistics*, 6(C), 44-56. * Mutschler, Willi (2018): “Higher-order statistics for DSGE models”, *Econometrics and Statistics*, 6(C), 44-56.
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright © 2018-2024 Dynare Team # Copyright © 2018-2025 Dynare Team
# #
# This file is part of Dynare. # This file is part of Dynare.
# #
...@@ -34,7 +34,7 @@ html_static_path = ['_static'] ...@@ -34,7 +34,7 @@ html_static_path = ['_static']
master_doc = 'index' master_doc = 'index'
project = u'Dynare' project = u'Dynare'
copyright = u'1996–2024 Dynare Team' copyright = u'1996–2025 Dynare Team'
author = u'Dynare Team' author = u'Dynare Team'
add_function_parentheses = False add_function_parentheses = False
......
...@@ -324,3 +324,43 @@ Dynare misc commands ...@@ -324,3 +324,43 @@ Dynare misc commands
will produce plots for ``2/b*cumsum(x/y(-1)-1)``, where ``x`` and will produce plots for ``2/b*cumsum(x/y(-1)-1)``, where ``x`` and
``y`` are variables in dseries objects ``toto`` and ``noddy``, in ``y`` are variables in dseries objects ``toto`` and ``noddy``, in
the same figure. the same figure.
.. command:: set_dynare_threads(NAME_OF_MEX_FILE,INTEGER);
A NAME_OF_MEX_FILE and INTEGER pair that can be used to set the number of
parallel threads employed during the execution of .mex files. To get the number
of logical cores `n` available, you can run ``n=numprocs``.
Available NAME_OF_MEX_FILE options are:
``'sparse_hessian_times_B_kronecker_C'``
.mex file used during computation of second-order solutions and in
`identification`. Default number of threads: number of logical cores.
``'local_state_space_iteration_2'``
.mex file used during nonlinear filtering at `order=2` without
`k_order_solver` or with `pruning`. Default number of threads:
number of logical cores.
``'local_state_space_iteration_3'``
.mex file used during nonlinear filtering at `order=3` without
`k_order_solver` or with `pruning`. Default number of threads:
number of logical cores.
``'local_state_space_iteration_k'``
.mex file used during nonlinear filtering at `order>3` (without `pruning`)
or at `order=3` with `k_order_solver` and without `pruning`. Default number of threads: 1.
``'perfect_foresight_problem'``
.mex file used during perfect foresight simulations. Default number of threads:
number of logical cores.
``'k_order_perturbation'``
.mex file used for perturbation solutions with `k_order_solver`. Default number of threads:
half the number of logical cores, but at least 1.
...@@ -26,7 +26,7 @@ The following people used to be members of the team: ...@@ -26,7 +26,7 @@ The following people used to be members of the team:
* Ferhat Mihoubi * Ferhat Mihoubi
* George Perendia * George Perendia
Copyright © 1996-2024, Dynare Team. Copyright © 1996-2025, Dynare Team.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
......
...@@ -8,14 +8,14 @@ Software requirements ...@@ -8,14 +8,14 @@ Software requirements
===================== =====================
Packaged versions of Dynare are available for Windows (10 and 11), several Packaged versions of Dynare are available for Windows (10 and 11), several
GNU/Linux distributions (Debian, Ubuntu, Linux Mint, Arch Linux), macOS (13 GNU/Linux distributions (Debian, Ubuntu, Linux Mint, Arch Linux), macOS (15
Ventura), and FreeBSD. Dynare should work on other systems, but some “Sequoia”), and FreeBSD. Dynare should work on other systems, but some
compilation steps are necessary in that case. compilation steps are necessary in that case.
In order to run Dynare, you need one of the following: In order to run Dynare, you need one of the following:
* MATLAB, any version ranging from 9.5 (R2018b) to 24.1 (R2024a); * MATLAB, any version ranging from 9.5 (R2018b) to 25.1 (R2025a);
* GNU Octave, any version ranging from 7.1.0 to 9.2.0, with the ``statistics`` package * GNU Octave, any version ranging from 7.1.0 to 10.2.0, with the ``statistics`` package
from `Octave-Forge`_. Note however that the Dynare installer for Windows from `Octave-Forge`_. Note however that the Dynare installer for Windows
requires a more specific version of Octave, as indicated on the download requires a more specific version of Octave, as indicated on the download
page. page.
...@@ -23,8 +23,17 @@ In order to run Dynare, you need one of the following: ...@@ -23,8 +23,17 @@ In order to run Dynare, you need one of the following:
The following optional extensions are also useful to benefit from The following optional extensions are also useful to benefit from
extra features, but are in no way required: extra features, but are in no way required:
* If under MATLAB: the Optimization Toolbox, the Statistics Toolbox, * If under MATLAB: the
the Control System Toolbox;
* Optimization Toolbox (providing various optimizers
like ``fminsearch``, ``fmincon``, or ``fminunc``, used in e.g. ``mode_compute``,
``opt_algo`` or ``ALGO``),
* Statistics Toolbox (for faster and sometimes more robust implementations of
statistical distributions),
* Global Optimization Toolbox (for ``particleswarm`` and ``simulannealbnd``, used in
e.g. ``mode_compute``, ``opt_algo`` or ``ALGO``)
* Control System Toolbox (for the Lyapunov solver ``dlyapchol`` triggered with ``lyapunov=square_root_solver``)
* Parallel Computing Toolbox (to speed up the ``dime`` sampler)
* If under Octave, the following `Octave-Forge`_ packages: ``optim``, ``io``, * If under Octave, the following `Octave-Forge`_ packages: ``optim``, ``io``,
``control``. ``control``.
...@@ -91,15 +100,8 @@ Debian, Ubuntu and Linux Mint). ...@@ -91,15 +100,8 @@ Debian, Ubuntu and Linux Mint).
On macOS On macOS
-------- --------
With MATLAB .. warning::
^^^^^^^^^^^
To install Dynare for use with MATLAB, execute the automated installer called
``dynare-x.y-arch.pkg`` (where *x.y* is the version number and *arch* is either arm64 for Apple Silicon or x86_64 for Intel architectures),
and follow the instructions.
This installation does not require administrative privileges.
If for some reason admin rights are requested, use *Change Install Location* and select *Install for me only*.
The default installation directory is ``/Applications/Dynare/x.y-arch``.
Installing into ``/Applications/dynare`` might fail if you have older versions of Dynare already installed in ``/Applications/Dynare``. Installing into ``/Applications/dynare`` might fail if you have older versions of Dynare already installed in ``/Applications/Dynare``.
To fix this, modify the ownership by executing the following command in Terminal.app:: To fix this, modify the ownership by executing the following command in Terminal.app::
...@@ -110,9 +112,24 @@ After installation, the folder will contain several sub-directories, among which ...@@ -110,9 +112,24 @@ After installation, the folder will contain several sub-directories, among which
Several versions of Dynare can coexist (by default in ``/Applications/Dynare``), Several versions of Dynare can coexist (by default in ``/Applications/Dynare``),
as long as you correctly adjust your path settings (see :ref:`words-warning`). as long as you correctly adjust your path settings (see :ref:`words-warning`).
With MATLAB
^^^^^^^^^^^
To install Dynare for use with MATLAB, execute the automated installer called
``dynare-x.y-arch.pkg`` (where *x.y* is the version number and *arch* is either arm64 for Apple Silicon or x86_64 for Intel architectures),
and follow the instructions.
This installation does not require administrative privileges.
If for some reason admin rights are requested, use *Change Install Location* and select *Install for me only*.
The default installation directory is ``/Applications/Dynare/x.y-arch``.
It is recommended to install the Xcode Command Line Tools (this is an Apple product) It is recommended to install the Xcode Command Line Tools (this is an Apple product)
and GCC via Homebrew_ (see :ref:`prerequisites-macos`). and GCC via Homebrew_ (see :ref:`prerequisites-macos`).
To deinstall Dynare, simply delete the folder where you installed the program. The package installer does
not put any files anywhere else in the system.
With Octave With Octave
^^^^^^^^^^^ ^^^^^^^^^^^
...@@ -133,6 +150,8 @@ once):: ...@@ -133,6 +150,8 @@ once)::
octave:1> pkg install -forge io statistics control struct optim octave:1> pkg install -forge io statistics control struct optim
If you want to use the `x13` functionality of `dseries`, you also need to build the `x13as` binary. [#fx13]_
On FreeBSD On FreeBSD
---------- ----------
...@@ -325,3 +344,8 @@ Dynare unusable. ...@@ -325,3 +344,8 @@ Dynare unusable.
.. _Dynare wiki: https://git.dynare.org/Dynare/dynare/wikis .. _Dynare wiki: https://git.dynare.org/Dynare/dynare/wikis
.. _Octave-Forge: https://octave.sourceforge.io/ .. _Octave-Forge: https://octave.sourceforge.io/
.. _Homebrew: https://brew.sh .. _Homebrew: https://brew.sh
.. rubric:: Footnotes
.. [#fx13] See the instructions at `<https://forum.dynare.org/t/missing-installation-package/27350/4>`__.
...@@ -125,23 +125,20 @@ by the ``dynare`` command. ...@@ -125,23 +125,20 @@ by the ``dynare`` command.
.. option:: noclearall .. option:: noclearall
By default, ``dynare`` will issue a ``clear all`` command to By default, ``dynare`` deletes all the global variables and the
MATLAB (<R2015b) or Octave, thereby deleting all workspace functions using persistent variables, in order to benefit from the JIT
variables and functions; this option instructs ``dynare`` not (just-in-time) compilation. This option instructs ``dynare`` not to
to clear the workspace. Note that starting with MATLAB 2015b clear those.
``dynare`` only deletes the global variables and the functions
using persistent variables, in order to benefit from the JIT
(Just In Time) compilation. In this case the option instructs
``dynare`` not to clear the globals and functions.
.. option:: onlyclearglobals .. option:: onlyclearglobals
By default, ``dynare`` will issue a ``clear all`` command to By default, ``dynare`` deletes all the global variables and the
MATLAB versions before 2015b and to Octave, thereby deleting functions using persistent variables, in order to benefit from the JIT
all workspace variables; this option instructs ``dynare`` to (just-in-time) compilation. This option instructs ``dynare`` to clear
clear only the global variables (i.e. ``M_, options_, oo_, only its own global variables (*i.e.* ``M_, options_, oo_,
estim_params_, bayestopt_``, and ``dataset_``), leaving the estim_params_, bayestopt_``, ``dataset_``, ``dataset_info`` and
other variables in the workspace. ``estimation_info``), leaving the other variables in the workspace, and
not clearing functions using persistent variables.
.. option:: debug .. option:: debug
...@@ -191,10 +188,13 @@ by the ``dynare`` command. ...@@ -191,10 +188,13 @@ by the ``dynare`` command.
Instructs Dynare to no create a logfile of this run in Instructs Dynare to no create a logfile of this run in
``FILENAME.log.`` The default is to create the logfile. ``FILENAME.log.`` The default is to create the logfile.
.. option:: output=second|third .. option:: output=first|second|third
Instructs the preprocessor to output derivatives of the dynamic model at Instructs the preprocessor to output derivatives of the dynamic model at
least up to the given order. least up to the given order. The `first` option is useful in
larger models when debugging steady state computation, because it allows
overriding the default computation and output of dynamic second order derivatives
in case of the mod-file not containing commands for further computations.
.. option:: language=matlab|julia .. option:: language=matlab|julia
......
This diff is collapsed.
This diff is collapsed.
...@@ -97,7 +97,7 @@ class DynObject(ObjectDescription): ...@@ -97,7 +97,7 @@ class DynObject(ObjectDescription):
self.state_machine.reporter.warning( self.state_machine.reporter.warning(
'duplicate object description of %s, ' % fullname + 'duplicate object description of %s, ' % fullname +
'other instance in ' + 'other instance in ' +
self.env.doc2path(objects[fullname][0]),line=self.lineno) str(self.env.doc2path(objects[fullname][0])),line=self.lineno)
objects[fullname] = (self.env.docname, self.objtype) objects[fullname] = (self.env.docname, self.objtype)
indextext = self.get_index_text(fullname,name_obj) indextext = self.get_index_text(fullname,name_obj)
...@@ -242,7 +242,7 @@ class DynSimpleObject(ObjectDescription): ...@@ -242,7 +242,7 @@ class DynSimpleObject(ObjectDescription):
self.state_machine.reporter.warning( self.state_machine.reporter.warning(
'duplicate object description of %s, ' % fullname + 'duplicate object description of %s, ' % fullname +
'other instance in ' + 'other instance in ' +
self.env.doc2path(objects[fullname][0]), line=self.lineno) str(self.env.doc2path(objects[fullname][0])), line=self.lineno)
objects[fullname] = self.env.docname, self.objtype objects[fullname] = self.env.docname, self.objtype
indextext = self.get_index_text(fullname,name_obj) indextext = self.get_index_text(fullname,name_obj)
......
...@@ -32,6 +32,10 @@ function [ys,params,check] = NK_baseline_steadystate(ys,exo,M_,options_) ...@@ -32,6 +32,10 @@ function [ys,params,check] = NK_baseline_steadystate(ys,exo,M_,options_)
% You should have received a copy of the GNU General Public License % You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <https://www.gnu.org/licenses/>. % along with Dynare. If not, see <https://www.gnu.org/licenses/>.
% make parameter explicitly known to Matlab to avoid naming conflicts; actual value is read out
% in next eval-loop
delta=0;
% read out parameters to access them with their name % read out parameters to access them with their name
NumberOfParameters = M_.param_nbr; NumberOfParameters = M_.param_nbr;
for ii = 1:NumberOfParameters for ii = 1:NumberOfParameters
......
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Dynare Upstream-Name: Dynare
Upstream-Contact: Dynare Team, whose members in 2024 are: Upstream-Contact: Dynare Team, whose members in 2025 are:
- Stéphane Adjemian <stephane.adjemian@univ-lemans.fr> - Stéphane Adjemian <stephane.adjemian@univ-lemans.fr>
- Michel Juillard <michel.juillard@mjui.fr> - Michel Juillard <michel.juillard@mjui.fr>
- Frédéric Karamé <frederic.karame@univ-lemans.fr> - Frédéric Karamé <frederic.karame@univ-lemans.fr>
...@@ -23,7 +23,7 @@ Upstream-Contact: Dynare Team, whose members in 2024 are: ...@@ -23,7 +23,7 @@ Upstream-Contact: Dynare Team, whose members in 2024 are:
Source: https://www.dynare.org Source: https://www.dynare.org
Files: * Files: *
Copyright: 1996-2024 Dynare Team Copyright: 1996-2025 Dynare Team
License: GPL-3+ License: GPL-3+
Files: matlab/+occbin/IVF_core.m Files: matlab/+occbin/IVF_core.m
...@@ -89,15 +89,15 @@ License: public-domain-aim ...@@ -89,15 +89,15 @@ License: public-domain-aim
Files: matlab/optimization/bfgsi1.m matlab/optimization/csolve.m matlab/optimization/csminit1.m matlab/optimization/numgrad2.m Files: matlab/optimization/bfgsi1.m matlab/optimization/csolve.m matlab/optimization/csminit1.m matlab/optimization/numgrad2.m
matlab/optimization/numgrad3.m matlab/optimization/numgrad3_.m matlab/optimization/numgrad5.m matlab/optimization/numgrad3.m matlab/optimization/numgrad3_.m matlab/optimization/numgrad5.m
matlab/optimization/numgrad5_.m matlab/optimization/csminwel1.m matlab/+bvar/density.m matlab/optimization/numgrad5_.m matlab/optimization/csminwel1.m matlab/+bvar/density.m
matlab/+bvar/toolbox.m matlab/partial_information/PI_gensys.m matlab/partial_information/qzswitch.m matlab/+bvar/toolbox.m matlab/partial_information/PI_gensys.m matlab/partial_information/PI_qzswitch.m
matlab/partial_information/qzdiv.m matlab/partial_information/PI_qzdiv.m
Copyright: 1993-2009 Christopher Sims Copyright: 1993-2009 Christopher Sims
2006-2023 Dynare Team 2006-2024 Dynare Team
License: GPL-3+ License: GPL-3+
Files: matlab/optimization/cmaes.m Files: matlab/optimization/cmaes.m
Copyright: 2001-2012 Nikolaus Hansen Copyright: 2001-2012 Nikolaus Hansen
2012-2017 Dynare Team 2012-2023 Dynare Team
License: GPL-3+ License: GPL-3+
Files: matlab/optimization/solvopt.m Files: matlab/optimization/solvopt.m
...@@ -173,7 +173,7 @@ Comment: The author gave authorization to redistribute ...@@ -173,7 +173,7 @@ Comment: The author gave authorization to redistribute
Files: matlab/+gsa/Morris_Measure_Groups.m Files: matlab/+gsa/Morris_Measure_Groups.m
matlab/+gsa/Sampling_Function_2.m matlab/+gsa/Sampling_Function_2.m
Copyright: 2005 European Commission Copyright: 2005 European Commission
2012-2013 Dynare Team 2012-2023 Dynare Team
License: GPL-3+ License: GPL-3+
Comment: Written by Jessica Cariboni and Francesca Campolongo Comment: Written by Jessica Cariboni and Francesca Campolongo
Joint Research Centre, The European Commission, Joint Research Centre, The European Commission,
...@@ -220,14 +220,14 @@ License: GPL-3+ ...@@ -220,14 +220,14 @@ License: GPL-3+
Files: matlab/missing/stats/quantile.m Files: matlab/missing/stats/quantile.m
Copyright: 2014-2016 Christopher Hummersone Copyright: 2014-2016 Christopher Hummersone
2016-2017 Dynare Team 2016-2023 Dynare Team
License: GPL-3+ License: GPL-3+
Files: matlab/missing/stats/corr.m Files: matlab/missing/stats/corr.m
Copyright: 1993-1996 Kurt Hornik Copyright: 1993-1996 Kurt Hornik
1996-2015 John W. Eaton 1996-2015 John W. Eaton
2013-2015 Julien Bect 2013-2015 Julien Bect
2016-2017 Dynare Team 2016-2023 Dynare Team
License: GPL-3+ License: GPL-3+
Files: matlab/lmmcp/catstruct.m Files: matlab/lmmcp/catstruct.m
...@@ -260,7 +260,7 @@ Copyright: 2000-2022 Frank Schorfheide ...@@ -260,7 +260,7 @@ Copyright: 2000-2022 Frank Schorfheide
License: CC-BY-SA-4.0 License: CC-BY-SA-4.0
Files: doc/*.rst doc/*.tex doc/*.svg doc/*.pdf doc/*.bib Files: doc/*.rst doc/*.tex doc/*.svg doc/*.pdf doc/*.bib
Copyright: 1996-2022 Dynare Team Copyright: 1996-2025 Dynare Team
License: GFDL-NIV-1.3+ License: GFDL-NIV-1.3+
Files: doc/dr.tex doc/dr.bib Files: doc/dr.tex doc/dr.bib
...@@ -278,14 +278,14 @@ License: GPL-3+ ...@@ -278,14 +278,14 @@ License: GPL-3+
Files: scripts/dynare.el Files: scripts/dynare.el
Copyright: 2010 Yannick Kalantzis Copyright: 2010 Yannick Kalantzis
2019-2023 Dynare Team 2019-2025 Dynare Team
License: GPL-3+ License: GPL-3+
Files: mex/sources/gensylv/gensylv.cc Files: mex/sources/gensylv/gensylv.cc
mex/sources/libkorder/kord/* mex/sources/libkorder/sylv/* mex/sources/libkorder/kord/* mex/sources/libkorder/sylv/*
mex/sources/libkorder/tl/* mex/sources/libkorder/utils/* mex/sources/libkorder/tl/* mex/sources/libkorder/utils/*
Copyright: 2004-2011 Ondra Kamenik Copyright: 2004-2011 Ondra Kamenik
2019-2023 Dynare Team 2019-2025 Dynare Team
License: GPL-3+ License: GPL-3+
Files: mex/sources/sobol/sobol.f08 Files: mex/sources/sobol/sobol.f08
...@@ -294,11 +294,11 @@ Copyright: 2004-2009 John Burkardt ...@@ -294,11 +294,11 @@ Copyright: 2004-2009 John Burkardt
License: LGPL-3+ License: LGPL-3+
Files: preprocessor/doc/macroprocessor/* Files: preprocessor/doc/macroprocessor/*
Copyright: 2008-2021 Dynare Team Copyright: 2008-2024 Dynare Team
License: CC-BY-SA-4.0 License: CC-BY-SA-4.0
Files: preprocessor/doc/preprocessor/* Files: preprocessor/doc/preprocessor/*
Copyright: 2007-2019 Dynare Team Copyright: 2007-2023 Dynare Team
License: CC-BY-SA-4.0 License: CC-BY-SA-4.0
Files: contrib/ms-sbvar/utilities_dw/* Files: contrib/ms-sbvar/utilities_dw/*
......
#!/usr/bin/env bash #!/usr/bin/env bash
# Copyright © 2019-2024 Dynare Team # Copyright © 2019-2025 Dynare Team
# #
# This file is part of Dynare. # This file is part of Dynare.
# #
...@@ -38,12 +38,7 @@ else ...@@ -38,12 +38,7 @@ else
path_remove PATH /opt/homebrew/bin path_remove PATH /opt/homebrew/bin
MATLAB_ARCH=maci64 MATLAB_ARCH=maci64
fi fi
MATLAB_PATH=/Applications/"$PKG_ARCH"/MATLAB_R2024a.app MATLAB_PATH=/Applications/"$PKG_ARCH"/MATLAB_R2025a.app
# Workaround for bug in Xcode 15.3 which does not include m4
# See https://github.com/Homebrew/homebrew-core/issues/165388
# and https://trac.macports.org/ticket/69639
path_prepend PATH "$BREWDIR"/opt/m4/bin
# Append texbin to PATH to access latexmk and friends # Append texbin to PATH to access latexmk and friends
path_prepend PATH /Library/TeX/texbin path_prepend PATH /Library/TeX/texbin
...@@ -70,7 +65,7 @@ ln -s "$BREWDIR"/opt/gcc/lib/gcc/"$GCC_VERSION"/libquadmath.a "$QUADMATH_DIR" ...@@ -70,7 +65,7 @@ ln -s "$BREWDIR"/opt/gcc/lib/gcc/"$GCC_VERSION"/libquadmath.a "$QUADMATH_DIR"
cd "$ROOTDIR" cd "$ROOTDIR"
# NB: the addition of -Wl,-ld_classic is a workaround for https://github.com/mesonbuild/meson/issues/12282 (see also the native file) # NB: the addition of -Wl,-ld_classic is a workaround for https://github.com/mesonbuild/meson/issues/12282 (see also the native file)
common_meson_opts=(-Dbuild_for=matlab -Dbuildtype=release -Dprefer_static=true -Dfortran_args="[ '-B', '$LIB64/Slicot/' ]" \ common_meson_opts=(-Dbuild_for=matlab --buildtype=release --prefer-static -Dfortran_args="[ '-B', '$LIB64/Slicot/' ]" \
-Dc_link_args="[ '-Wl,-ld_classic', '-L$QUADMATH_DIR' ]" -Dcpp_link_args="[ '-Wl,-ld_classic', '-L$QUADMATH_DIR' ]" -Dfortran_link_args="[ '-Wl,-ld_classic', '-L$QUADMATH_DIR' ]" \ -Dc_link_args="[ '-Wl,-ld_classic', '-L$QUADMATH_DIR' ]" -Dcpp_link_args="[ '-Wl,-ld_classic', '-L$QUADMATH_DIR' ]" -Dfortran_link_args="[ '-Wl,-ld_classic', '-L$QUADMATH_DIR' ]" \
--native-file macOS/homebrew-native-$PKG_ARCH.ini) --native-file macOS/homebrew-native-$PKG_ARCH.ini)
...@@ -122,9 +117,9 @@ mkdir -p \ ...@@ -122,9 +117,9 @@ mkdir -p \
"$PKGFILES"/scripts \ "$PKGFILES"/scripts \
"$PKGFILES"/contrib/ms-sbvar/TZcode "$PKGFILES"/contrib/ms-sbvar/TZcode
if [[ "$PKG_ARCH" == x86_64 ]]; then if [[ "$PKG_ARCH" == x86_64 ]]; then
mkdir -p "$PKGFILES"/mex/matlab/"$MATLAB_ARCH"-9.5-24.1 mkdir -p "$PKGFILES"/mex/matlab/"$MATLAB_ARCH"-9.5-25.1
else else
mkdir -p "$PKGFILES"/mex/matlab/"$MATLAB_ARCH"-23.2-24.1 mkdir -p "$PKGFILES"/mex/matlab/"$MATLAB_ARCH"-23.2-25.1
fi fi
cp -p "$ROOTDIR"/NEWS.md "$PKGFILES" cp -p "$ROOTDIR"/NEWS.md "$PKGFILES"
...@@ -143,9 +138,9 @@ mkdir -p "$PKGFILES" ...@@ -143,9 +138,9 @@ mkdir -p "$PKGFILES"
ln -sf ../../preprocessor/dynare-preprocessor "$PKGFILES"/matlab/preprocessor64/dynare_m ln -sf ../../preprocessor/dynare-preprocessor "$PKGFILES"/matlab/preprocessor64/dynare_m
if [[ "$PKG_ARCH" == x86_64 ]]; then if [[ "$PKG_ARCH" == x86_64 ]]; then
cp -L "$ROOTDIR"/build-macOS-matlab/*.mex"$MATLAB_ARCH" "$PKGFILES"/mex/matlab/"$MATLAB_ARCH"-9.5-24.1 cp -L "$ROOTDIR"/build-macOS-matlab/*.mex"$MATLAB_ARCH" "$PKGFILES"/mex/matlab/"$MATLAB_ARCH"-9.5-25.1
else else
cp -L "$ROOTDIR"/build-macOS-matlab/*.mex"$MATLAB_ARCH" "$PKGFILES"/mex/matlab/"$MATLAB_ARCH"-23.2-24.1 cp -L "$ROOTDIR"/build-macOS-matlab/*.mex"$MATLAB_ARCH" "$PKGFILES"/mex/matlab/"$MATLAB_ARCH"-23.2-25.1
fi fi
cp -p "$ROOTDIR"/scripts/dynare.el "$PKGFILES"/scripts cp -p "$ROOTDIR"/scripts/dynare.el "$PKGFILES"/scripts
......
# Meson native file for compiling under Homebrew for arm64 architecture # Meson native file for compiling under Homebrew for arm64 architecture
[binaries] [binaries]
cpp = '/opt/homebrew/bin/g++-14' cpp = '/opt/homebrew/bin/g++-15'
c = '/opt/homebrew/bin/gcc-14' c = '/opt/homebrew/bin/gcc-15'
flex = '/opt/homebrew/opt/flex/bin/flex' flex = '/opt/homebrew/opt/flex/bin/flex'
bison = '/opt/homebrew/opt/bison/bin/bison' bison = '/opt/homebrew/opt/bison/bin/bison'
......
# Meson native file for compiling under Homebrew for x86_64 architecture # Meson native file for compiling under Homebrew for x86_64 architecture
[binaries] [binaries]
cpp = '/usr/local/bin/g++-14' cpp = '/usr/local/bin/g++-15'
c = '/usr/local/bin/gcc-14' c = '/usr/local/bin/gcc-15'
flex = '/usr/local/opt/flex/bin/flex' flex = '/usr/local/opt/flex/bin/flex'
bison = '/usr/local/opt/bison/bin/bison' bison = '/usr/local/opt/bison/bin/bison'
......
...@@ -15,7 +15,7 @@ function write(M_) ...@@ -15,7 +15,7 @@ function write(M_)
% REMARKS % REMARKS
% - The trends are assumed to be multiplicative. % - The trends are assumed to be multiplicative.
% Copyright © 2019-2023 Dynare Team % Copyright © 2019-2024 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
...@@ -84,37 +84,40 @@ fprintf(fid, 'y = z(1:%u);\n\n', M_.endo_nbr); ...@@ -84,37 +84,40 @@ fprintf(fid, 'y = z(1:%u);\n\n', M_.endo_nbr);
fprintf(fid, 'g = z(%u:%u);\n', M_.endo_nbr+1, 2*M_.endo_nbr); fprintf(fid, 'g = z(%u:%u);\n', M_.endo_nbr+1, 2*M_.endo_nbr);
% Define the point where the dynamic model is to be evaluated. % Define the point where the dynamic model is to be evaluated.
fprintf(fid, 'Y = zeros(%u, 1);\n', 2*(n0+n1+n2)); % In period t, then in period t+1
fprintf(fid, 'Y0 = NaN(%u, 1);\n', 3*M_.endo_nbr);
fprintf(fid, 'Y1 = NaN(%u, 1);\n', 3*M_.endo_nbr);
for i=1:length(I0) % period t equations, lagged variables. for i=1:length(I0) % period t equations, lagged variables.
if I0(i) if I0(i)
fprintf(fid, 'Y(%u) = y(%u);\n', I0(i), i); fprintf(fid, 'Y0(%u) = y(%u);\n', i+(purely_forward_model*M_.endo_nbr), i);
end end
end end
for i=1:length(I1) % period t equations, current variables. for i=1:length(I1) % period t equations, current variables.
if I1(i) if I1(i)
fprintf(fid, 'Y(%u) = y(%u)*g(%u);\n', I1(i), i, i); fprintf(fid, 'Y0(%u) = y(%u)*g(%u);\n', i+M_.endo_nbr+(purely_forward_model*M_.endo_nbr), i, i);
end end
end end
for i=1:length(I2) % period t equations, leaded variables. for i=1:length(I2) % period t equations, leaded variables.
if I2(i) if I2(i)
fprintf(fid, 'Y(%u) = y(%u)*g(%u)*g(%u);\n', I2(i), i, i, i); fprintf(fid, 'Y0(%u) = y(%u)*g(%u)*g(%u);\n', i+2*M_.endo_nbr, i, i, i);
end end
end end
for i=1:length(I0) % period t+1 equations lagged variables. for i=1:length(I0) % period t+1 equations lagged variables.
if I0(i) if I0(i)
fprintf(fid, 'Y(%u) = y(%u)*g(%u);\n', n0+n1+n2+I0(i), i, i); fprintf(fid, 'Y1(%u) = y(%u)*g(%u);\n', i+(purely_forward_model*M_.endo_nbr), i, i);
end end
end end
for i=1:length(I1) % period t+1 equations current variables. for i=1:length(I1) % period t+1 equations current variables.
if I1(i) if I1(i)
fprintf(fid, 'Y(%u) = y(%u)*g(%u)*g(%u);\n', n0+n1+n2+I1(i), i, i, i); fprintf(fid, 'Y1(%u) = y(%u)*g(%u)*g(%u);\n', i+M_.endo_nbr+(purely_forward_model*M_.endo_nbr), i, i, i);
end end
end end
for i=1:length(I2) % period t+1 equations leaded variables. for i=1:length(I2) % period t+1 equations leaded variables.
if I2(i) if I2(i)
fprintf(fid, 'Y(%u) = y(%u)*g(%u)*g(%u)*g(%u);\n', n0+n1+n2+I2(i), i, i, i, i); fprintf(fid, 'Y1(%u) = y(%u)*g(%u)*g(%u)*g(%u);\n', i+2*M_.endo_nbr, i, i, i, i);
end end
end end
fprintf(fid, '\n'); fprintf(fid, '\n');
% Define the vector of parameters. % Define the vector of parameters.
...@@ -131,19 +134,36 @@ fprintf(fid, 'F = NaN(%u, 1);\n', 2*M_.endo_nbr); ...@@ -131,19 +134,36 @@ fprintf(fid, 'F = NaN(%u, 1);\n', 2*M_.endo_nbr);
fprintf(fid, 'x = zeros(1, %u);\n\n', M_.exo_nbr); fprintf(fid, 'x = zeros(1, %u);\n\n', M_.exo_nbr);
% Evaluate the residuals and jacobian of the dynamic model in periods t and t+1. % Evaluate the residuals and jacobian of the dynamic model in periods t and t+1.
fprintf(fid, '[F(1:%u), T0_order, T0] = %s.sparse.dynamic_resid(Y0, x, p, y);\n', M_.endo_nbr, M_.fname);
fprintf(fid, '[F(%u:%u), T1_order, T1] = %s.sparse.dynamic_resid(Y1, x, p, y);\n', M_.endo_nbr+1, 2*M_.endo_nbr, M_.fname);
fprintf(fid, 'if nargout>1\n'); fprintf(fid, 'if nargout>1\n');
fprintf(fid, ' sparse_rowval = [');
fprintf(fid, '%u ', M_.dynamic_g1_sparse_rowval);
fprintf(fid, '];\n');
fprintf(fid, ' sparse_colval = [');
fprintf(fid, '%u ', M_.dynamic_g1_sparse_colval);
fprintf(fid, '];\n');
fprintf(fid, ' sparse_colptr = [');
fprintf(fid, '%u ', M_.dynamic_g1_sparse_colptr);
fprintf(fid, '];\n');
fprintf(fid, ' J0 = %s.sparse.dynamic_g1(Y0, x, p, y, sparse_rowval, sparse_colval, sparse_colptr, T0_order, T0);\n', M_.fname);
fprintf(fid, ' J1 = %s.sparse.dynamic_g1(Y1, x, p, y, sparse_rowval, sparse_colval, sparse_colptr, T1_order, T1);\n', M_.fname);
% Transform back the Jacobians J0 and J1 in the legacy format (non-sparse)
% NB: it is probably possible to simplify the rest of this file, but maintaining
% decent performance does not seem straightforward.
lli = find(M_.lead_lag_incidence');
if purely_forward_model
lli = lli + M_.endo_nbr;
end
fprintf(fid, ' lli = [');
fprintf(fid, '%u ', lli);
fprintf(fid, '];\n');
fprintf(fid, ' J = zeros(%u, %u);\n', 2*M_.endo_nbr, n0+n1+n2+M_.endo_nbr); fprintf(fid, ' J = zeros(%u, %u);\n', 2*M_.endo_nbr, n0+n1+n2+M_.endo_nbr);
fprintf(fid, ' [F(1:%u), tmp] = %s.dynamic(Y(1:%u), x, p, y, 1);\n', M_.endo_nbr, M_.fname, n0+n1+n2); fprintf(fid, ' J(1:%u,1:%u) = full(J0(:,lli));\n', M_.endo_nbr, n0+n1+n2);
fprintf(fid, ' J(1:%u,1:%u) = tmp(:,1:%u);\n', M_.endo_nbr, n0+n1+n2, n0+n1+n2); fprintf(fid, ' J(%u:%u,1:%u) = full(J1(:,lli));\n', M_.endo_nbr+1, 2*M_.endo_nbr, n0+n1+n2);
fprintf(fid, ' [F(%u:%u), tmp] = %s.dynamic(Y(1+%u:%u), x, p, y, 1);\n', M_.endo_nbr+1, 2*M_.endo_nbr, M_.fname, n0+n1+n2, 2*(n0+n1+n2));
fprintf(fid, ' J(%u:%u,1:%u) = tmp(:,1:%u);\n', M_.endo_nbr+1, 2*M_.endo_nbr, n0+n1+n2, n0+n1+n2);
fprintf(fid, 'else\n');
fprintf(fid, ' F(1:%u) = %s.dynamic(Y(1:%u), x, p, y, 1);\n', M_.endo_nbr, M_.fname, n0+n1+n2);
fprintf(fid, ' F(%u:%u) = %s.dynamic(Y(1+%u:%u), x, p, y, 1);\n', M_.endo_nbr+1, 2*M_.endo_nbr, M_.fname, n0+n1+n2, 2*(n0+n1+n2));
fprintf(fid, 'end\n\n');
% Compute the jacobian if required.
fprintf(fid, 'if nargout>1\n');
fprintf(fid, ' JAC = zeros(%u,%u);\n', 2*M_.endo_nbr, 2*M_.endo_nbr); fprintf(fid, ' JAC = zeros(%u,%u);\n', 2*M_.endo_nbr, 2*M_.endo_nbr);
% Compute the derivatives of the first block of equations (period t) % Compute the derivatives of the first block of equations (period t)
...@@ -279,7 +299,7 @@ else ...@@ -279,7 +299,7 @@ else
end end
% Compute the derivatives of the second block of equations (period t+1) % Compute the derivatives of the second block of equations (period t+1)
% with respect to the endogenous variables. % with respect to the growth factors.
if purely_backward_model || purely_forward_model if purely_backward_model || purely_forward_model
for i=M_.eq_nbr+1:2*M_.eq_nbr for i=M_.eq_nbr+1:2*M_.eq_nbr
for j=1:M_.endo_nbr for j=1:M_.endo_nbr
......
...@@ -360,7 +360,7 @@ if options_gsa.redform && ~isempty(options_gsa.namendo) ...@@ -360,7 +360,7 @@ if options_gsa.redform && ~isempty(options_gsa.namendo)
if isempty(options_gsa.threshold_redform) && ~(exist('gsa_sdp','file')==6 || exist('gsa_sdp','file')==2) if isempty(options_gsa.threshold_redform) && ~(exist('gsa_sdp','file')==6 || exist('gsa_sdp','file')==2)
fprintf('\nThe "SS-ANOVA-R: MATLAB Toolbox for the estimation of Smoothing Spline ANOVA models with Recursive algorithms" is missing.\n') fprintf('\nThe "SS-ANOVA-R: MATLAB Toolbox for the estimation of Smoothing Spline ANOVA models with Recursive algorithms" is missing.\n')
fprintf('To obtain it, go to:\n\n') fprintf('To obtain it, go to:\n\n')
fprintf('https://ec.europa.eu/jrc/en/macro-econometric-statistical-software/ss-anova-r-downloads \n\n') fprintf('https://joint-research-centre.ec.europa.eu/system/files/2025-01/ss_anova_recurs.zip \n\n')
fprintf('and follow the instructions there.\n') fprintf('and follow the instructions there.\n')
fprintf('After obtaining the files, you need to unpack them and set a Matlab Path to those files.\n') fprintf('After obtaining the files, you need to unpack them and set a Matlab Path to those files.\n')
error('SS-ANOVA-R Toolbox missing!') error('SS-ANOVA-R Toolbox missing!')
......