Commit 05b16bae authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files
parents d50e68ef 469a1d2c
......@@ -71,7 +71,11 @@ case ${MATLAB_ARCH} in
fi
MATLAB_DEFS="$MATLAB_DEFS -DNDEBUG"
MATLAB_CFLAGS="-fno-common -no-cpp-precomp -arch $ARCHS -isysroot $SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -fexceptions -O2"
MATLAB_LDFLAGS="-L$MATLAB/bin/${MATLAB_ARCH} -Wl,-twolevel_namespace -undefined error -arch $ARCHS -Wl,-syslibroot,$SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -bundle -Wl,-exported_symbols_list,\$(top_srcdir)/mexFunction-MacOSX.map"
# Work around for slicot configuration: need to remove exported_symbols_list
# flag because there's no mexfunction in the configure script
MATLAB_LDFLAGS_NOMAP="-L$MATLAB/bin/${MATLAB_ARCH} -Wl,-twolevel_namespace -undefined error -arch $ARCHS -Wl,-syslibroot,$SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -bundle"
MATLAB_MAPFLAG="-Wl,-exported_symbols_list,\$(top_srcdir)/mexFunction-MacOSX.map"
MATLAB_LDFLAGS="$MATLAB_LDFLAGS_NOMAP $MATLAB_MAPFLAG"
MATLAB_LIBS="-lmx -lmex -lmat -lstdc++ -lmwlapack"
MATLAB_CXXFLAGS="-fno-common -no-cpp-precomp -fexceptions -arch $ARCHS -isysroot $SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -O2"
MATLAB_FFLAGS="-fexceptions -fbackslash -arch $ARCHS"
......
......@@ -427,6 +427,13 @@ switch DynareOptions.lik_init
T,R,Q,H1,Z,mmm,pp,rr);
diffuse_periods = length(dlik);
end
if isnan(dLIK),
fval=dLIK;
info = 45;
exit_flag = 0;
return
end
case 4% Start from the solution of the Riccati equation.
if kalman_algo ~= 2
kalman_algo = 1;
......@@ -516,6 +523,7 @@ if analytic_derivation,
D2P=sparse(size(D2Om,1),size(D2Om,2)); %zeros([size(T),length(xparam1),length(xparam1)]);
jcount=0;
end
if DynareOptions.lik_init==1,
for i=1:EstimatedParameters.nvx
k =EstimatedParameters.var_exo(i,1);
DQ(k,k,i) = 2*sqrt(Q(k,k));
......@@ -534,6 +542,7 @@ if analytic_derivation,
end
end
end
end
offset = EstimatedParameters.nvx;
for i=1:EstimatedParameters.nvn
k = EstimatedParameters.var_endo(i,1);
......@@ -543,6 +552,7 @@ if analytic_derivation,
end
end
offset = offset + EstimatedParameters.nvn;
if DynareOptions.lik_init==1,
for j=1:EstimatedParameters.np
dum = lyapunov_symm(T,DT(:,:,j+offset)*Pstar*T'+T*Pstar*DT(:,:,j+offset)'+DOm(:,:,j+offset),DynareOptions.qz_criterium,DynareOptions.lyapunov_complex_threshold);
% kk = find(abs(dum) < 1e-12);
......@@ -565,6 +575,7 @@ if analytic_derivation,
end
end
end
end
if analytic_derivation==1,
analytic_deriv_info={analytic_derivation,DT,DYss,DOm,DH,DP,asy_Hess};
else
......
......@@ -155,8 +155,8 @@ while newRank && (t<=last)
end
if (t>last)
error(['univariate_diffuse_kalman_filter:: There isn''t enough information to estimate the initial conditions of the nonstationary variables']);
LIK = NaN;
warning(['univariate_diffuse_kalman_filter:: There isn''t enough information to estimate the initial conditions of the nonstationary variables']);
dLIK = NaN;
return
end
......
......@@ -85,7 +85,15 @@ AM_CONDITIONAL([HAVE_MATIO], [test "x$ac_cv_header_matio_h" = "xyes" -a "x$ac_cv
# Check for libslicot, needed by kalman_steady_state
AC_F77_FUNC(sb02od)
LDFLAGS_SAVED=$LDFLAGS
LDFLAGS=$MATLAB_LDFLAGS
case ${MATLAB_ARCH} in
maci | maci64)
# Work around for exported_symbols_list flag present in Mac MATLAB_LDFLAGS
LDFLAGS=$MATLAB_LDFLAGS_NOMAP
;;
*)
LDFLAGS=$MATLAB_LDFLAGS
;;
esac
case ${MATLAB_ARCH} in
glnxa64 | win64 | maci64)
AX_COMPARE_VERSION([$MATLAB_VERSION], [ge], [7.8], [use_64_bit_indexing=yes], [use_64_bit_indexing=no])
......
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