...
 
Commits (259)
((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)
(c-file-style . "gnu")))
(c++-mode . ((indent-tabs-mode . nil)
(c-file-style . "gnu")))
(makefile-mode . ((indent-tabs-mode . t)))
(octave-mode . ((indent-tabs-mode . nil)
(octave-block-offset . 4))))
......@@ -56,12 +56,9 @@ checksum
*.bbl
*.blg
*.lof
/doc/dynare.html
/doc/dynare.info*
/doc/texinfo.tex
/doc/version.texi
/doc/mdate-sh
/doc/stamp-vti
/doc/manual/build
/doc/manual/utils/version.py
/doc/manual/utils/__pycache__/*
!/doc/guide.bbl
!/doc/parallel/AvenueParadigm.pdf
!/doc/parallel/iVaNo_*.pdf
......@@ -91,7 +88,15 @@ doc/internals/ltxpng
/mex/matlab/
/mex/octave/
# Symbolic links created for building MEX files
/mex/build/matlab/*/*.c
/mex/build/matlab/*/*.cc
/mex/build/octave/*/*.c
/mex/build/octave/*/*.cc
# Dynare++
/dynare++/integ/src/quadrature-points.dSYM/
/dynare++/src/dynare++.dSYM/
/dynare++/integ/src/quadrature-points
/dynare++/integ/src/quadrature-points.exe
/dynare++/integ/testing/tests
......@@ -99,7 +104,6 @@ doc/internals/ltxpng
/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
......@@ -112,6 +116,10 @@ doc/internals/ltxpng
/dynare++/src/dynglob_tab.hh
/dynare++/tl/testing/tests
/dynare++/tl/testing/tests.exe
/dynare++/tests/*.jnl
/dynare++/tests/*.m
/dynare++/tests/*.mat
/dynare++/tests/*.dump
!/dynare++/extern/R/Makefile
# Windows
......
......@@ -32,19 +32,14 @@ build_doc:
script:
- autoreconf -si
- ./configure --disable-matlab --disable-octave
- make -j $(nproc) info pdf html
- make -j $(nproc) pdf html
artifacts:
paths:
- doc/dynare.info*
- doc/dynare.html
- doc/dynare.pdf
- doc/manual/build/
expire_in: 1 week
testsuite_matlab:
.test_matlab_template:
stage: test
script:
- autoreconf -si
- './configure --disable-octave --with-matlab=$(dirname $(dirname $(readlink -f `which matlab`))) MATLAB_VERSION=$(echo version | matlab -nodesktop -nodisplay -nosplash 2>/dev/null | sed -En "/ans\ =/!d;n;n;s/^[^0-9]*([0-9]+\.[0-9]+).*$/\1/;p")'
- make -j $(($(nproc) * 3 / 4)) -C tests check-matlab
artifacts:
paths:
- tests/*.m.log
......@@ -60,7 +55,24 @@ testsuite_matlab:
dependencies:
- build_binaries
.testsuite_octave_template:
test_matlab:
extends: .test_matlab_template
script:
- autoreconf -si
- './configure --disable-octave --with-matlab=$(dirname $(dirname $(readlink -f `which matlab`))) MATLAB_VERSION=$(echo version | matlab -nodesktop -nodisplay -nosplash 2>/dev/null | sed -En "/ans\ =/!d;n;n;s/^[^0-9]*([0-9]+\.[0-9]+).*$/\1/;p")'
- make -j $(($(nproc) * 3 / 4)) -C tests check-matlab
test_old_matlab:
extends: .test_matlab_template
script:
- autoreconf -si
- './configure --disable-octave --with-matlab=/usr/local/MATLAB/R2009b MATLAB_VERSION=R2009b'
- make -C mex/build/matlab clean
- make -j $(nproc) -C mex/build/matlab
- make -j $(($(nproc) * 3 / 4)) -C tests check-matlab
when: manual
test_octave:
stage: test
variables:
OPENBLAS_NUM_THREADS: 1
......@@ -82,19 +94,6 @@ testsuite_matlab:
when: always
dependencies:
- build_binaries
allow_failure: true
testsuite_octave_auto:
extends: .testsuite_octave_template
only:
- tags
- schedules
testsuite_octave_manual:
extends: .testsuite_octave_template
except:
- tags
- schedules
when: manual
test_dynare++:
......@@ -105,3 +104,23 @@ test_dynare++:
- make -C dynare++ check
dependencies:
- build_binaries
artifacts:
paths:
- dynare++/kord/out.txt
- dynare++/tests/*.jnl
- dynare++/tests/*.m
- dynare++/tests/*.mat
- dynare++/tests/*.dump
deploy_manual_unstable:
stage: deploy
only:
- master@Dynare/dynare
tags:
- secure
dependencies:
- build_doc
script:
- rm -rf doc/manual/build/html/_static/mathjax
- ln -s /usr/share/javascript/mathjax doc/manual/build/html/_static/mathjax
- rsync --recursive --links --delete --compress doc/manual/build/html/ dynbot@eris.dynare.org:/srv/www.dynare.org/manual-unstable/
......@@ -45,7 +45,7 @@ So, now you've reported the bug or asked for an enhancemnt by creating a GitHub
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:
1. Clone the Dynare repository:
* `git clone https://git.dynare.org/Dynare/dynare.git`
* `git clone --recurse-submodules https://git.dynare.org/Dynare/dynare.git`
1. [Fork the Dynare repository](https://help.github.com/articles/fork-a-repo)
1. Change into the `dynare` folder and add the forked repository as a remote:
* `cd dynare`
......
......@@ -34,17 +34,15 @@ EXTRA_DIST = \
.dir-locals.el
all-local: preprocessor/src/dynare_m
{ \
if [ -z "`file preprocessor/src/dynare_m | grep x86.64`" ]; then \
ARCH="32"; \
else \
if file preprocessor/src/dynare_m | grep -q x86.64; then \
ARCH="64"; \
else \
ARCH="32"; \
fi; \
mkdir -p $(abs_srcdir)/matlab/preprocessor$$ARCH; \
$(LN_S) -f $(abs_srcdir)/preprocessor/src/dynare_m $(abs_srcdir)/matlab/preprocessor$$ARCH; \
mkdir -p $(abs_srcdir)/julia/preprocessor$$ARCH ; \
$(LN_S) -f $(abs_srcdir)/preprocessor/src/dynare_m $(abs_srcdir)/julia/preprocessor$$ARCH; \
}
mkdir -p $(abs_srcdir)/matlab/preprocessor$$ARCH && \
$(LN_S) -f $(abs_srcdir)/preprocessor/src/dynare_m $(abs_srcdir)/matlab/preprocessor$$ARCH && \
mkdir -p $(abs_srcdir)/julia/preprocessor$$ARCH && \
$(LN_S) -f $(abs_srcdir)/preprocessor/src/dynare_m $(abs_srcdir)/julia/preprocessor$$ARCH
dist-hook:
rm -rf `find $(distdir)/matlab $(distdir)/examples -name *~`
......@@ -61,15 +59,13 @@ install-exec-local:
cp -r matlab $(DESTDIR)$(pkglibdir)
find $(DESTDIR)$(pkglibdir) -name LICENSE.md -delete
rm -rf $(DESTDIR)$(pkglibdir)/matlab/preprocessor*
{ \
if [ -z "`file preprocessor/src/dynare_m | grep x86.64`" ]; then \
ARCH="32"; \
else \
if file preprocessor/src/dynare_m | grep -q x86.64; then \
ARCH="64"; \
else \
ARCH="32"; \
fi; \
mkdir -p $(DESTDIR)$(pkglibdir)/matlab/preprocessor$$ARCH; \
cp preprocessor/src/dynare_m $(DESTDIR)$(pkglibdir)/matlab/preprocessor$$ARCH; \
}
mkdir -p $(DESTDIR)$(pkglibdir)/matlab/preprocessor$$ARCH && \
cp preprocessor/src/dynare_m $(DESTDIR)$(pkglibdir)/matlab/preprocessor$$ARCH
uninstall-local:
rm -f $(DESTDIR)$(bindir)/dynare++
......
This diff is collapsed.
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()
dnl Process this file with autoconf to produce a configure script.
dnl Copyright (C) 2009-2018 Dynare Team
dnl Copyright © 2009-2018 Dynare Team
dnl
dnl This file is part of Dynare.
dnl
......@@ -34,25 +34,23 @@ case ${host_os} in
# On Windows, we want Dynare++ to be statically linked
AM_LDFLAGS="-static"
AC_SUBST([AM_LDFLAGS])
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
if test -z "$F77"; 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++])
AM_CXXFLAGS="-Wall -Wno-parentheses"
AM_CXXFLAGS="-Wall -Wno-parentheses -Wold-style-cast"
AC_SUBST([AM_CXXFLAGS])
# If default 'ar' is not available, try to find one with a host prefix (see ticket #145)
......@@ -67,25 +65,31 @@ AC_PROG_MKDIR_P
AX_CXX11_THREAD
AM_PROG_LEX
AC_CHECK_PROG([YACC], [bison], [bison])
if test -z "$YACC"; then
unset YACC # AM_MISSING_PROG needs an unset variable: an empty variable won't do
AM_MISSING_PROG([YACC], [bison])
fi
# Check for libmatio, needed by Dynare++
AX_MATIO
AM_CONDITIONAL([HAVE_MATIO], [test "x$has_matio" = "xyes"])
AC_CHECK_PROG([MAKEINFO], [makeinfo], [makeinfo])
AM_CONDITIONAL([HAVE_MATIO], [test "$has_matio" = yes])
AC_CHECK_PROG([PDFLATEX], [pdflatex], [pdflatex])
AM_CONDITIONAL([HAVE_PDFLATEX], [test "x$PDFLATEX" != "x"])
AM_CONDITIONAL([HAVE_PDFLATEX], [test -n "$PDFLATEX"])
AC_CHECK_PROG([BIBTEX], [bibtex], [bibtex])
AM_CONDITIONAL([HAVE_BIBTEX], [test "x$BIBTEX" != "x"])
AM_CONDITIONAL([HAVE_BIBTEX], [test -n "$BIBTEX"])
AC_CHECK_PROG([LATEX2HTML], [latex2html], [latex2html])
AM_CONDITIONAL([HAVE_LATEX2HTML], [test "x$LATEX2HTML" != "x"])
AC_CHECK_PROG([SPHINXBUILD], [sphinx-build], [sphinx-build])
AM_CONDITIONAL([HAVE_SPHINXBUILD], [test -n "$SPHINXBUILD"])
if test "x$PDFLATEX" != "x" -a "x$BIBTEX" != "x"; then
if test -n "$PDFLATEX" -a -n "$BIBTEX"; then
AX_LATEX_CLASS([beamer], [ax_latex_have_beamer])
fi
AM_CONDITIONAL([HAVE_BEAMER], [test "x$ax_latex_have_beamer" = "xyes"])
AM_CONDITIONAL([HAVE_BEAMER], [test "$ax_latex_have_beamer" = yes])
AC_PROG_F77
AC_F77_LIBRARY_LDFLAGS
......@@ -97,16 +101,18 @@ case ${host_os} in
;;
esac
if test "x$F77" != "x"; then
if test -n "$F77"; 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"])
AM_CONDITIONAL([HAVE_BLAS], [test "$ax_blas_ok" = yes])
AM_CONDITIONAL([HAVE_LAPACK], [test "$ax_lapack_ok" = yes])
AC_CONFIG_FILES([Makefile
VERSION
doc/Makefile
doc/manual/Makefile
doc/manual/utils/version.py
doc/parallel/Makefile
doc/internals/Makefile
doc/gsa/Makefile
......@@ -130,46 +136,41 @@ AC_CONFIG_FILES([Makefile
dynare++/integ/testing/Makefile
dynare++/kord/Makefile
dynare++/src/Makefile
dynare++/tests/Makefile
mex/sources/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
if test "$enable_matlab" = yes; then
AC_CONFIG_SUBDIRS([mex/build/matlab])
AX_MATLAB
AX_MATLAB_ARCH
if test "${MATLAB_ARCH}" = win32 -o "${MATLAB_ARCH}" = win64; then
MATLAB_BATCH_OPTIONS='-nosplash -automation -wait -sd "$(CURDIR)"'
else
MATLAB_BATCH_OPTIONS='-nosplash -nodisplay'
fi
AC_SUBST([MATLAB_BATCH_OPTIONS])
AX_MATLAB_BATCH_OPTIONS
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"])
AM_CONDITIONAL([ENABLE_MATLAB], [test "$enable_matlab" = yes])
AM_CONDITIONAL([HAVE_MATLAB], [test "$ax_enable_matlab" = yes])
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
if test "$enable_octave" = yes; 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"])
AM_CONDITIONAL([ENABLE_OCTAVE], [test "$enable_octave" = yes])
AM_CONDITIONAL([HAVE_OCTAVE], [test "$enable_octave" = yes -a -n "$OCTAVE"])
# 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"])
AM_CONDITIONAL([ENABLE_ORG_EXPORT], [test -n "$enable_org_export"])
# Construct final output message
if test "x$ax_blas_ok" = "xyes" -a "x$ax_lapack_ok" = "xyes" -a "x$has_matio" = "xyes"; then
if test "$ax_blas_ok" = yes -a "$ax_lapack_ok" = yes -a "$has_matio" = yes; then
BUILD_DYNAREPLUSPLUS="yes"
else
BUILD_DYNAREPLUSPLUS="no (missing one of: BLAS, LAPACK, MatIO)"
fi
if test "x$PDFLATEX" != "x" -a "x$ax_latex_have_beamer" = "xyes"; then
if test -n "$PDFLATEX" -a "$ax_latex_have_beamer" = yes; then
BUILD_BEAMER_DOC="yes"
else
BUILD_BEAMER_DOC="no (missing one of: pdflatex, beamer)"
......@@ -181,33 +182,27 @@ else
BUILD_OTHER_PDF_DOC="no (missing pdflatex)"
fi
if test "x$enable_org_export" != "x"; then
if test -n "$enable_org_export"; 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$LATEX2HTML" != "x"; then
BUILD_DYNARE_HTML_MANUAL="yes"
else
BUILD_DYNARE_HTML_MANUAL="yes (but with ugly math formulas, missing latex2html)"
fi
if test -n "$SPHINXBUILD"; then
BUILD_DYNARE_HTML_MANUAL="yes"
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)"
BUILD_DYNARE_HTML_MANUAL="no (missing sphinx-build)"
BUILD_DYNARE_PDF_MANUAL="no (missing sphinx-build)"
fi
if test "x$OCTAVE" != "x"; then
if test -n "$OCTAVE"; then
TESTSUITE_OCTAVE="yes"
else
TESTSUITE_OCTAVE="no"
fi
if test "x$ax_blas_ok" = "xyes" -a "x$ax_lapack_ok" = "xyes"; then
if test "$ax_blas_ok" = yes -a "$ax_lapack_ok" = yes; then
TESTSUITE_DYNAREPLUSPLUS="yes"
else
TESTSUITE_DYNAREPLUSPLUS="no"
......@@ -229,8 +224,6 @@ HTML documentation (with "make html"):
Dynare reference manual: $BUILD_DYNARE_HTML_MANUAL
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
......
SUBDIRS = parallel internals gsa dseries-and-reporting
info_TEXINFOS = dynare.texi
if HAVE_LATEX2HTML
html-local: dynare.html
# The temporary directory for latex2html (L2H_TMP) must not contain a dot, so
# enforce standard tmp directory instead of defaulting to current directory
dynare.html: dynare.texi
rm -rf dynare.html
texi2any --html --split=section -c L2H=1 -c L2H_TMP=$${TMPDIR:-/tmp} -c PREFIX=dynare.html dynare.texi
if HAVE_SPHINXBUILD
SUBDIRS += manual
endif
PDF_TARGETS =
......
This diff is collapsed.
src/build/*
src/source/__pycache__/*
utils/__pycache__/*
\ No newline at end of file
This diff is collapsed.
# Copyright (C) 2018-2019 Dynare Team
#
# This file is part of Dynare.
#
# Dynare is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Dynare is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Dynare. If not, see <http://www.gnu.org/licenses/>.
SRC = $(wildcard src/source/*.rst)
.PHONY: all html pdf
all: html pdf
html: src/build/html/index.html
src/build/html/index.html: $(SRC) src/source/conf.py
make -C src html
rm -rf src/build/html/_static/mathjax
ln -s /usr/share/javascript/mathjax src/build/html/_static/mathjax
pdf: src/build/latex/dynare.pdf
src/build/latex/dynare.pdf: $(SRC) src/source/conf.py
make -C src latexpdf
push: html
rsync -avz src/build/html/* $(TARGET)
EXTRA_DIST = source \
utils/dynare_dom.py \
utils/dynare_lex.py
SRC = $(wildcard source/*.rst)
html-local: build/html/index.html
build/html/index.html: $(SRC) source/conf.py
$(SPHINXBUILD) -M html source build
pdf-local: build/latex/dynare-manual.pdf
build/latex/dynare-manual.pdf: $(SRC) source/conf.py
$(SPHINXBUILD) -M latexpdf source build
clean-local:
rm -rf build
# Dynare reference manual
Source for the Dynare's reference manual which is available at
<http://www.dynare.org/manual-unstable>. The documentation is obtained
using [Sphinx](http://www.sphinx-doc.org/) Pyhthon Documentation
Generator. To build the `html` version of the reference manual just type:
```bash
~$ make html
```
on the command line. The reference manual will be available under
`src/build/html`, provided all the following (debian package)
requirements are met:
- python3,
- python3-sphinx,
- python3-recommonmark, and
- libjs-mathjax
......@@ -8,7 +8,7 @@ Bibliography
* Adjemian, Stéphane, Matthieu Darracq Parriès and Stéphane Moyen (2008): “Towards a monetary policy evaluation framework”, *European Central Bank Working Paper*, 942.
* 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.
* Andreasen, Martin M., Jesús Fernández-Villaverde, and Juan Rubio-Ramírez (2013): “The Pruned State-Space System for Non-Linear DSGE Models: Theory and Empirical Applications,” *Review of Economic Studies*, 85(1), pp. 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), pp. 1-49.
* Andrews, Donald W.K (1991): “Heteroskedasticity and autocorrelation consistent covariance matrix estimation”, *Econometrica*, 59(3), 817–858.
* Backus, David K., Patrick J. Kehoe, and Finn E. Kydland (1992): “International Real Business Cycles,” *Journal of Political Economy*, 100(4), 745–775.
* Baxter, Marianne and Robert G. King (1999): “Measuring Business Cycles: Approximate Band-pass Filters for Economic Time Series,” *Review of Economics and Statistics*, 81(4), 575–593.
......
......@@ -20,7 +20,7 @@
import os
import sys
sys.path.insert(0, os.path.abspath('../../utils'))
sys.path.insert(0, os.path.abspath('../utils'))
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.mathjax']
......@@ -41,8 +41,9 @@ author = u'Dynare Team'
add_function_parentheses = False
version = u'4.6-unstable'
release = u'4.6-unstable'
# See ../utils/version.py, which is generated by autoconf
from version import version
from version import release
language = 'en'
......@@ -79,7 +80,7 @@ latex_elements = {
}
latex_documents = [
(master_doc, 'dynare.tex', u'Dynare Reference Manual',
(master_doc, 'dynare-manual.tex', u'Dynare Reference Manual',
u'Dynare team', 'manual'),
]
......
......@@ -9,6 +9,7 @@ Currently the development team of Dynare is composed of:
* Frédéric Karamé
* Junior Maih
* Ferhat Mihoubi
* Willi Mutschler
* Johannes Pfeifer
* Marco Ratto
* Sébastien Villemot
......
......@@ -7,14 +7,14 @@ Installation and configuration
Software requirements
=====================
Packaged versions of Dynare are available for Windows XP/Vista/7/8/10,
Packaged versions of Dynare are available for Windows 7/8/10,
`Debian GNU/Linux <http://www.debian.org/>`_, `Ubuntu`_ and macOS 10.8
or later. Dynare should work on other systems, but some compilation
steps are necessary in that case.
In order to run Dynare, you need one of the following:
* MATLAB version 7.9 (R2009b) or above (MATLAB R2009b 64-bit for macOS);
* MATLAB version 7.9 (R2009b) or above;
* GNU Octave version 4.2.1 or above, with the statistics package from `Octave-Forge`_.
The following optional extensions are also useful to benefit from
......@@ -117,7 +117,7 @@ Prerequisites on Debian GNU/Linux and Ubuntu
Users of MATLAB under GNU/Linux need a working compilation
environment installed. If not already present, it can be installed via
``apt-get install build-essential``.
``apt install build-essential``.
Users of Octave under GNU/Linux should install the package for MEX file
compilation (under Debian or Ubuntu, it is called ``liboctave-dev``).
......@@ -197,8 +197,7 @@ Homebrew, type::
If you don’t want to type this command every time you run Octave, you
can put it in a file called ``.octaverc`` in your home directory
(under Windows this will generally be ``c:\Documents and
Settings\USERNAME\`` while under macOS it is
(under Windows this will generally be ``c:\Users\USERNAME`` while under macOS it is
``/Users/USERNAME/``). This file is run by Octave at every startup.
......
......@@ -17,9 +17,7 @@ computations.
On Linux and macOS, the default location of the configuration file is
``$HOME/.dynare``, while on Windows it is ``%APPDATA%\dynare.ini``
(typically ``C:\Documents and Settings\USERNAME\Application
Data\dynare.ini`` under Windows XP, or
``C:\Users\USERNAME\AppData\dynare.ini`` under Windows Vista/7/8). You
(typically ``c:\Users\USERNAME\AppData\dynare.ini``). You
can specify a non standard location using the ``conffile`` option of
the ``dynare`` command (see :ref:`dyn-invoc`).
......
......@@ -74,7 +74,7 @@ below. Basic operations can be performed on dates:
**horzcat operator ([,])**
Concatenates dates objects without removing repetitions. For
instance ``[1950Q1, 1950Q2]`` is a a ``dates`` object with two
instance ``[1950Q1, 1950Q2]`` is a ``dates`` object with two
elements (``1950Q1`` and ``1950Q2``).
**vertcat operator ([;])**
......@@ -132,7 +132,7 @@ he would extract some elements from a vector in Matlab/Octave. Let ``a
the two last elements of ``a`` (by instantiating the ``dates`` object
``[1950Q4, 1951Q1]``).
Remark Dynare substitutes any occurrence of dates in the ``.mod`` file
Remark: Dynare substitutes any occurrence of dates in the ``.mod`` file
into an instantiation of the ``dates`` class regardless of the
context. For instance, ``d = 1950Q1`` will be translated as ``d =
dates('1950Q1');``. This automatic substitution can lead to a crash if
......@@ -776,7 +776,7 @@ The dseries class
|br| The Matlab/Octave ``dseries`` class handles time series
data. As any Matlab/Octave statements, this class can be used in a
Dynare’s mod file. A ``dseries`` object has eight members:
Dynare’s mod file. A ``dseries`` object has six members:
:arg name: A ``nobs*1`` cell of strings or a ``nobs*p`` character
array, the names of the variables.
......@@ -784,6 +784,8 @@ The dseries class
array, the tex names of the variables.
:arg dates dates: An object with ``nobs`` elements, the dates of the sample.
:arg double data: A ``nobs`` by ``vobs`` array, the data.
:arg ops: The history of operations on the variables.
:arg tags: The user-defined tags on the variables.
``data``, ``name``, ``tex`` are private members. The following
constructors are available:
......@@ -791,7 +793,7 @@ The dseries class
.. construct:: dseries ()
dseries (INITIAL_DATE)
|br| Instantiates an empty ``dseries`` object, with, if
|br| Instantiates an empty ``dseries`` object with, if
defined, an initial date given by the single element ``dates``
object *INITIAL_DATE.*
......@@ -967,7 +969,7 @@ The dseries class
deterministic_trend = .1*transpose(1:200);
x = zeros(200,1);
for i=2:200
x(i) = .75*x(i-1) + e(i);
x(i) = .75*x(i-1) + u(i);
end
y = x + stochastic_trend + deterministic_trend;
......@@ -1075,7 +1077,7 @@ The dseries class
6Y | 64
7Y | 128
>> ts3 = ts1.cumsum(dates('3Y'));
>> ts3 = ts1.cumprod(dates('3Y'));
>> ts3
ts3 is a dseries object:
......@@ -1089,7 +1091,7 @@ The dseries class
6Y | 8
7Y | 16
>> ts4 = ts1.cumsum(dates('3Y'),dseries(pi));
>> ts4 = ts1.cumprod(dates('3Y'),dseries(pi));
>> ts4
ts4 is a dseries object:
......@@ -1351,7 +1353,7 @@ The dseries class
deterministic_trend = .1*transpose(1:200);
x = zeros(200,1);
for i=2:200
x(i) = .75*x(i-1) + e(i);
x(i) = .75*x(i-1) + u(i);
end
y = x + stochastic_trend + deterministic_trend;
......
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = Test
SOURCEDIR = source
BUILDDIR = build
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile clean
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
clean:
rm -rf build
version = u'@PACKAGE_VERSION@'
release = u'@PACKAGE_VERSION@'
SUBDIRS = sylv parser/cc tl doc utils/cc integ kord src
EXTRA_DIST = change_log.html tests extern
SUBDIRS = utils/cc sylv parser/cc tl doc integ kord src tests
EXTRA_DIST = dynare++-ramsey.tex dynare++-tutorial.tex
EXTRA_DIST = \
dynare++-ramsey.tex \
dynare++-tutorial.tex \
sylvester.tex \
tl.tex \
changelog-old.html \
changelog-sylv-old.html
if HAVE_PDFLATEX
pdf-local: dynare++-ramsey.pdf dynare++-tutorial.pdf
pdf-local: dynare++-ramsey.pdf dynare++-tutorial.pdf sylvester.pdf tl.pdf
endif
%.pdf: %.tex
......
......@@ -164,7 +164,7 @@ Faa Di Bruno.
\item[IntSequence]
The class represents a sequence of integers. Useful everywhere.
\item[TwoDMatrix and ConstTwoDMatrix]
These classse provide an interface to a code handling two-dimensional
These classes provide an interface to a code handling two-dimensional
matrices. The code resides in Sylvester module, in directory {\tt
sylv/cc}. There is
no similar interface to \texttt{Vector} and \texttt{ConstVector} classes from the
......@@ -188,8 +188,7 @@ higher moments of normal distribution. The code contains an algorithm
for generating the moments for arbitrary covariance matrix.
\item[TLStatic]
The class encapsulates all static information needed for the
library. It includes a Pascal triangle (for quick computation of
binomial coefficients), and precalculated equivalence sets.
library. It includes precalculated equivalence sets.
\item[TLException]
Simple class thrown as an exception.
\end{description}
......@@ -239,7 +238,7 @@ vice-versa. We test whether their coordinates are as expected.
and the result $\left[f_{y^ku^l}\right]$. Then we calculate the
derivatives with \texttt{multAndAdd} of \texttt{ZContainer} and compare.
\item We test the polynomial evaluation by evaluating a folded and
unfolded polynomial in traditional and horner-like fashion. This gives
unfolded polynomial in traditional and Horner-like fashion. This gives
four methods in total. The four results are compared.
\end{itemize}
......
RINTERNALS=/usr/share/R/include/
sylvcppsource := $(wildcard ../../sylv/cc/*.cc)
sylvhsource := $(wildcard ../../sylv/cc/*.hh)
sylvobjects := $(patsubst %.cc, %.o, $(sylvcppsource))
tlcppsource := $(wildcard ../../tl/cc/*.cc)
tlhsource := $(wildcard ../../tl/cc/*.hh)
kordcppsource := $(wildcard ../../kord/*.cc)
kordhsource := $(wildcard ../../kord/*.hh)
integcppsource := $(wildcard ../../integ/cc/*.cc)
integhsource := $(wildcard ../../integ/cc/*.hh)
parserhsource := $(wildcard ../../parser/cc/*.hh)
parsercppsource := $(wildcard ../parser/cc/*.cc)
utilshsource := $(wildcard ../../utils/cc/*.hh)
utilscppsource := $(wildcard ../utils/cc/*.cc)
srccpp := dynare3.cc dynare_model.cc planner_builder.cc dynare_atoms.cc dynare_params.cc nlsolve.cc
objects := $(patsubst %.cc,../../src/%.o,$(srccpp)) \
$(patsubst %.yy,%_ll.o,$(wildcard ../../src/*.yy)) \
$(patsubst %.ll,%_tab.o,$(wildcard ../../src/*.ll))
PKG_CPPFLAGS= -I../../tl/cc -I../../sylv/cc -I../../kord -I../../src -I../.. -I$(RINTERNALS)
PKG_LIBS= ${LAPACK_LIBS} ${BLAS_LIBS} $(objects) $(kordobjects) $(integobjects) $(tlobjects) ../../parser/cc/parser.a ../../utils/cc/utils.a $(sylvobjects) -lpthread -llapack -lcblas -lf77blas -latlas -lg2c -lstdc++
ifneq ($(LD_LIBRARY_PATH),) # use LD_LIBRARY_PATH from environment
PKG_LIBS := -Wl,--library-path $(LD_LIBRARY_PATH) $(PKG_LIBS)
endif
dynareR.so: dynareR.o
g++ -shared -o dynareR.so dynareR.o -L/usr/lib/R/lib -lR $(PKG_LIBS)
dynareR.o: dynareR.cc
g++ -I/usr/share/R/include -I/usr/share/R/include $(PKG_CPPFLAGS) \
-fpic -g -O2 -c dynareR.cc -o dynareR.o -DDEBUG
test: test.cc dynareR.cc
g++ -O0 -g -o test test.cc -DDEBUG $(PKG_LIBS) $(PKG_CPPFLAGS)
test-debug:
valgrind --leak-check=yes ./test
COMPILING
The makefile for this interface is still preliminary, I will write a decent
one when I have the time. It needs all the compiled files from dynare++,
but doesn't know how to make them. So first you need to run make in the
src/ directory, then run make in extern/R.
You need Rinternals.h to make this file. If you are not using prepackaged R
on Unix/Linux, you need to modify the variable RINCLUDE in the Makefile
accordingly.
To compile dynare++, read doc/compiling-notes.txt.
INSTALLATION
Copy the dynareR.r and dynareR.so files to your working directory so that R
can find them.
// $Id: dynareR.cpp 862 2006-08-04 17:34:56Z tamas $
// Copyright 2006, Tamas K Papp
#include "dynare3.hh" // Dynare class
#include "approximation.hh" // Approximation class
// exceptions
#include "dynare_exception.hh"
#include "parser/cc/parser_exception.hh"
#include "utils/cc/exception.hh"
#include "SylvException.hh"
#include "tl_exception.hh"
#include "kord_exception.hh"
#include <algorithm>
#include <string.h>
#ifdef DEBUG