Commit 248ad188 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Merge remote-tracking branch 'Dynare/master' into enterprise

Fixed conflicts in:

 - .gitlab-ci.yml
 - matlab/dynare_config.m
 - matlab/dynare_solve.m
 - matlab/initvalf.m
 - matlab/perfect-foresight-models/make_ex_.m
 - matlab/perfect-foresight-models/perfect_foresight_setup.m
 - mex/build/matlab/Makefile.am
 - mex/build/matlab/configure.ac
 - mex/build/octave/Makefile.am
 - mex/build/octave/configure.ac
 - mex/sources/Makefile.am
 - preprocessor
 - tests/Makefile.am
parents 367daa86 9a726e61
......@@ -2,7 +2,7 @@ variables:
GIT_SUBMODULE_STRATEGY: recursive
TERM: linux
MATLAB_VERSION: R2020a
OLD_MATLAB_VERSION: R2009b
OLD_MATLAB_VERSION: R2014a
# The next stanza creates the version number used for the source tarball and the
# binary packages. Here are the following possible cases:
......@@ -85,12 +85,10 @@ pkg_windows:
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- windows/deps/sources32/
- windows/deps/sources64/
- windows/deps/lib32/
- windows/deps/lib64/
# We do not cache lib{32,64}-msys2, mingw{32,64}, octave{32,64} and
# matlab{32,64}, because those are simply extracted from a tarball. It
# 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.
artifacts:
paths:
......@@ -232,7 +230,7 @@ deploy_release_enterprise:
- pkg_windows
- pkg_macOS
script:
- f=(windows/exe/*) && osslsigncode sign -pkcs12 ~/dynare-object-signing.p12 -n Dynare -i https://www.dynare.org -t http://timestamp.digicert.com -in ${f[0]} -out ${f[0]}.signed && mv ${f[0]}.signed ${f[0]}
- f=(windows/exe/*) && osslsigncode sign -pkcs12 ~/cepremap-comodo-sectigo-code-signing.p12 -n Dynare -i https://www.dynare.org -t http://timestamp.comodoca.com -in ${f[0]} -out ${f[0]}.signed && mv ${f[0]}.signed ${f[0]}
- cp *.tar.xz /srv/www.dynare.org/release_ecb/source/
- cp windows/exe/* /srv/www.dynare.org/release_ecb/windows/
- cp windows/7z/* /srv/www.dynare.org/release_ecb/windows-7z/
......
Announcement for Dynare 4.6.2 (on 2020-09-07)
=============================================
We are pleased to announce the release of Dynare 4.6.2.
This maintenance release fixes various bugs.
The Windows, macOS and source packages are already available for download at
[the Dynare website](https://www.dynare.org/download/).
All users are strongly encouraged to upgrade.
This release is compatible with MATLAB versions ranging from 7.9 (R2009b) to
9.8 (R2020a), and with GNU Octave versions 5.2.0 (under Windows) and 4.4.1
(under macOS).
*Note for Windows users:* upon launching the Dynare installer, you may get a
warning emitted by Windows Defender SmartScreen, saying that this is an
unrecognized app and that it was prevented from starting. You can safely ignore
this warning, as long as you can verify on the next screen that CEPREMAP is the
editor of the software. This security warning is due to the fact that we had to
renew our code signing certificate (which had expired), and it takes some time
to rebuild our reputation as a software editor using the new certificate.
Here is a list of the problems identified in version 4.6.1 and that have been
fixed in version 4.6.2:
* Perfect foresight simulations of purely backward models could deliver an
incorrect result if some exogenous variable appeared with a lag of 2 or more
(and neither `block` nor `bytecode` option was used)
* Perfect foresight simulations of linear models could deliver an incorrect
result if the following four conditions were met:
+ the model was actually declared as linear through the `linear` option
+ there was an exogenous variable with a lead or a lag
+ `stack_solve_algo` was equal to 0 (the default) or 7
+ neither `block` nor `bytecode` option was used
* In stochastic simulations, for variables that actually do not leave the
steady state, reported simulated moments could be spurious (due to division
by zero)
* Displayed variance decompositions would only take into account measurement
errors if measurement errors were present for all observed variables
* The posterior variance decompositions with measurement errors computed with
`moments_varendo` were incorrect
* `moments_varendo` would not update `oo_.PosteriorTheoreticalMoments` if it
was already present, from *e.g.* an earlier run of `estimation`
* Identification would in some cases compute wrong Jacobian of moments
* Identification would display incorrect results if parameter dependence was
implemented via a steady state file
* `generate_trace_plots` would crash when measurement errors were present
* `estimation` would crash for correlated measurement errors
* Parallel execution/testing could crash instead of aborting with a proper
error message
* Under macOS, Dynare would incorrectly claim that it is compiled for Octave
5.2.0 (it is actually compiled for Octave 4.4.1)
* Using external functions in a model local variable would crash the
preprocessor
* Tolerance criteria for steady state computations were inconsistently set
* `stoch_simul` with its default `order=2` would crash with a message about
`hessian_eq_zero` not existing if an explicit `order=1` was present somewhere
else in the `.mod` file
* Model local variables were not written to the `modfile.json` JSON file
* Model local variables names would have two spurious underscores at their
point of definition in the `dynamic.json` and `static.json` files (but only
in the definition, not when they were used, which is inconsistent)
* The `solve_algo=9` option was not accessible. The `solve_algo=10` and
`solve_algo=11` options were not accessible with `block` (without `bytecode`)
* Under certain circumstances, `extended_path` would crash when used in
conjunction with the `block` option
* `extended_path` was not working with the `bytecode` option
* `shock_decomposition` was not accepting the options of `estimation` related
to smoothing
* `conditional_forecast` would display a warning even if the simulation was
successful
* The `prior_trunc` option of `identification` was not working
* The `rand_multivariate_student` value of the `proposal_distribution` option
was not working when used with the
`tailored_random_block_metropolis_hastings` posterior sampling method
* Perfect foresight simulations of backward models would crash if convergence
failed with complex-valued residuals
* The diffuse Kalman smoother would crash if `Finf` became singular
Announcement for Dynare 4.6.1 (on 2020-03-13)
=============================================
......
......@@ -26,7 +26,7 @@
}}
\author{S\'ebastien Villemot\thanks{Paris School of Economics and
CEPREMAP.} \and Johannes Pfeifer\thanks{University of Cologne. E-mail: \href{mailto:jpfeifer@uni-koeln.de}{\texttt{jpfeifer@uni-koeln.de}}.}}
CEPREMAP.} \and Johannes Pfeifer\thanks{Universität der Bundeswehr München. E-mail: \href{mailto:johannes.pfeifer@unibw.de}{\texttt{johannes.pfeifer@unibw.de}}.}}
\date{First version: September 2007 \hspace{1cm} This version: May 2017}
\maketitle
......
......@@ -4,7 +4,7 @@ The Dynare Reference Manual, version |version|
Currently the development team of Dynare is composed of:
* Stéphane Adjemian (Université du Maine, Gains)
* Houtan Bastani (CEPREMAP)
* Houtan Bastani
* Michel Juillard (Banque de France)
* Sumudu Kankanamge (Toulouse School of Economics)
* Frédéric Karamé (Université du Maine, Gains and CEPREMAP)
......@@ -12,7 +12,7 @@ Currently the development team of Dynare is composed of:
* Junior Maih (Norges Bank)
* Ferhat Mihoubi (Université Paris-Est Créteil, Érudite and CEPREMAP)
* Willi Mutschler (University of Münster)
* Johannes Pfeifer (University of Cologne)
* Johannes Pfeifer (Universität der Bundeswehr München)
* Marco Ratto (European Commission, Joint Research Centre - JRC)
* Sébastien Villemot (CEPREMAP)
......
......@@ -14,7 +14,7 @@ are necessary in that case.
In order to run Dynare, you need one of the following:
* MATLAB version 7.9 (R2009b) or above;
* MATLAB version 8.3 (R2014a) or above;
* GNU Octave version 4.4 or above, with the statistics package from
`Octave-Forge`_. Note however that the Dynare installers for Windows and
macOS require a more specific version of Octave, as indicated on the download
......
......@@ -229,7 +229,8 @@ by the ``dynare`` command.
.. option:: json = parse|check|transform|compute
Causes the preprocessor to output a version of the ``.mod`` file in
JSON format. When the JSON output is created depends on the value
JSON format to ``<<M_.dname>>/model/json/``.
When the JSON output is created depends on the value
passed. These values represent various steps of processing in the
preprocessor.
......@@ -257,7 +258,8 @@ by the ``dynare`` command.
.. option:: jsonstdout
Instead of writing output requested by ``json`` to files,
write to standard out.
write to standard out, i.e. to the MATLAB/Octave command window
(and the log-file).
.. option:: onlyjson
......
This diff is collapsed.
......@@ -34,7 +34,7 @@ from docutils.parsers.rst import Directive, directives
from sphinx import addnodes
from sphinx.domains import Domain, ObjType
from sphinx.locale import l_, _
from sphinx.locale import _
from sphinx.directives import ObjectDescription
from sphinx.roles import XRefRole
from sphinx.util.nodes import make_refnode
......@@ -140,14 +140,14 @@ class DynCallable(DynObject):
has_arguments = True
doc_field_types = [
TypedField('arguments', label=l_('Arguments'),
TypedField('arguments', label=_('Arguments'),
names=('argument', 'arg', 'parameter', 'param'),
typerolename='func', typenames=('paramtype', 'type')),
Field('returnvalue', label=l_('Returns'), has_arg=False,
Field('returnvalue', label=_('Returns'), has_arg=False,
names=('returns', 'return')),
Field('returntype', label=l_('Return type'), has_arg=False,
Field('returntype', label=_('Return type'), has_arg=False,
names=('rtype',)),
Field('example', label=l_('Example'), has_arg=False,
Field('example', label=_('Example'), has_arg=False,
names=('ex',)),
]
......@@ -157,10 +157,10 @@ class DynClass(DynObject):
allow_nesting = True
doc_field_types = [
TypedField('members', label=l_('Members'),
TypedField('members', label=_('Members'),
names=('argument', 'arg', ),
typerolename='func', typenames=('type', )),
Field('example', label=l_('Example'), has_arg=False,
Field('example', label=_('Example'), has_arg=False,
names=('ex',)),
]
......@@ -291,22 +291,22 @@ class DynareDomain(Domain):
name = 'dynare'
label = 'Dynare'
object_types = {
'function': ObjType(l_('function'), 'func'),
'datesmethod': ObjType(l_('method'), 'datmeth'),
'dseriesmethod': ObjType(l_('method'), 'dsermeth'),
'reportingmethod': ObjType(l_('method'), 'repmeth'),
'matcomm': ObjType(l_('matlab command'), 'mcomm'),
'command': ObjType(l_('command'), 'comm'),
'class': ObjType(l_('class'), 'class'),
'block': ObjType(l_('block'), 'bck'),
'confblock': ObjType(l_('config block'), 'cbck'),
'macrodir': ObjType(l_('macro directive'), 'mdir'),
'construct': ObjType(l_('constructor'), 'cstr'),
'matvar': ObjType(l_('matlab variable'), 'mvar'),
'specvar': ObjType(l_('special variable'), 'svar'),
'operator': ObjType(l_('operator'), 'op'),
'constant': ObjType(l_('constant'), 'const'),
'option': ObjType(l_('option'), 'opt'),
'function': ObjType(_('function'), 'func'),
'datesmethod': ObjType(_('method'), 'datmeth'),
'dseriesmethod': ObjType(_('method'), 'dsermeth'),
'reportingmethod': ObjType(_('method'), 'repmeth'),
'matcomm': ObjType(_('matlab command'), 'mcomm'),
'command': ObjType(_('command'), 'comm'),
'class': ObjType(_('class'), 'class'),
'block': ObjType(_('block'), 'bck'),
'confblock': ObjType(_('config block'), 'cbck'),
'macrodir': ObjType(_('macro directive'), 'mdir'),
'construct': ObjType(_('constructor'), 'cstr'),
'matvar': ObjType(_('matlab variable'), 'mvar'),
'specvar': ObjType(_('special variable'), 'svar'),
'operator': ObjType(_('operator'), 'op'),
'constant': ObjType(_('constant'), 'const'),
'option': ObjType(_('option'), 'opt'),
}
directives = {
'function': DynFunction,
......
......@@ -10,7 +10,7 @@
\author{Ondra Kamen\'\i k}
\date{February 2011, updated August 2016}
\date{First version: February 2011 \\ This version: September 2020}
\maketitle
\tableofcontents
......@@ -18,7 +18,7 @@
\section{Setup}
The Dynare++ setup procedure is pretty straightforward as Dynare++ is included in the Dynare installation
packages which can be downloaded from \url{http://www.dynare.org}. Take the following steps:
packages which can be downloaded from \url{https://www.dynare.org}. Take the following steps:
\begin{enumerate}
\item Add the {\tt dynare++} subdirectory of the root Dynare installation directory to the your
operating system path. This ensures that your OS will find the {\tt dynare++} executable.
......@@ -159,10 +159,7 @@ file {\tt example1.jnl} and a MATLAB MAT-4 {\tt example1.mat}. The
journal file contains information about time, memory and processor
resources needed for all steps of solution. The output file is more
interesting. It contains various simulation results. It can be loaded
into MATLAB or Scilab and examined.%
\footnote{For MATLAB {\tt load example1.mat}, for Scilab {\tt
mtlb\_load example1.mat}} The following examples are done in MATLAB,
everything would be very similar in Scilab.
into MATLAB or Octave and examined.
Let us first examine the contents of the MAT file:
{\small
......@@ -431,7 +428,7 @@ vcov = [
}
After this model file has been run, we can load the resulting MAT-file
into the MATLAB (or Scilab) and examine its contents:
into the MATLAB and examine its contents:
{\small
\begin{verbatim}
>> load kp1980_2.mat
......@@ -628,7 +625,11 @@ reported. They might be useful for confidence interval calculations.
For each shock, Dynare++ calculates IRF for two impulses, positive and
negative. Size of an impulse is one standard error of a respective
shock.
shock.\footnote{Note that if the exogenous shocks are correlated, Dynare++ will
ignore the correlation when computing the IRFs, and simulate the impulse on
each shock independently of the others. Note that Dynare behaves differently
in this case, and computes IRFs after performing an orthogonalization of the
shocks (via a Cholesky decomposition of the variance-covariance matrix).}
The rest of this subsection is divided to three parts giving account
on real-time simulations, conditional simulations, and on the way how
......@@ -924,7 +925,7 @@ This section deals with Dynare++ input. The first subsection
\ref{dynpp_opts} provides a list of command line options, next
subsection \ref{dynpp_mod} deals with a format of Dynare++ model file,
and the last subsection discusses incompatibilities between Dynare
MATLAB and Dynare++.
and Dynare++.
\subsection{Command Line Options}
\label{dynpp_opts}
......@@ -1143,7 +1144,7 @@ $t+1$. The realization of $u_t$ is included in the information set of
$E_t$. See an explanation of Dynare++ timing on page \pageref{timing}.
\end{itemize}
The model equations are formulated in the same way as in MATLAB
The model equations are formulated in the same way as in
Dynare. The time indexes different from $t$ are put to round
parenthesis in this way: {\tt C(-1)}, {\tt C}, {\tt C(+1)}.
......@@ -1181,16 +1182,16 @@ Y-Y_SS = rho*(Y(-1)-Y_SS)+EPS;
\end{verbatim}
}
\subsection{Incompatibilities with MATLAB Dynare}
\subsection{Incompatibilities with Dynare}
This section provides a list of incompatibilities between a model file
for Dy\-na\-re++ and MATLAB Dynare. These must be considered when a model
file for MATLAB Dynare is being migrated to Dynare++. The list is the
for Dy\-na\-re++ and for Dynare. These must be considered when a model
file for Dynare is being migrated to Dynare++. The list is the
following:
\begin{itemize}
\item There is no {\tt periods} keyword.
\item The parameters cannot be lagged or leaded, I think that Dynare
MATLAB allows it, but the semantics is the same (parameter is a
\item The parameters cannot be lagged or leaded; Dynare
allows it, though the semantics is the same (parameter is a
constant).
\item There are no commands like {\tt steady}, {\tt check}, {\tt
simul}, {\tt stoch\_simul}, etc.
......
/*
* This file implements the Baseline New Keynesian DSGE model described in
* much detail in Jesús Fernández-Villaverde and Juan F. Rubio-Ramírez (2006): "A Baseline DSGE
* Model", available at http://economics.sas.upenn.edu/~jesusfv/benchmark_DSGE.pdf
* much detail in Jesús Fernández-Villaverde and Juan F. Rubio-Ramírez (2006): “A Baseline DSGE
* Model”, available at http://economics.sas.upenn.edu/~jesusfv/benchmark_DSGE.pdf
*
* The parametrization is based on the estimated version of this model in
* Jesús Fernández-Villaverde (2010): "The econometrics of DSGE models",
 
* SERIEs, Vol. 1, pp. 3-49, DOI 10.1007/s13209-009-0014-7
*
* This implementation was written by Benjamin Born and Johannes Pfeifer. In
......@@ -24,7 +24,7 @@
* example3.mod
*
* The model is written in the beginning of period stock notation. To make the model
* conform with Dynare's end of period stock notation, we use the
* conform with Dynare’s end of period stock notation, we use the
* predetermined_variables-command.
*
* Please note that the following copyright notice only applies to this Dynare
......
/*
* This file replicates the model studied in:
* Aguiar, Mark and Gopinath, Gita (2004): "Emerging Market Business Cycles:
* The Cycle is the Trend" (NBER WP 10734). It is different from version published
* Aguiar, Mark and Gopinath, Gita (2004): “Emerging Market Business Cycles:
* The Cycle is the Trend(NBER WP 10734). It is different from version published
* in the Journal of Political Economy.
*
* This model file is intended to show the capabilities of the Dynare macro
......@@ -15,7 +15,7 @@
* The mod-file reproduces Figure 4 of the working paper, which displays the
* model response to 1 percent shock to trend and cyclical TFP.
*
* This implementation was written by Sbastien Villemot and Johannes Pfeifer.
* This implementation was written by Sébastien Villemot and Johannes Pfeifer.
* Please note that the following copyright notice only applies to this Dynare
* implementation of the model.
*/
......
......@@ -207,12 +207,6 @@ Copyright: 1993-1996 Kurt Hornik
2016-2017 Dynare Team
License: GPL-3+
Files: matlab/missing/strjoin/strjoin.m
Copyright: 2013-2019 Ben Abbott
2007 Muthiah Annamalai
2019 Dynare Team
License: GPL-3+
Files: matlab/lmmcp/catstruct.m
Copyright: 2005 Jos van der Geest <jos@jasen.nl>
2013 Christophe Gouel
......
......@@ -22,7 +22,7 @@ AC_REQUIRE([AX_MATLAB_ARCH])
AC_REQUIRE([AX_MATLAB_VERSION])
AC_REQUIRE([AC_PROG_SED])
AX_COMPARE_VERSION([$MATLAB_VERSION], [lt], [7.9], [AC_MSG_ERROR([Your MATLAB is too old, please upgrade to 7.9 (R2009b) at least.])])
AX_COMPARE_VERSION([$MATLAB_VERSION], [lt], [8.3], [AC_MSG_ERROR([Your MATLAB is too old, please upgrade to 8.3 (R2014a) at least.])])
AC_MSG_CHECKING([for options to compile MEX for MATLAB])
......@@ -80,10 +80,6 @@ case ${MATLAB_ARCH} in
;;
esac
# Kludge for incompatibility of older MATLABs (≤ R2011a) with recent gcc
# Include <uchar.h>, because matrix.h needs char16_t
AX_COMPARE_VERSION([$MATLAB_VERSION], [le], [7.12], [MATLAB_CFLAGS="$MATLAB_CFLAGS -include uchar.h"])
# Converts the MATLAB version number into comparable integers with only major and minor version numbers
# For example, 7.4.2 will become 0704
ax_matlab_ver=$(echo "$MATLAB_VERSION" | $SED -e 's/\([[0-9]]*\)\.\([[0-9]]*\).*/Z\1ZZ\2Z/' \
......
......@@ -22,8 +22,8 @@ set -ex
ROOTDIR=$(pwd)/..
# Set the compilers
CC=gcc-9
CXX=g++-9
CC=gcc-10
CXX=g++-10
# Set the number of threads
NTHREADS=$(nproc)
......@@ -88,7 +88,7 @@ make -j"$NTHREADS"
NAME=dynare-"$VERSION"
PKGFILES="$ROOTDIR"/macOS/pkg/"$NAME"
mkdir -p \
"$PKGFILES"/mex/matlab/maci64-7.9-9.3 \
"$PKGFILES"/mex/matlab/maci64-8.3-9.3 \
"$PKGFILES"/mex/matlab/maci64-9.4-9.8 \
"$PKGFILES"/mex/octave \
"$PKGFILES"/doc/dynare++ \
......@@ -107,7 +107,7 @@ cp -p "$ROOTDIR"/license.txt "$PKGFILES"
cp -pr "$ROOTDIR"/matlab "$PKGFILES"
cp -pr "$ROOTDIR"/examples "$PKGFILES"
cp -L "$ROOTDIR"/mex/matlab/* "$PKGFILES"/mex/matlab/maci64-7.9-9.3
cp -L "$ROOTDIR"/mex/matlab/* "$PKGFILES"/mex/matlab/maci64-8.3-9.3
cp -p "$ROOTDIR"/scripts/dynare.el "$PKGFILES"/scripts
cp -pr "$ROOTDIR"/contrib/ms-sbvar/TZcode/MatlabFiles "$PKGFILES"/contrib/ms-sbvar/TZcode
......@@ -166,7 +166,7 @@ PATH="$OCTAVE_BIN_DIR:$PATH" CC=$CC CXX=$CXX ./configure \
--with-slicot="$LIB64"/Slicot/with-underscore
PATH="$OCTAVE_BIN_DIR:$PATH" make -j"$NTHREADS"
cp -L "$ROOTDIR"/mex/octave/* "$PKGFILES"/mex/octave
echo -e "function v = supported_octave_version\nv=\"$(octave --eval "disp(OCTAVE_VERSION)")\";\nend" > "$PKGFILES"/matlab/supported_octave_version.m
echo -e "function v = supported_octave_version\nv=\"$OCTAVE_VERSION\";\nend" > "$PKGFILES"/matlab/supported_octave_version.m
##
......@@ -175,12 +175,12 @@ echo -e "function v = supported_octave_version\nv=\"$(octave --eval "disp(OCTAVE
cd "$ROOTDIR"/macOS/pkg
# Dynare option
pkgbuild --root "$PKGFILES" --identifier com.cepremap.dynare --version "$VERSION" --install-location /Applications/Dynare/"$LOCATION" "$NAME".pkg
pkgbuild --root "$PKGFILES" --identifier org.dynare --version "$VERSION" --install-location /Applications/Dynare/"$LOCATION" "$NAME".pkg
# GCC option
# Create dummy payload for GCC package; otherwise the size is displayed as 0 bytes in the installer
dd if=/dev/zero of="$ROOTDIR"/macOS/brewfiles/dummy bs=1m count=800
pkgbuild --root "$ROOTDIR"/macOS/brewfiles --identifier com.cepremap.dynare.gcc --version "$VERSION" --scripts "$ROOTDIR"/macOS/scripts --install-location /Applications/Dynare/"$LOCATION" "$NAME"-gcc.pkg
pkgbuild --root "$ROOTDIR"/macOS/brewfiles --identifier org.dynare.gcc --version "$VERSION" --scripts "$ROOTDIR"/macOS/scripts --install-location /Applications/Dynare/"$LOCATION" "$NAME"-gcc.pkg
# Replace variables in displayed files
sed "s/VERSION_READ/$VERSION/g" "$ROOTDIR"/macOS/distribution_template.xml > distribution_tmp.xml
......
# Copyright © 2019 Dynare Team
# Copyright © 2019-2020 Dynare Team
#
# This file is part of Dynare.
#
......@@ -144,7 +144,7 @@ sources64/x13as-$(X13AS_VERSION): tarballs/x13assrc_V$(X13AS_VERSION).tar.gz
lib64/x13as/x13as: sources64/x13as-$(X13AS_VERSION)
cd $< && sed -i '' 's/-static//g' makefile.gf
make -C $< -f makefile.gf FC=gfortran LINKER=ld FFLAGS="-O2" LDFLAGS="-macosx_version_min 10.14.0 -lSystem $(shell gfortran -print-file-name=libgfortran.a) $(shell gfortran -print-file-name=libquadmath.a) $(shell gfortran -print-libgcc-file-name) $(shell gfortran -print-file-name=libgcc_eh.a)" PROGRAM=x13as
make -C $< -f makefile.gf FC=gfortran LINKER=ld FFLAGS="-O2 -std=legacy" LDFLAGS="-macosx_version_min 10.14.0 -lSystem $(shell gfortran -print-file-name=libgfortran.a) $(shell gfortran -print-file-name=libquadmath.a) $(shell gfortran -print-libgcc-file-name) $(shell gfortran -print-file-name=libgcc_eh.a)" PROGRAM=x13as
strip $</x13as
mkdir -p $(dir $@)
cp $</x13as $@
......
......@@ -233,8 +233,10 @@ if kalman_algo == 1 || kalman_algo == 3
options_.nk,kalman_tol,diffuse_kalman_tol,options_.filter_decomposition,options_.smoothed_state_uncertainty);
if isinf(alphahat)
if kalman_algo == 1
fprintf('\nDsgeSmoother: Switching to univariate filter. This may be a sign of stochastic singularity.\n')
kalman_algo = 2;
elseif kalman_algo == 3
fprintf('\nDsgeSmoother: Switching to univariate filter. This may be a sign of stochastic singularity.\n')
kalman_algo = 4;
else
error('This case shouldn''t happen')
......
......@@ -66,17 +66,6 @@ for i=1:npar
hfig=dyn_figure(options_.nodisplay, 'Name', figurename);
end
[nam,texnam] = get_the_name(i, TeX, M_, estim_params_, options_);
if subplotnum == 1
NAMES = {nam};
if TeX
TeXNAMES = {texnam};
end
else
NAMES = [NAMES; {nam}];
if TeX
TeXNAMES = [TeXNAMES; {texnam}];
end
end
[x2, f2, abscissa, dens, binf2, bsup2] = draw_prior_density(i, bayestopt_);
top2 = max(f2);
if i <= nvx
......@@ -148,16 +137,17 @@ for i=1:npar
end
box on
axis([borneinf bornesup 0 1.1*top0])
if TeX
title(texnam, 'Interpreter', 'latex')
else
title(nam, 'Interpreter', 'none')
end
hold off
drawnow
if subplotnum == MaxNumberOfPlotPerFigure || i == npar
dyn_saveas(hfig,[OutputDirectoryName '/' M_.fname '_PriorsAndPosteriors' int2str(figunumber)], options_.nodisplay, options_.graph_format);
if TeX && any(strcmp('eps', cellstr(options_.graph_format)))
fprintf(fidTeX, '\\begin{figure}[H]\n');
for j = 1:size(NAMES, 1)
fprintf(fidTeX, '\\psfrag{%s}[1][][0.5][0]{%s}\n', NAMES{j}, TeXNAMES{j});
end
fprintf(fidTeX, '\\centering\n');
fprintf(fidTeX, '\\includegraphics[width=%2.2f\\textwidth]{%s/%s_PriorsAndPosteriors%s}\n', ...
options_.figures.textwidth*min(subplotnum/nn,1), OutputDirectoryName, M_.fname, int2str(figunumber));
......
......@@ -391,7 +391,6 @@ if ~options_.nograph && ~options_.no_graph.posterior
% The files .TeX are genereted in sequential way always!
% The files .TeX are generated in sequential way always!
subplotnum = 0;
titTeX(M_.exo_names_orig_ord) = M_.exo_names_tex;
if options_.TeX && any(strcmp('eps',cellstr(options_.graph_format)))
......@@ -411,9 +410,6 @@ if ~options_.nograph && ~options_.no_graph.posterior
if subplotnum == 1
fprintf(fidTeX,'\\begin{figure}[H]\n');
end
name = varlist{jj};
texname = varlist_TeX{jj};
fprintf(fidTeX,['\\psfrag{%s}[1][][0.5][0]{%s}\n'],name,['$' texname '$']);
end
if subplotnum == MaxNumberOfPlotPerFigure || (jj == nvar && subplotnum> 0)
figunumber = figunumber+1;
......@@ -438,8 +434,6 @@ if ~options_.nograph && ~options_.no_graph.posterior
% The others file format are generated in parallel by PosteriorIRF_core2!
% Comment for testing!
if ~isoctave
if isnumeric(options_.parallel) || (M_.exo_nbr*ceil(length(varlist)/MaxNumberOfPlotPerFigure))<8
[fout] = PosteriorIRF_core2(localVars,1,M_.exo_nbr,0);
......
......@@ -162,6 +162,8 @@ while fpar<B
errordef = 'Indeterminacy';
elseif info(1) == 5
errordef = 'Rank condition is not satisfied';
else
errordef = get_error_message(info, options_);
end
if strcmpi(type,'prior')
disp(['PosteriorIRF :: Dynare is unable to solve the model (' errordef ')'])
......
......@@ -142,8 +142,11 @@ for i=fpar:npar
remove_fractional_xticks;
hold off
end
name = varlist{j};
title(name,'Interpreter','none')
if options_.TeX
title(['$' varlist_TeX{j} '$'],'Interpreter','latex')
else
title(varlist{j},'Interpreter','none')
end
else
if options_.debug
fprintf('POSTERIOR_IRF: The IRF of %s to %s is smaller than the irf_plot_threshold of %4.3f and will not be displayed.\n',varlist{j},tit{i},options_.impulse_responses.plot_threshold)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment