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
  • 6.4
91 results

Target

Select target project
No results found
Select Git revision
  • 4.3
  • 4.4
  • 4.5
  • 4.6
  • 5.x
  • aux_func
  • clang+openmp
  • dates-and-dseries-improvements
  • declare_vars_in_model_block
  • 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
  • master
  • mex-GetPowerDeriv
  • new_solve_algo_12_14
  • occbin
  • penalty
  • 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
85 results
Show changes
1000 files
+ 93708
102090
Compare changes
  • Side-by-side
  • Inline

Files

.clang-format

0 → 100644
+36 −0
Original line number Diff line number Diff line
# NB: whenever the present file is modified, the same modification should be
# applied to the copy in preprocessor.git

# For general information about our coding style, and the specific version
# of clang-format used, see:
#  https://git.dynare.org/Dynare/dynare/-/wikis/CodingGuidelines#c-code
# For the list of options of clang-format, see:
#  https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# Effective configuration can be obtained with:
#  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
Standard: c++20
ColumnLimit: 100
BasedOnStyle: GNU
AllowShortFunctionsOnASingleLine: None
AlwaysBreakTemplateDeclarations: Yes
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
Cpp11BracedListStyle: true
DeriveLineEnding: false
IndentPPDirectives: AfterHash
InsertNewlineAtEOF: true
PackConstructorInitializers: NextLine
PPIndentWidth: 1
PointerAlignment: Left
# RemoveParentheses: ReturnStatement
# RemoveSemicolon: true
SpaceAfterTemplateKeyword: false
SpaceBeforeParens: ControlStatements
SpaceBeforeCpp11BracedList: true

.clang-tidy

0 → 100644
+8 −0
Original line number Diff line number Diff line
# NB: to use clang-tidy on the MEX source code, make sure that you have
# libomp-dev installed (the LLVM implementation of OpenMP)

# TODO: add the following check families:
# - bugprone-*
# - cppcoreguidelines-

Checks: 'performance-*,modernize-*,-modernize-use-trailing-return-type,-clang-diagnostic-unqualified-std-cast-call'
+9 −6
Original line number Diff line number Diff line
((nil .
      ((c-file-style . "gnu")
       (indent-tabs-mode . nil)
       (fill-column . 79)))
 (c-mode . (c-basic-offset 2))
 (makefile-mode . ((indent-tabs-mode . t))))
((c-mode . ((indent-tabs-mode . nil)
            (fill-column . 100)
            (c-file-style . "gnu")))
 (c++-mode . ((indent-tabs-mode . nil)
              (fill-column . 100)
              (c-file-style . "gnu")))
 (makefile-mode . ((indent-tabs-mode . t)))
 (octave-mode . ((indent-tabs-mode . nil)
                 (octave-block-offset . 4))))

.gitattributes

0 → 100644
+1 −0
Original line number Diff line number Diff line
*.mat filter=lfs diff=lfs merge=lfs -text
+29 −208
Original line number Diff line number Diff line
# For checking that no file has been unduly ignored, run:
# $ git ls-files -i --exclude-per-directory=.gitignore
# $ git ls-files -i -c --exclude-per-directory=.gitignore
# Any file that is displayed should be removed from the ignore list
# (possibly by an exclusion rule beginning with an exclamation mark)

# Generic ignore rules
*~
*.o
*.a
*.fig
\#*\#
TAGS
*.mat
*.xls
*.xlsx

# Build system rules
.deps
Makefile
Makefile.in
configure
config.log
config.status
aclocal.m4
autom4te.cache
config.guess
config.sub
depcomp
install-sh
/missing
/mex/build/matlab/missing
/mex/build/octave/missing
/compile
/mex/build/matlab/compile
/mex/build/octave/compile
ylwrap
ar-lib

# checksum associated with fast option
checksum

# Make Check Rules
*.trs

# Doc rules
*.pdf
*.aux
*.log
*.out
*.toc
*.idx
*.scn
*.nav
*.snm
*.vrb
*.bbl
*.blg
*.lof
/doc/dynare.html
/doc/dynare.info
/doc/dynare.info-1
/doc/dynare.info-2
/doc/dynare.cp
/doc/dynare.fn
/doc/dynare.fns
/doc/dynare.vrs
/doc/dynare.ky
/doc/dynare.pg
/doc/dynare.tp
/doc/dynare.vr
/doc/dynare.t2p/*
/doc/texinfo.tex
/doc/version.texi
/doc/mdate-sh
/doc/stamp-vti
!/doc/guide.bbl
!/doc/macroprocessor/new-design.pdf
!/doc/macroprocessor/old-design.pdf
!/doc/userguide/P_ModStruct3.pdf
!/doc/userguide/P_MH2.pdf
!/doc/userguide/P_flowest.pdf
!/doc/userguide/P_ModStruct4.pdf
!/doc/userguide/Graphics/DynareFigures.key/droppedImage-2.pdf
!/doc/userguide/Graphics/DynareFigures.key/droppedImage.pdf
!/doc/userguide/Graphics/DynareFigures.key/droppedImage-1.pdf
!/doc/userguide/Graphics/DynareTitle.pdf
!/doc/userguide/P_ModStruct5.pdf
!/doc/userguide/P_DynareStruct2.pdf
!/doc/userguide/P_SchorfMod.pdf
!/doc/userguide/P_ModStruct2.pdf
!/doc/userguide/P_ShockModel2.pdf
!/doc/parallel/AvenueParadigm.pdf
!/doc/parallel/iVaNo_*.pdf
!/doc/parallel/netbook_*.pdf
!/doc/parallel/quest_*.pdf
!/doc/parallel/RWMH_quest1_*.pdf
!/doc/parallel/waitbars*.pdf
doc/m2html
doc/internals/*.html
doc/internals/ltxpng
mex/build/matlab/run_m2html.m

# Preprocessor
/preprocessor/dynare_m
/preprocessor/dynare_m.exe
/preprocessor/DynareBison.cc
/preprocessor/DynareBison.hh
/preprocessor/FlexLexer.h
/preprocessor/DynareFlex.cc
/preprocessor/location.hh
/preprocessor/position.hh
/preprocessor/stack.hh
/preprocessor/macro/MacroBison.cc
/preprocessor/macro/MacroBison.hh
/preprocessor/macro/MacroFlex.cc
/preprocessor/macro/location.hh
/preprocessor/macro/position.hh
/preprocessor/macro/stack.hh
/preprocessor/doc/

# MATLAB dir
/matlab/preprocessor*
/matlab/dynare_version.m

# JULIA dir
/julia/preprocessor*

# DLL rules
*.mex
*.dll
*.oct
*.mexglx
*.mexa64
*.mexw32
*.mexw64
*.mexmaci
*.mexmaci64
/mex/matlab/
/mex/octave/

# Dynare++
/dynare++/integ/cc/*.cpp
/dynare++/integ/cc/*.h
/dynare++/integ/cc/main.tex
/dynare++/integ/src/quadrature-points
/dynare++/integ/src/quadrature-points.exe
/dynare++/integ/testing/tests
/dynare++/kord/*.cpp
!/dynare++/kord/tests.cpp
/dynare++/kord/*.h
/dynare++/kord/main.tex
/dynare++/kord/tests
/dynare++/kord/tests.exe
/dynare++/kord/out.txt
/dynare++/sylv/testing/*.mm
/dynare++/sylv/testing/tests
/dynare++/sylv/testing/tests.exe
/dynare++/parser/cc/*_ll.cc
/dynare++/parser/cc/*_tab.cc
/dynare++/parser/cc/*_tab.hh
/dynare++/src/dynare++
/dynare++/src/dynare++.exe
/dynare++/src/dynglob_ll.cc
/dynare++/src/dynglob_tab.cc
/dynare++/src/dynglob_tab.hh
/dynare++/tl/cc/*.cpp
/dynare++/tl/cc/*.h
/dynare++/tl/cc/main.tex
/dynare++/tl/testing/tests
/dynare++/tl/testing/tests.exe
!/dynare++/extern/R/Makefile

# Windows
/windows/dynare-version.nsi

# Estimation DLL tests
/mex/sources/estimation/tests/test-dr
/mex/sources/estimation/tests/test-dr.exe
/mex/sources/estimation/tests/testModelSolution
/mex/sources/estimation/tests/testModelSolution.exe
/mex/sources/estimation/tests/testInitKalman
/mex/sources/estimation/tests/testInitKalman.exe
/mex/sources/estimation/tests/testKalman
/mex/sources/estimation/tests/testKalman.exe
/mex/sources/estimation/tests/testPDF
/mex/sources/estimation/tests/testPDF.exe
/mex/sources/estimation/libmat/tests/test-qr
/mex/sources/estimation/libmat/tests/test-qr.exe
/mex/sources/estimation/libmat/tests/test-gsd
/mex/sources/estimation/libmat/tests/test-gsd.exe
/mex/sources/estimation/libmat/tests/test-lu
/mex/sources/estimation/libmat/tests/test-lu.exe
/mex/sources/estimation/libmat/tests/test-repmat
/mex/sources/estimation/libmat/tests/test-repmat.exe

# MacOS stuff
.DS_Store

# MS-Sbvar
/contrib/ms-sbvar/*.prn
/contrib/ms-sbvar/*.dat
/contrib/ms-sbvar/sbvar_commandline
/contrib/ms-sbvar/sbvar_init_file
/tests/ms-sbvar/*.tmp

# Reporting
*synctex.gz
tests/reporting/tmpRepDir

# Julia Tests
tests/julia/rbc/rbc*.jl

# Octave variables saved when Octave crashes
octave-workspace
# Created when building the reference manual
/doc/manual/utils/__pycache__/*

# Created by the Windows package build script
/windows/deps/lib64/
/windows/deps/lib64-msys2/
/windows/deps/matlab64/
/windows/deps/mingw64/
/windows/deps/octave64/
/windows/deps/sources64/
/windows/deps/tarballs/
/windows/exe/
/windows/7z/
/windows/zip/
/matlab/preprocessor64/
/matlab/supported_octave_version.m

# Created by the macOS package build script
/macOS/deps/arm64/sources64/
/macOS/deps/x86_64/sources64/
/macOS/deps/tarballs/
/macOS/deps/arm64/lib64/
/macOS/deps/x86_64/lib64/
build-doc

# Emacs stuff
TAGS
scripts/dynare.elc

.gitlab-ci.yml

0 → 100644
+279 −0
Original line number Diff line number Diff line
variables:
  GIT_SUBMODULE_STRATEGY: recursive
  TERM: linux
  MATLAB_VERSION: R2024b
  OLD_MATLAB_VERSION: R2020a
  # 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'

# The next stanza creates the version number used for the source tarball and the
# binary packages. Here are the following possible cases:
# - if VERSION was already set (when manually running a pipeline), use it
# - if we are in the official Dynare repository:
#   + if on a tag: use the tag
#   + if on master: use 7-unstable-$TIMESTAMP-$COMMIT
#   + on another branch: use $BRANCH-$TIMESTAMP-$COMMIT
# - if in a personal repository: use $USER-$TIMESTAMP-$COMMIT
before_script:
  - 'if [[ -z $VERSION ]] && [[ $CI_PROJECT_NAMESPACE == Dynare ]] && [[ -n $CI_COMMIT_TAG ]]; then export VERSION=$CI_COMMIT_TAG; fi'
  - 'if [[ -z $VERSION ]] && [[ $CI_PROJECT_NAMESPACE == Dynare ]] && [[ $CI_COMMIT_REF_NAME == master ]]; then export VERSION=7-unstable-$(date +%F-%H%M)-$CI_COMMIT_SHORT_SHA; fi'
  - 'if [[ -z $VERSION ]] && [[ $CI_PROJECT_NAMESPACE == Dynare ]]; then export VERSION=$CI_COMMIT_REF_NAME-$(date +%F-%H%M)-$CI_COMMIT_SHORT_SHA; fi'
  - 'if [[ -z $VERSION ]]; then export VERSION=$CI_PROJECT_NAMESPACE-$(date +%F-%H%M)-$CI_COMMIT_SHORT_SHA; fi'

stages:
  - build
  - test
  - pkg
  - sign
  - deploy

build_matlab:
  stage: build
  script:
    - meson setup -Dbuild_for=matlab -Dmatlab_path=/opt/MATLAB/$MATLAB_VERSION --buildtype=release -Db_lto=true build-matlab
    - meson compile -v -C build-matlab
  artifacts:
    paths:
      - build-matlab/
    expire_in: 3 days

build_octave:
  stage: build
  script:
    - meson setup -Dbuild_for=octave --buildtype=release -Db_lto=true build-octave
    - meson compile -v -C build-octave
  artifacts:
    paths:
      - build-octave/
    expire_in: 3 days

build_doc:
  stage: build
  script:
    - meson rewrite kwargs set project / version "$VERSION"
    # Use a local copy of MathJax to avoid using CDN (which are a privacy issue)
    # NB: Debian 12 “Bookworm” has MathJax 2. The following needs to be updated
    #     when Debian moves to MathJax 3.
    - meson setup -Dbuild_for=octave -Dmathjax_path=mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML build-doc
    - meson compile -v -C build-doc doc
    - cp -dR /usr/share/javascript/mathjax build-doc/dynare-manual.html/_static/
  artifacts:
    paths:
      - build-doc/
    expire_in: 3 days

pkg_source:
  stage: pkg
  script:
    - meson rewrite kwargs set project / version "$VERSION"
    - git commit -a -m "Source for $VERSION"
    - meson setup -Dbuild_for=octave build-src
    - meson dist -C build-src --no-tests
  artifacts:
    paths:
      - build-src/meson-dist/dynare-*.tar.xz
    expire_in: 3 days
  needs: []

pkg_windows:
  stage: pkg
  script:
    - meson rewrite kwargs set project / version "$VERSION"
    - mkdir -p windows/deps/tarballs && cp /usr/lib/dynare-runner/matlab64-* windows/deps/tarballs/
    - make -C windows
    - rm windows/deps/tarballs/matlab64-* # No need to cache these files
  cache:
    - key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
      paths:
        - windows/deps/sources64/
        - windows/deps/lib64/
        # We do not cache lib64-msys2, mingw64, octave64 and
        # matlab64, because those are simply extracted from a tarball. It
        # would be a waste of space and of (re-compression) time.
    - key: $CI_JOB_NAME
      # This cache is shared between all branches, to save space
      paths:
        - windows/deps/tarballs/
  artifacts:
    paths:
      - windows/exe/*
      - windows/7z/*
      - windows/zip/*
    expire_in: 3 days
  needs: [ "build_doc" ]

pkg_macOS_x86_64:
  stage: pkg
  script:
    # 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"
    - ln -s ~/tarballs macOS/deps/
    - gmake -C macOS build-x86_64
  cache:
    key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
    paths:
      - macOS/deps/x86_64/sources64/
      - macOS/deps/x86_64/lib64/
  tags:
    - macOS
  artifacts:
    paths:
      - macOS/pkg/*
    expire_in: 3 days
  needs: [ "build_doc" ]

pkg_macOS_arm64:
  stage: pkg
  script:
    # 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"
    - ln -s ~/tarballs macOS/deps/
    - make -C macOS build-arm64
  cache:
    key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
    paths:
      - macOS/deps/arm64/sources64/
      - macOS/deps/arm64/lib64/
  tags:
    - macOS
  artifacts:
    paths:
      - macOS/pkg/*
    expire_in: 3 days
  needs: [ "build_doc" ]

pkg_matlab_online:
  stage: pkg
  rules:
    - if: '$CI_PROJECT_NAMESPACE == "Dynare" && $CI_COMMIT_REF_NAME == "master"'
      when: on_success
    # Avoid the creation of merge request pipelines containing only that job
    # (other jobs either have no “rules” and are thus not considered in merge
    # request pipelines, or have “rules” but are explicitly disabled in merge
    # request pipelines; additionally, we have no “workflow” stanza)
    # See https://docs.gitlab.com/ci/pipelines/merge_request_pipelines/
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
      when: never
    - when: manual
      allow_failure: true
  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: []

test_matlab:
  stage: test
  script:
    - meson test -C build-matlab --no-rebuild --num-processes $(($(nproc) * 3 / 4))
  artifacts:
    paths:
      - build-matlab/meson-logs/testlog.txt
    when: always
  needs: [ "build_matlab" ]

test_old_matlab:
  stage: test
  script:
    - meson setup -Dbuild_for=matlab -Dmatlab_path=/opt/MATLAB/$OLD_MATLAB_VERSION --buildtype=release -Db_lto=true build-old-matlab
    - meson compile -v -C build-old-matlab
    - meson test -C build-old-matlab --num-processes $(($(nproc) * 3 / 4))
  artifacts:
    paths:
      - build-old-matlab/meson-logs/testlog.txt
    when: always
  needs: []
  when: manual

test_octave:
  stage: test
  variables:
    OPENBLAS_NUM_THREADS: 1
  script:
    - meson test -C build-octave --no-rebuild
  artifacts:
    paths:
      - build-octave/meson-logs/testlog.txt
    when: always
  needs: [ "build_octave" ]
  when: manual

test_clang_format:
  stage: test
  script:
    - meson setup -Dbuild_for=octave build-clang-format
    - ninja -C build-clang-format clang-format-check
  needs: []

test_clang_tidy:
  stage: test
  script:
    - 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
# don’t want those jobs to start before the “test” and “pkg” stages have
# succeeded. Hence we stick to the “dependencies” keyword.

sign_windows:
  stage: sign
  rules:
    - if: '$CI_PROJECT_NAMESPACE == "Dynare" && $CI_COMMIT_REF_NAME == "master"'
      when: on_success
    - when: never
  tags:
    - sign
  dependencies:
    - pkg_windows
  script:
    - f=(windows/exe/*) && mkdir -p windows/exe-signed/ && osslsigncode sign -pkcs11module /usr/lib/x86_64-linux-gnu/libykcs11.so.2 -key "pkcs11:id=%01;type=private;pin-value=$YUBIKEY_PIN" -certs ~/cepremap-code-signing-comodo-sectigo.pem -n Dynare -i https://www.dynare.org -t http://timestamp.comodoca.com -in ${f[0]} -out windows/exe-signed/${f[0]##*/}
  artifacts:
    paths:
      - windows/exe-signed/*
    expire_in: 3 days

deploy_manual_unstable:
  stage: deploy
  rules:
    - if: '$CI_PROJECT_NAMESPACE == "Dynare" && $CI_COMMIT_REF_NAME == "master"'
      when: on_success
    - when: never
  tags:
    - deploy
  dependencies:
    - build_doc
  script:
    - rsync --recursive --links --delete build-doc/dynare-manual.html/ /srv/www.dynare.org/manual-unstable/

deploy_snapshot_unstable:
  stage: deploy
  rules:
    - if: '$CI_PROJECT_NAMESPACE == "Dynare" && $CI_COMMIT_REF_NAME == "master"'
      when: on_success
    - when: never
  tags:
    - deploy
  dependencies:
    - pkg_source
    - pkg_windows
    - sign_windows
    - pkg_macOS_arm64
    - pkg_macOS_x86_64
    - pkg_matlab_online
  script:
    - cp build-src/meson-dist/*.tar.xz /srv/www.dynare.org/snapshot/source/ && ln -sf *.tar.xz /srv/www.dynare.org/snapshot/source/dynare-latest-src.tar.xz
    - f=(windows/exe-signed/*) && cp ${f[0]} /srv/www.dynare.org/snapshot/windows/ && ln -sf ${f[0]##*/} /srv/www.dynare.org/snapshot/windows/dynare-latest-win.exe
    - f=(windows/7z/*) && cp ${f[0]} /srv/www.dynare.org/snapshot/windows-7z/ && ln -sf ${f[0]##*/} /srv/www.dynare.org/snapshot/windows-7z/dynare-latest-win.7z
    - f=(windows/zip/*) && cp ${f[0]} /srv/www.dynare.org/snapshot/windows-zip/ && ln -sf ${f[0]##*/} /srv/www.dynare.org/snapshot/windows-zip/dynare-latest-win.zip
    - f=(macOS/pkg/*-arm64.pkg) && cp ${f[0]} /srv/www.dynare.org/snapshot/macos-arm64/ && ln -sf ${f[0]##*/} /srv/www.dynare.org/snapshot/macos-arm64/dynare-latest-macos-arm64.pkg
    - f=(macOS/pkg/*-x86_64.pkg) && cp ${f[0]} /srv/www.dynare.org/snapshot/macos-x86_64/ && ln -sf ${f[0]##*/} /srv/www.dynare.org/snapshot/macos-x86_64/dynare-latest-macos-x86_64.pkg
    - f=(scripts/matlab-online/*.mltbx) && cp ${f[0]} /srv/www.dynare.org/snapshot/matlab-online/ && ln -sf ${f[0]##*/} /srv/www.dynare.org/snapshot/matlab-online/dynare-latest.mltbx
    - ~/update-snapshot-list.sh
    - curl -X POST -F token="$WEBSITE_PIPELINE_TRIGGER_TOKEN" -F ref=master https://git.dynare.org/api/v4/projects/40/trigger/pipeline
+11 −21
Original line number Diff line number Diff line
[submodule "contrib/ms-sbvar/utilities_dw"]
	path = contrib/ms-sbvar/utilities_dw
	url = http://www.dynare.org/git/frbatlanta/utilities_dw.git
	url = ../../contrib/utilities_dw.git
[submodule "contrib/ms-sbvar/switch_dw"]
	path = contrib/ms-sbvar/switch_dw
	url = http://www.dynare.org/git/frbatlanta/switch_dw.git
	url = ../../contrib/switch_dw.git
[submodule "contrib/ms-sbvar/TZcode"]
	path = contrib/ms-sbvar/TZcode
	url = http://www.dynare.org/git/frbatlanta/TZcode.git
[submodule "contrib/dmm"]
	path = contrib/dmm
	url = http://www.dynare.org/git/dmm.git
	url = ../../contrib/TZcode.git
[submodule "matlab/utilities/tests"]
	path = matlab/utilities/tests
	url = https://github.com/DynareTeam/m-unit-tests.git
[submodule "matlab/particles"]
	path = matlab/particles
	url = https://github.com/DynareTeam/particles.git
[submodule "matlab/modules/dates"]
	path = matlab/modules/dates
	url = https://github.com/DynareTeam/dates.git
	branch = old-oop-style
[submodule "matlab/modules/dseries"]
	path = matlab/modules/dseries
	url = https://github.com/DynareTeam/dseries.git
	branch = old-oop-style
[submodule "matlab/modules/reporting"]
	path = matlab/modules/reporting
	url = https://github.com/DynareTeam/reporting.git
 No newline at end of file
	url = ../../Dynare/m-unit-tests.git
[submodule "matlab/dseries"]
	path = matlab/dseries
	url = ../../Dynare/dseries.git
	branch = master
[submodule "preprocessor"]
	path = preprocessor
	url = ../../Dynare/preprocessor.git

CODE_OF_CONDUCT.md

0 → 100644
+133 −0
Original line number Diff line number Diff line
# Dynare Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
  and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
  community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
  any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
  without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
  professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[community@dynare.org](mailto:community@dynare.org).
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
+74 −35
Original line number Diff line number Diff line
@@ -2,59 +2,66 @@

## Introduction

Hello from the Dynare Team! We're happy you're on this page because hopefully that means you're thinking of getting directly involved with the Dynare project. Herein, we outline how you can contribute to Dynare. Please read this document all the way through before contributing.
Hello from the Dynare Team! Were happy youre on this page because hopefully that means youre thinking of getting directly involved with the Dynare project. Herein, we outline how you can contribute to Dynare. Please read this document all the way through before contributing.

Please follow the steps in the sections below in order. Note that, though we'd love for you to contribute code, you don't need to be a programmer to contribute to Dynare. You can report bugs, ask for enhancements, fix typos in the manual, contribute tests to the test suite, or do something we haven't thought of yet!
Please follow the steps in the sections below in order. Note that, though wed love for you to contribute code, you dont need to be a programmer to contribute to Dynare. You can report bugs, ask for enhancements, fix typos in the manual, contribute tests to the test suite, or do something we havent thought of yet!

If something is not clear, don't hesitate to ask if you can't find the answer online. You can contact us directly at [dev@dynare.org](mailto:dev@dynare.org).
If something is not clear, dont hesitate to ask if you cant find the answer online. You can contact us directly at [dev@dynare.org](mailto:dev@dynare.org).

Please note that the repositories under the purview of this page are:

* [Dynare](https://github.com/DynareTeam/dynare)
* [Particles](https://github.com/DynareTeam/particles)
* [Dates](https://github.com/DynareTeam/dates)
* [Dseries](https://github.com/DynareTeam/dseries)
* [Reporting](https://github.com/DynareTeam/reporting)
* [Testsuite](https://github.com/DynareTeam/testsuite)
* [M-unit-tests](https://github.com/DynareTeam/m-unit-tests)
* [Dynare](https://git.dynare.org/Dynare/dynare)
* [Preprocessor](https://git.dynare.org/Dynare/preprocessor)
* [Dseries](https://git.dynare.org/Dynare/dseries)
* [Reporting](https://git.dynare.org/Dynare/reporting)
* [M-unit-tests](https://git.dynare.org/Dynare/m-unit-tests)

## Making your Intentions Known

Before making changes to the codebase, it'd be helpful if you communicated your intentions with us. This will avoid double work and ensure that you don't contribute code that won't be included in Dynare for one reason or another. The way to communicate with us is via [GitHub Issues](https://guides.github.com/features/issues/).
Before making changes to the codebase, it’d be helpful if you communicated your intentions with us. This will avoid double work and ensure that you don’t contribute code that won’t be included in Dynare for one reason or another.

### Create your account on our GitLab instance

All the development of Dynare happens in [GitLab](https://about.gitlab.com/), which is an integrated environment for storing code under git, keeping track of issues and milestones, and perform testing. The Dynare Team has its own instance of GitLab.

In order to work with us, you need to create your account on our GitLab instance on the [register page](https://git.dynare.org/users/sign_in). Note that account requests are manually validated, so be prepared to wait for a couple of hours or days before your account is created; if your account request is rejected, do not hesitate to contact us directly.

You will also need to register your SSH key in your GitLab profile if you want to contribute code.

### Issues: Reporting Bugs

You can report bugs in both the stable and unstable versions of Dynare. Before reporting a bug in the stable version of Dynare, please check the [Known Bugs](http://www.dynare.org/DynareWiki/KnownBugs) page to ensure it has not already been encountered/fixed. If reporting a bug in the unstable version of Dynare, please ensure the bug exists in the latest [unstable Dynare snapshot](http://www.dynare.org/download/dynare-unstable).
You can report bugs in both the stable and unstable versions of Dynare. Before reporting a bug in the stable version of Dynare, please check the [Known Bugs](https://git.dynare.org/Dynare/dynare/wikis/Known-bugs-present-in-the-current-stable-version) page to ensure it has not already been encountered/fixed. If reporting a bug in the unstable version of Dynare, please ensure the bug exists in the latest [unstable Dynare snapshot](https://www.dynare.org/download/#snapshot).

To report a bug in Dynare, simply open a GitHub issue in the repository where the bug resides. For example, to report a bug in Dynare itself, go to the [Dynare repository issue page](https://github.com/DynareTeam/dynare/issues) and click on "New Issue."
To report a bug in Dynare, simply open a Gitlab issue in the repository where the bug resides. For example, to report a bug in Dynare itself, go to the [Dynare repository issue page](https://git.dynare.org/Dynare/dynare/issues) and click on "New Issue."

The minimal information to add is a subject and a description of the steps needed to reproduce the bug. However, the most helpful description would also provide the code to reproduce the bug (often times a `.mod` file). The most helpful `.mod` file is a minimal, quick-running example that reproduces the bug, but we'll take anything that will help us squash a bug.
The minimal information to add is a subject and a description of the steps needed to reproduce the bug. However, the most helpful description would also provide the code to reproduce the bug (often times a `.mod` file). The most helpful `.mod` file is a minimal, quick-running example that reproduces the bug, but well take anything that will help us squash a bug.

To include short amounts of code, please paste it into the description box, using the appropriate [GitHub markdown](https://help.github.com/articles/github-flavored-markdown/) code. For larger amounds of code like `.mod` files, please create a new [GitHub Gist](https://gist.github.com) and provide the link in the description box.
To include short amounts of code, please paste it into the description box, using the appropriate [GitLab Flavored Markdown](https://docs.gitlab.com/ee/user/markdown.html) code. For larger amounds of code like `.mod` files, please create a new [GitLab snippet](https://git.dynare.org/dashboard/snippets) and provide the link in the description box.

### Issues: Enhancements

Issues are not only used to report bugs. They are also used to ask for improvements to the codebase or new features to Dynare in general. Please be descriptive when asking for improvements or new features. Links or references to papers or detailed examples are helpful.

Though our development priorities lay with those who finance Dynare and with what we think may most benefit the Dynare community, this does not mean we are closed to outside ideas for enhancements. On the contrary: we invite them! Moreover, if you are willing to program the enhancement you want, the odds of it being included in Dynare are much higher than if you needed us to do it. That said, it is best to create an issue with an enhancement idea **before** beginning the work. As stated above, this is important to avoid duplication of work and also because we wouldn't want you to take the time to work on something that would not end up being included in Dynare.
Though our development priorities lay with those who finance Dynare and with what we think may most benefit the Dynare community, this does not mean we are closed to outside ideas for enhancements. On the contrary: we invite them! Moreover, if you are willing to program the enhancement you want, the odds of it being included in Dynare are much higher than if you needed us to do it. That said, it is best to create an issue with an enhancement idea **before** beginning the work. As stated above, this is important to avoid duplication of work and also because we wouldnt want you to take the time to work on something that would not end up being included in Dynare.

## Get to Coding!

So, now you've reported the bug or asked for an enhancemnt by creating a GitHub issue. That's already a great help. Thank you!
So, now youve reported the bug or asked for an enhancemnt by creating a GitLab issue. Thats already a great help. Thank you!

Now, if you want to go the extra mile, you'll volunteer to contribute code to fix the GitHub issue you created above. Once we've agreed that you'll do it, please do the following:
Now, if you want to go the extra mile, youll volunteer to contribute code to fix the GitLab issue you created above. Once weve agreed that youll do it, please do the following:

1. Clone the Dynare repository:
   * `git clone https://github.com/DynareTeam/dynare.git`
1. [Fork the Dynare repository](https://help.github.com/articles/fork-a-repo)
   * `git clone --recurse-submodules https://git.dynare.org/Dynare/dynare.git`
1. [Fork the Dynare repository](https://docs.gitlab.com/ee/gitlab-basics/fork-project.html)
1. Change into the `dynare` folder and add the forked repository as a remote:
   * `cd dynare`
   * `git remote add personal https://github.com/<<GitHub username>>/dynare.git`
   * `git remote add personal git@git.dynare.org:<<GitLab username>>/dynare.git`
1. Create a branch to work on
   * `git checkout -b <<descriptive branch name>>`
1. Do your work, all the while respecting the [Dynare Coding Standards](http://www.dynare.org/DynareWiki/CodingStandards)
1. Do your work, all the while respecting the [Dynare Coding Guidelines](https://git.dynare.org/Dynare/dynare/-/wikis/CodingGuidelines)
1. You may also want to have a look at the [coding resources](https://git.dynare.org/Dynare/dynare/-/wikis/CodingResources)

As you work, your forked repository will likely fall out of sync with the main Dynare repository as we'll be working in parallel. No matter. Follow these steps to ensure your changes will be merge-able when they're done:
As you work, your forked repository will likely fall out of sync with the main Dynare repository as well be working in parallel. No matter. Follow these steps to ensure your changes will be merge-able when theyre done:

1. Get the changes from the main Dynare repository:
   * `git checkout master`
@@ -65,29 +72,61 @@ As you work, your forked repository will likely fall out of sync with the main D
   * `git rebase origin/master`
   * This last command may cause a conflict. It is up to you to resolve this conflict.

Once you've made the changes necessary to fix the bug or add an enhancement, ensure that it has been rebased on the master branch (following the steps above), commit it, push it to your forked Dynare repository, and create a pull request:
Once youve made the changes necessary to fix the bug or add an enhancement, ensure that it has been rebased on the master branch (following the steps above), commit it, push it to your forked Dynare repository, and create a pull request:

1. Get the latest changes from Dynare and rebase your branch on top of them (see above)
1. Commit your changes:
   * `git add <<files to commit>>`
   * `git commit -m "<<descriptive commit message.>> Closes #<<Ref. to GitHub issue number fixed by this commit>>"`
   * `git commit -m "<<descriptive commit message.>> Closes: #<<Ref. to GitLab issue number fixed by this commit>>"`
1. Push to your forked Dynare repository
   * `git push personal <<descriptive branch name>>`
1. Create a [Pull Request](https://help.github.com/articles/creating-a-pull-request/) from the branch in your forked Dynare repository
1. Create a [Merge Request](https://docs.gitlab.com/ee/gitlab-basics/add-merge-request.html) from the branch in your forked Dynare repository

## Tests

The Dynare Test Suite runs nightly. It's how we quickly catch bugs that may have been introduced by changes made during the day. The output from the test suite can be found here: [http://www.dynare.org/testsuite/master/](http://www.dynare.org/testsuite/master/). This is also a good place to start fixing bugs. If you see a `.mod` file that doesn't run in the test suite and think you can fix it, create an issue and once you have the go ahead, go for it!
The Dynare testsuite runs every time a commit is pushed, either in the official repository or in your personal repository, through [GitLab Continuous Integration](https://docs.gitlab.com/ee/ci/). It’s how we quickly catch bugs that may have been introduced by changes made.

### Test `.mod` File
The output from the latest run of the test suite can be found in the `test_matlab` job associated to the [latest pipeline](https://git.dynare.org/Dynare/dynare/pipelines). This is also a good place to start fixing bugs. If you see a `.mod` file that doesn’t run in the test suite and think you can fix it, create an issue and once you have the go ahead, go for it!

It's useful to contribute `.mod` files that test some aspect of Dynare that is not currently tested. A `.mod` file that runs into a bug is perfect. As the test suite currently takes several hours to run, we prefer you modify a current test to also create the bug you've found. If you can't do that, please add a new test that runs as quickly as possible. It will contain only those commands necessary to create the bug, nothing more. To contribute a test, after having made an issue and cloned and forked the repository as described above, do the following:
### Integration tests

1. Modify the `MODFILES` variable in `tests/Makefile.am` with a line containing your test file name
1. If any ancillary files are needed to run your test, please include them in the `EXTRA_DIST` variable in `tests/Makefile.am`
1. Add and commit your test file and `tests/Makefile.am` as described above
1. Push and create a pull request as described above
It’s useful to contribute `.mod` files that test some aspect of Dynare that is not currently tested. A `.mod` file that runs into a bug is perfect. As the test suite currently takes several hours to run, we prefer you modify a current test to also create the bug you’ve found. If you can’t do that, please add a new test that runs as quickly as possible. It will contain only those commands necessary to create the bug, nothing more. To contribute a test, after having made an issue and cloned and forked the repository as described above, do the following:

NB: Please do not contribute non-text files (e.g. `.xls`). If you absolutely need such a file for your test to run, please contact us to see how to go about contributing it.
1. Modify the `mod_and_m_tests` variable in `meson.build` with a entry containing your test file name
1. If any ancillary files are needed to run your test, please include them in the `'extra'` field
1. Add and commit your test file and `meson.build` as described above
1. Push and create a pull request as described above

### Unitary Tests
### Unit tests

So-called unit tests allow the test suite to check the correct functioning of the MATLAB/Octave functions contained in Dynare. To add a unit test you need to
1. add the `return % --*-- Unit tests --*--` at the end of the `function` to tell the testsuite that the file contains unit tests.
1. Add the particular tests at the end of the file after the `return` statement by
   1. Starting a test with `%@test:INTEGER`
   2. Adding a MATLAB/Octave test code that provides a pass/fail indicator `T` that takes on `true` if the test passed.
   3. Closing the test with `%@eof:INTEGER`
   where `INTEGER` denotes the number of the test.

An example testing the correct functionality of mode-computations for a normal distribution is

```
function m = compute_prior_mode(hyperparameters,shape)

return  % --*-- Unit tests --*--

%@test:1
% Normal density
try
    m1 = compute_prior_mode([1 1],3);
    t(1) = true;
catch
    t(1) = false;
end
%$
if t(1)
    t(2) = dassert(m1,1,1e-6);
end
T = all(t);
%@eof:1
```
You can also put a unit test after the closing `end`, but in this case you will need to preface each line with `%$`. See e.g.  https://git.dynare.org/Dynare/dseries/-/commit/be4a4d39c125b92ee84ef876d86e6ec947c522b8
+4 −4
Original line number Diff line number Diff line
                    GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

@@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

@@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
<https://www.gnu.org/licenses/>.

  The GNU General Public License does not permit incorporating your program
into proprietary programs.  If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.  But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<https://www.gnu.org/licenses/why-not-lgpl.html>.

Makefile.am

deleted100644 → 0
+0 −62
Original line number Diff line number Diff line
SUBDIRS = preprocessor doc tests mex/sources

if HAVE_BLAS
if HAVE_LAPACK
if HAVE_MATIO
SUBDIRS += dynare++
endif
endif
endif

# MEX must be built after dynare++ (because of kordepert)
if ENABLE_MATLAB
SUBDIRS += mex/build/matlab
endif
if ENABLE_OCTAVE
SUBDIRS += mex/build/octave
endif

ACLOCAL_AMFLAGS = -I m4

EXTRA_DIST = \
	matlab \
	contrib \
	NEWS \
	license.txt \
	README.md \
	COPYING \
	CONTRIBUTING.md \
	windows/dynare.nsi \
	windows/mexopts-win32.bat \
	windows/mexopts-win64.bat \
	windows/README.txt \
	osx \
	examples \
	scripts \
	.dir-locals.el

dist-hook:
	rm -rf `find $(distdir)/matlab $(distdir)/examples -name *~`
	rm -rf $(distdir)/matlab/preprocessor* $(distdir)/matlab/dynare_version.m
	$(MKDIR_P) $(distdir)/mex/matlab $(distdir)/mex/octave
	rm -rf `find $(distdir)/contrib -name '.git*'`

install-exec-local:
	$(MKDIR_P) $(DESTDIR)$(pkglibdir)/contrib/ms-sbvar/TZcode
	cp -r contrib/ms-sbvar/TZcode/MatlabFiles $(DESTDIR)$(pkglibdir)/contrib/ms-sbvar/TZcode
	cp -r examples $(DESTDIR)$(pkglibdir)
	cp -r matlab $(DESTDIR)$(pkglibdir)
	rm -rf $(DESTDIR)$(pkglibdir)/matlab/preprocessor*
	{ \
	if [ -z "`file preprocessor/dynare_m | grep x86.64`" ]; then \
	  ARCH="32"; \
	else \
	  ARCH="64"; \
	fi; \
	mkdir -p $(DESTDIR)$(pkglibdir)/matlab/preprocessor$$ARCH; \
	cp preprocessor/dynare_m $(DESTDIR)$(pkglibdir)/matlab/preprocessor$$ARCH; \
	}

uninstall-local:
	rm -f  $(DESTDIR)$(bindir)/dynare++
	rm -rf $(DESTDIR)$(pkglibdir)

NEWS

deleted100644 → 0
+0 −1129

File deleted.

Preview size limit exceeded, changes collapsed.

NEWS.md

0 → 100644
+4173 −0

File added.

Preview size limit exceeded, changes collapsed.

+458 −157

File changed.

Preview size limit exceeded, changes collapsed.

+0 −75
Original line number Diff line number Diff line
In branch extended-preprocessor, we develop a version of Dynare
preprocessor that produces C and Cuda routine that can be later
linked within another program.

* dynare_m options
- new option output=dynamic|first|second|third
  - output=dynamic generates <fname>_dynamic
  - output=first generates <fname>_first_derivatives
  - output=second generates <fname>_first_derivatives and <fname>_second_derivatives
  - output=third generates <fname>_first_derivatives,
    <fname>_second_derivatives and <fname>_third_derivatives
  - routine <fname>_static is always generated
  - routine <fname>_steady_state is generated if the *.mod file contains a
    steady_state_model block
  - routine <fname>_auxiliary_variables_steady_state is always
    generated but doesn't contain any instruction is the preprocessor
    didn't add any auxiliary variable
* Functions
- <fname>_model: returns a structure containting fields describing
  the model, analogous to the M_ structure in Dynare. This structure
  is defined in dynare_model.h and must be accessible when compiling
  the second stage program.
- <fname>_dynamic: the historical Dynare dynamic function, returns
  residuals, first, second and third order derivatives of the model,
  if needed.
- <fname>_static: the historical Dynare static function, returns
  residuals of the static model
- <fname>_steady_state: a function computing the steady state of the
  model, given the parameters. It comes from parsing a
  steady_state_model block in the *.mod file. Currently, there is no provision for
  calling a non-linear solver for a subset of equations/variables.
- <fname>_auxiliary_variables_steady_state: a function to compute the steady state
  values of auxiliary variables automatically added by the
  preprocessor
- <fname>_first_derivatives: returns the Jacobian of the model at the steady
  state, given the
  steady state. It is more efficient than <fname>_dynamic. Doesn't
  exist in Dynare yet.
- <fname>_second_derivatives: returns the second order derivatives of
  the model. There are as many rows as equations and as many column
  as the square of the number of endogenous and exogenous
  variables. The matrix is stored in compressed sparse row format. It
  is more efficient than compressed column format as there many more
  columns than rows and many columns are empty. Note that the
  transpose of the second derivatives matrix in compressed column
  format can be obtained directly from the same function by inverting
  the role of the two index vectors.
- <fname>_third_derivatives: returns the third order derivatives of
  the model. See above for the storage format of this matrix.
* Implementation
** C++ version
- the routines use C++ and classes from the STL
** Cuda version
- the routines have the __global__ keyword necessary to create CUDA
  kernls
- vector addressing uses a stride parameter to allow for various
  storage schemes on the device  
* Changes with dynare-msdsge
  - removed erasing previous files as all files should be always
    written to faciliate application building
  - added back creating variables with the parameter name (otherwise
    it doesn't work in Matlab backend) TO BE FIXED
* Pre-processor
  - in DynareMain2.cc, in main2() option output != none calls ModFile::write_external_files() 
  - in ModFile.cc, ModFile::writeExternalFiles() calls
    - ModFile::writeModelCC()
    - SteadyStateMode::writeSteadyStateFileCC()
    - DynamicModel::writeDynamicFile()
    - StaticModel::writeStaticFile()
    - DynamicModel::writeResidualsCC()
    - DynamicModel::writeParamsDerivativesFileCC()
    - DynamicModel::writeFirstDerivativesCC()
    - DynamicModel::writeSecondDerivativesCC_csr()
    - DynamicModel::writeThirdDerivativesCC_csr()

configure.ac

deleted100755 → 0
+0 −335
Original line number Diff line number Diff line
dnl Process this file with autoconf to produce a configure script.

dnl Copyright (C) 2009-2016 Dynare Team
dnl
dnl This file is part of Dynare.
dnl
dnl Dynare is free software: you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation, either version 3 of the License, or
dnl (at your option) any later version.
dnl
dnl Dynare is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with Dynare.  If not, see <http://www.gnu.org/licenses/>.

AC_PREREQ([2.62])
AC_INIT([dynare], [4.5-unstable])
AC_CONFIG_SRCDIR([preprocessor/DynareMain.cc])
AM_INIT_AUTOMAKE([1.11 -Wall -Wno-portability foreign no-dist-gzip dist-xz tar-pax])

AC_PROG_CC
AC_PROG_CXX

AC_CANONICAL_HOST
case ${host_os} in
  *mingw32*)
    # On mingw32, we don't want dynamic libgcc
    # Note that static-libstdc++ is only supported since GCC 4.5 (but generates no error on older versions)
    LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++ -static-libgfortran"
    have_windows="yes"
    ;;
  *cygwin*)
    AC_MSG_WARN([You are compiling for the Cygwin target. This means that the preprocessor will])
    AC_MSG_WARN([not run from MATLAB unless you add the Cygwin DLL to the path.])
    AC_MSG_WARN([This is probably not what you want. Consider using a MinGW cross-compiler.])
    if test "x$F77" = "x"; then
      # On Cygwin 1.7, g77 comes has version 3, and is not compatible with default gcc/g++ which has version 4
      # And by default, the AC_PROG_F77 will pick up g77 if it is present (even if gfortran is also here)
      F77=gfortran
    fi
    have_windows="yes"
    ;;
esac

# Use C++ for testing headers
AC_LANG([C++])

CXXFLAGS="$CXXFLAGS -Wall -Wno-parentheses"

# If default 'ar' is not available, try to find one with a host prefix (see ticket #145)
AC_CHECK_PROGS([AR], [ar ${host_alias}-ar])

AC_PROG_RANLIB
AM_PROG_AR

AX_PROG_LN_S

AC_PROG_MKDIR_P

AM_PROG_LEX
# Hack to get lex include dir, ticket #575
AC_PATH_PROG([LEXPATH], [$LEX])
AC_SUBST([LEXINC], [`eval "echo $LEXPATH | sed 's|\(.*\)$LEX$|\1../include|'"`])

AC_CHECK_PROG([YACC], [bison], [bison])
if test "x$YACC" = "x"; then
  unset YACC # AM_MISSING_PROG needs an unset variable: an empty variable won't do
  AM_MISSING_PROG([YACC], [bison])
fi

# We need 1.36 because of unordered_{set,hash} used by Dynare++
AX_BOOST_BASE([1.36], [], [AC_MSG_ERROR([Can't find Boost >= 1.36])])

CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
AC_CHECK_HEADERS([boost/graph/adjacency_list.hpp], [], [AC_MSG_ERROR([Can't find Boost Graph Library])])
AC_CHECK_HEADERS([boost/algorithm/string/trim.hpp], [], [AC_MSG_ERROR([Can't find Boost String Library])])
AC_CHECK_HEADERS([boost/algorithm/string/split.hpp], [], [AC_MSG_ERROR([Can't find Boost String Library])])
AC_CHECK_HEADERS([boost/lexical_cast.hpp], [], [AC_MSG_ERROR([Can't find Boost Lexical Cast Header])])
CPPFLAGS="$CPPFLAGS_SAVED"

# Don't use deprecated hash structures
AC_DEFINE([BOOST_NO_HASH], [], [Don't use deprecated STL hash structures])

# Check for dlopen(), needed by tests for estimation DLL
AC_CHECK_LIB([dl], [dlopen], [LIBADD_DLOPEN="-ldl"], [])
AC_SUBST([LIBADD_DLOPEN])

# Check for libmatio, needed by Dynare++
AX_MATIO
AM_CONDITIONAL([HAVE_MATIO], [test "x$has_matio" = "xyes"])

AC_CHECK_PROG([MAKEINFO], [makeinfo], [makeinfo])

AC_CHECK_PROG([PDFTEX], [pdftex], [pdftex])
AM_CONDITIONAL([HAVE_PDFTEX], [test "x$PDFTEX" != "x"])

AC_CHECK_PROG([PDFETEX], [pdfetex], [pdfetex])
AM_CONDITIONAL([HAVE_PDFETEX], [test "x$PDFETEX" != "x"])

if test "x$PDFTEX" != "x"; then
  AC_MSG_CHECKING([for eplain])
  AX_TEX_TEST([\input eplain
\end
], [ax_tex_have_eplain])
  AC_MSG_RESULT([$ax_tex_have_eplain])
fi
AM_CONDITIONAL([HAVE_EPLAIN], [test "x$ax_tex_have_eplain" = "xyes"])

AC_CHECK_PROG([PDFLATEX], [pdflatex], [pdflatex])
AM_CONDITIONAL([HAVE_PDFLATEX], [test "x$PDFLATEX" != "x"])

AC_CHECK_PROG([BIBTEX], [bibtex], [bibtex])
AM_CONDITIONAL([HAVE_BIBTEX], [test "x$BIBTEX" != "x"])

AC_CHECK_PROG([TEXI2HTML], [texi2html], [texi2html])
AM_CONDITIONAL([HAVE_TEXI2HTML], [test "x$TEXI2HTML" != "x"])

AC_CHECK_PROG([LATEX2HTML], [latex2html], [latex2html])
AM_CONDITIONAL([HAVE_LATEX2HTML], [test "x$LATEX2HTML" != "x"])

if test "x$PDFLATEX" != "x" -a "x$BIBTEX" != "x"; then
  AX_LATEX_CLASS([beamer], [ax_latex_have_beamer])
fi
AM_CONDITIONAL([HAVE_BEAMER], [test "x$ax_latex_have_beamer" = "xyes"])

AC_CHECK_PROG([DOXYGEN], [doxygen], [doxygen])
AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$DOXYGEN" != "x"])

AC_CHECK_PROG([CTANGLE], [ctangle], [ctangle])
AM_CONDITIONAL([HAVE_CTANGLE], [test "x$CTANGLE" != "x"])
if test "x$CTANGLE" = "x"; then
  unset CTANGLE # AM_MISSING_PROG needs an unset variable: an empty variable won't do
  AM_MISSING_PROG([CTANGLE], [ctangle])
fi

AC_CHECK_PROG([CWEAVE], [cweave], [cweave])
AM_CONDITIONAL([HAVE_CWEAVE], [test "x$CWEAVE" != "x"])

AC_PROG_F77
AC_F77_LIBRARY_LDFLAGS
case ${host_os} in
  *mingw32*)
    # Hack to get static linking of libgfortran on MinGW
    # (-static-libgfortran doesn't act on gcc/g++)
    FLIBS=`echo $FLIBS | sed 's/-lgfortran/-Wl,-Bstatic -lgfortran -Wl,-Bdynamic/'`
    ;;
  *darwin*)
    # * OS X doesn't need to link against the Fortran libraries because
    #   everything is contained within the vecLib framework.
    FLIBS=''
    ;;
esac

if test "x$F77" != "x"; then
   AX_BLAS
   AX_LAPACK
fi
AM_CONDITIONAL([HAVE_BLAS], [test x"$ax_blas_ok" = "xyes"])
AM_CONDITIONAL([HAVE_LAPACK], [test x"$ax_lapack_ok" = "xyes"])

case ${host_os} in
  *mingw32*)
    # Ensure that -lpthread is statically linked under MinGW
    PTHREAD_LIBS="-Wl,-Bstatic -lpthread -Wl,-Bdynamic"
    ;;
esac
AX_PTHREAD

AC_CONFIG_FILES([Makefile
                 preprocessor/macro/Makefile
                 preprocessor/Makefile
                 doc/Makefile
                 doc/preprocessor/Makefile
                 doc/macroprocessor/Makefile
                 doc/userguide/Makefile
                 doc/parallel/Makefile
                 doc/internals/Makefile
                 doc/gsa/Makefile
                 doc/dseries-and-reporting/Makefile
                 tests/Makefile
                 matlab/dynare_version.m
                 windows/dynare-version.nsi
                 dynare++/Makefile
                 dynare++/parser/cc/Makefile
                 dynare++/sylv/Makefile
                 dynare++/sylv/cc/Makefile
                 dynare++/sylv/testing/Makefile
                 dynare++/tl/Makefile
                 dynare++/tl/cc/Makefile
                 dynare++/tl/testing/Makefile
                 dynare++/doc/Makefile
                 dynare++/utils/cc/Makefile
                 dynare++/integ/Makefile
                 dynare++/integ/cc/Makefile
                 dynare++/integ/src/Makefile
                 dynare++/integ/testing/Makefile
                 dynare++/kord/Makefile
                 dynare++/src/Makefile
                 mex/sources/Makefile
                 mex/sources/estimation/Makefile
                 mex/sources/estimation/tests/Makefile
                 mex/sources/estimation/libmat/Makefile
                 mex/sources/estimation/libmat/tests/Makefile
])

AC_ARG_ENABLE([matlab], AS_HELP_STRING([--disable-matlab], [disable compilation of MEX files for MATLAB]), [], [enable_matlab=yes])
if test "x$enable_matlab" = "xyes"; then
  AC_CONFIG_SUBDIRS([mex/build/matlab])
  AX_MATLAB
fi
AM_CONDITIONAL([ENABLE_MATLAB], [test "x$enable_matlab" = "xyes"])
AM_CONDITIONAL([HAVE_CMD_LINE_MATLAB], [test "x$ax_enable_matlab" = "xyes" -a "x$have_windows" = "x"])

AC_ARG_ENABLE([octave], AS_HELP_STRING([--disable-octave], [disable compilation of MEX files for Octave]), [], [enable_octave=yes])
if test "x$enable_octave" = "xyes"; then
  AC_CONFIG_SUBDIRS([mex/build/octave])
  AC_CHECK_PROG([OCTAVE], [octave], [octave])
fi
AM_CONDITIONAL([ENABLE_OCTAVE], [test "x$enable_octave" = "xyes"])
AM_CONDITIONAL([HAVE_OCTAVE], [test "x$enable_octave" = "xyes" -a "x$OCTAVE" != "x"])

# Enable exporting of Org files
# The clean way would be to test for Emacs, Org-mode, latex, dvipng...
AC_ARG_ENABLE([org-export], AS_HELP_STRING([--enable-org-export], [enable exporting of Org files (requires Emacs, org-mode and other external programs)]))
AM_CONDITIONAL([ENABLE_ORG_EXPORT], [test "x$enable_org_export" != "x"])

# Construct final output message

BUILD_PREPROCESSOR="yes"

if test "x$ax_blas_ok" = "xyes" -a "x$ax_lapack_ok" = "xyes" -a "x$has_matio" = "xyes"; then
  if test x"$ax_pthread_ok" = "xyes"; then
     BUILD_DYNAREPLUSPLUS="yes"
  else
     BUILD_DYNAREPLUSPLUS="yes (without POSIX threads)"
  fi
else
  BUILD_DYNAREPLUSPLUS="no (missing one of: BLAS, LAPACK, MatIO)"
fi

if test "x$CWEAVE" != "x" -a x"$PDFTEX" != "x" -a "x$ax_tex_have_eplain" = "xyes"; then
  BUILD_DYNAREPLUSPLUS_SRCDOC="yes"
else
  BUILD_DYNAREPLUSPLUS_SRCDOC="no (missing one of: cweave, pdftex, eplain)"
fi

if test "x$PDFLATEX" != "x" -a "x$BIBTEX" != "x"; then
  BUILD_DYNARE_USERGUIDE="yes"
else
  BUILD_DYNARE_USERGUIDE="no (missing one of: pdflatex, bibtex)"
fi

if test "x$PDFLATEX" != "x" -a "x$ax_latex_have_beamer" = "xyes"; then
  BUILD_BEAMER_DOC="yes"
else
  BUILD_BEAMER_DOC="no (missing one of: pdflatex, beamer)"
fi

if test "x$PDFLATEX" != "x"; then
  BUILD_OTHER_PDF_DOC="yes"
else
  BUILD_OTHER_PDF_DOC="no (missing pdflatex)"
fi

if test "x$DOXYGEN" != "x"; then
  BUILD_DYNARE_PREPROC_DOC="yes"
else
  BUILD_DYNARE_PREPROC_DOC="no (missing doxygen)"
fi

if test "x$enable_org_export" != "x"; then
  BUILD_DYNARE_INTERNAL_DOC="yes"
else
  BUILD_DYNARE_INTERNAL_DOC="no (Org export not enabled)"
fi

if test "x$MAKEINFO" != "x"; then
  BUILD_DYNARE_INFO="yes"
  if test "x$TEXI2HTML" != "x" -a "x$LATEX2HTML" != "x"; then
    BUILD_DYNARE_HTML_MANUAL="yes"
  else
    BUILD_DYNARE_HTML_MANUAL="yes (but with ugly math formulas, missing texi2html or latex2html)"
  fi
  BUILD_DYNARE_PDF_MANUAL="yes"
else
  BUILD_DYNARE_INFO="no (missing makeinfo)"
  BUILD_DYNARE_HTML_MANUAL="no (missing makeinfo)"
  BUILD_DYNARE_PDF_MANUAL="no (missing makeinfo)"
fi

if test "x$OCTAVE" != "x"; then
  TESTSUITE_OCTAVE="yes"
else
  TESTSUITE_OCTAVE="no"
fi

if test "x$ax_blas_ok" = "xyes" -a "x$ax_lapack_ok" = "xyes"; then
  TESTSUITE_DYNAREPLUSPLUS="yes"
else
  TESTSUITE_DYNAREPLUSPLUS="no"
fi

AC_MSG_NOTICE([

Dynare is now configured for building the following components...

Binaries (with "make"):
 Dynare preprocessor:                   $BUILD_PREPROCESSOR
 Dynare++:                              $BUILD_DYNAREPLUSPLUS

PDF documentation (with "make pdf"):
 Dynare reference manual:               $BUILD_DYNARE_PDF_MANUAL
 Dynare user guide:                     $BUILD_DYNARE_USERGUIDE
 Dynare++ developer documentation:      $BUILD_DYNAREPLUSPLUS_SRCDOC
 Beamer presentations:                  $BUILD_BEAMER_DOC
 Various other documents:               $BUILD_OTHER_PDF_DOC

HTML documentation (with "make html"):
 Dynare reference manual:               $BUILD_DYNARE_HTML_MANUAL
 Dynare preprocessor developer doc:     $BUILD_DYNARE_PREPROC_DOC
 Dynare internal doc:                   $BUILD_DYNARE_INTERNAL_DOC

Info documentation (with "make info"):  $BUILD_DYNARE_INFO

Testsuites (run with "make check"):
 Dynare for Octave:                     $TESTSUITE_OCTAVE
 Dynare++:                              $TESTSUITE_DYNAREPLUSPLUS
])

AC_OUTPUT

dmm @ ea7846fd

+0 −1
Original line number Diff line number Diff line
Subproject commit ea7846fd71d32851877cf60008ac5046b51a7a51
+1 −1
Original line number Diff line number Diff line
Subproject commit 8b3d14040133ea5b622cde9ea79b3b0b41891bce
Subproject commit 391689d9f1bea4bd68ef6641dc2dc4a1bd867850
Original line number Diff line number Diff line
Subproject commit 216abedb9ab4df5dd4dca07c721f7c07392801e9
Subproject commit ac6d0ae1b69cda26aa9486188d54c8c010f115c4
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ p.footer {
            </ul>
         </div>
         <h2>AIM Solver Subsystem<a name="1"></a></h2>
         <p>The AIM subsystem in the AIM subdirectory of the main Dynare matlab directory contains Matlab functions necessary for using
         <p>The AIM subsystem in the AIM subdirectory of the main Dynare matlab directory contains MATLAB functions necessary for using
            Gary Anderson's AIM 1st order solver as an alternative to Dynare's default mjdgges solver (see  <a href="http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html">http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html</a> ).
         </p>
         <p>It cosists of:</p>
@@ -92,7 +92,7 @@ p.footer {
         </div>
         <div>
            <ul>
               <li>A subset of Matlab routines from Gary Anderson's own AIM package needed to compute and solve system passed on and returned
               <li>A subset of MATLAB routines from Gary Anderson's own AIM package needed to compute and solve system passed on and returned
                  by dynAIMsolver1 whose names start with SP.. of which <b>SPAmalg.m</b> is the main driver:
               </li>
            </ul>
@@ -215,7 +215,7 @@ p.footer {
     can produce ~ one order closer results to the Dynare solutiion
     then when if plain jacobia_ is passed,
     i.e. diff &lt; e-14 for aa and diff &lt; *e-13 for jacobia_ if Q' is used.</pre><p>GP July 2008</p>
         <p>part of DYNARE, copyright Dynare Team (1996-2008) Gnu Public License.</p>
         <p>part of Dynare, copyright Dynare Team (1996-2008) Gnu Public License.</p>
         <p class="footer"><br>
            Published with MATLAB&reg; 7.1<br></p>
      </div>
@@ -225,7 +225,7 @@ p.footer {

%% AIM Solver Subsystem
% The AIM subsystem in the AIM subdirectory of the main Dynare matlab
% directory contains Matlab functions necessary for using
% directory contains MATLAB functions necessary for using
% Gary Anderson's AIM 1st order solver as an alternative to Dynare's default mjdgges solver (see  http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html ). 
%
% It cosists of:
@@ -236,7 +236,7 @@ p.footer {
% gu=dr.hgu from the AIM outputs. ("1" in the title is for 1st order
% solver).
%
% * A subset of Matlab routines from Gary Anderson's own AIM package needed to compute
% * A subset of MATLAB routines from Gary Anderson's own AIM package needed to compute
% and solve system passed on and returned by dynAIMsolver1 whose names start with SP.. 
% of which *SPAmalg.m* is the main driver:
%
@@ -394,7 +394,7 @@ p.footer {
%
% GP July 2008  
%
% part of DYNARE, copyright Dynare Team (1996-2008)
% part of Dynare, copyright Dynare Team (1996-2008)
% Gnu Public License.

##### SOURCE END #####