Compatibility fixes for Octave 3.8.
- no longer use OCTAVE_QUIT in MEX files; this seems now only possible in oct-files. (Ref #304) - do not build linsolve.oct on Octave >= 3.8, it is available natively. - do not add strjoin.m to the patch on Octave >= 3.8, it is available natively. - default_save_options has been renamed save_default_options.time-shift
parent
7c6d5b3ef6
commit
66d48f5917
|
@ -64,7 +64,11 @@ more off
|
|||
|
||||
% sets default format for save() command
|
||||
if isoctave
|
||||
default_save_options('-mat')
|
||||
if octave_ver_less_than('3.8')
|
||||
default_save_options('-mat')
|
||||
else
|
||||
save_default_options('-mat')
|
||||
end
|
||||
end
|
||||
|
||||
if nargin < 1
|
||||
|
|
|
@ -94,8 +94,9 @@ if isoctave || matlab_ver_less_than('7.4')
|
|||
addpath([dynareroot '/missing/ilu'])
|
||||
end
|
||||
|
||||
% strjoin is missing in older versions of MATLAB and in Octave
|
||||
if isoctave || matlab_ver_less_than('8.1')
|
||||
% strjoin is missing in older versions of MATLAB and in Octave < 3.8
|
||||
if (isoctave && octave_ver_less_than('3.8')) || ...
|
||||
(~isoctave && matlab_ver_less_than('8.1'))
|
||||
addpath([dynareroot '/missing/strjoin'])
|
||||
end
|
||||
|
||||
|
|
|
@ -2,7 +2,11 @@ ACLOCAL_AMFLAGS = -I ../../../m4
|
|||
|
||||
# libdynare++ must come before gensylv, k_order_perturbation, dynare_simul_
|
||||
if DO_SOMETHING
|
||||
SUBDIRS = mjdgges kronecker bytecode libdynare++ gensylv qzcomplex ordschur block_kalman_filter sobol local_state_space_iterations linsolve
|
||||
SUBDIRS = mjdgges kronecker bytecode libdynare++ gensylv qzcomplex ordschur block_kalman_filter sobol local_state_space_iterations
|
||||
|
||||
if COMPILE_LINSOLVE
|
||||
SUBDIRS += linsolve
|
||||
endif
|
||||
|
||||
if HAVE_MATIO
|
||||
SUBDIRS += k_order_perturbation dynare_simul_
|
||||
|
|
|
@ -31,8 +31,13 @@ if test "x$MKOCTFILE" != "x"; then
|
|||
FFLAGS=`$MKOCTFILE -p FFLAGS`
|
||||
CXXFLAGS=`$MKOCTFILE -p CXXFLAGS`
|
||||
LDFLAGS="`$MKOCTFILE -p LFLAGS` `$MKOCTFILE -p LDFLAGS`"
|
||||
OCTAVE_VERSION=`$MKOCTFILE -v 2>&1 | sed 's/mkoctfile, version //'`
|
||||
AX_COMPARE_VERSION([$OCTAVE_VERSION], [lt], [3.6], [AC_MSG_ERROR([Your Octave is too old, please upgrade to version 3.6 at least.])])
|
||||
AX_COMPARE_VERSION([$OCTAVE_VERSION], [ge], [3.8], [OCTAVE38=yes])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([COMPILE_LINSOLVE], [test "$OCTAVE38" != "yes"])
|
||||
|
||||
CFLAGS="$CFLAGS -Wall -Wno-parentheses"
|
||||
FFLAGS="$FFLAGS -Wall"
|
||||
CXXFLAGS="$CXXFLAGS -Wall -Wno-parentheses"
|
||||
|
@ -110,6 +115,12 @@ else
|
|||
BUILD_MS_SBVAR_MEX_OCTAVE="no (missing GSL or MatIO library)"
|
||||
fi
|
||||
|
||||
if test -n "$MKOCTFILE" -a "$OCTAVE38" != "yes"; then
|
||||
BUILD_LINSOLVE_OCTAVE="yes"
|
||||
else
|
||||
BUILD_LINSOLVE_OCTAVE="no (Octave >= 3.8)"
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([openmp], AS_HELP_STRING([--enable-openmp], [use OpenMP for parallelization of some MEX files]), [
|
||||
if test "x$enable_openmp" = "xyes"; then
|
||||
CPPFLAGS="$CPPFLAGS -DUSE_OMP"
|
||||
|
@ -127,6 +138,7 @@ Binaries (with "make"):
|
|||
MS-SBVAR MEX files for Octave: $BUILD_MS_SBVAR_MEX_OCTAVE
|
||||
Kalman Steady State MEX file for Octave: $BUILD_KALMAN_STEADY_STATE_OCTAVE
|
||||
Estimation, k-order and dynare_simul MEX for Octave: $BUILD_ESTIMATION_KORDER_DYNSIMUL_MEX_OCTAVE
|
||||
Linsolve for Octave: $BUILD_LINSOLVE_OCTAVE
|
||||
|
||||
])
|
||||
|
||||
|
|
|
@ -267,9 +267,6 @@ struct s_plan
|
|||
|
||||
#ifdef MATLAB_MEX_FILE
|
||||
extern "C" bool utIsInterruptPending();
|
||||
#else
|
||||
#include <octave/oct.h>
|
||||
#include <octave/unwind-prot.h>
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
@ -575,9 +572,7 @@ public:
|
|||
|
||||
while (go_on)
|
||||
{
|
||||
#ifdef OCTAVE_MEX_FILE
|
||||
OCTAVE_QUIT;
|
||||
#else
|
||||
#ifdef MATLAB_MEX_FILE
|
||||
if ( utIsInterruptPending() )
|
||||
throw UserExceptionHandling();
|
||||
#endif
|
||||
|
|
|
@ -24,9 +24,6 @@
|
|||
|
||||
#ifdef MATLAB_MEX_FILE
|
||||
extern "C" bool utIsInterruptPending();
|
||||
#else
|
||||
#include <octave/oct.h>
|
||||
#include <octave/unwind-prot.h>
|
||||
#endif
|
||||
|
||||
Evaluate::Evaluate()
|
||||
|
@ -139,9 +136,7 @@ Evaluate::compute_block_time(const int Per_u_, const bool evaluate, /*const int
|
|||
jacob_exo_det = mxGetPr(jacobian_det_exo_block[block_num]);
|
||||
}
|
||||
}
|
||||
#ifdef OCTAVE_MEX_FILE
|
||||
OCTAVE_QUIT;
|
||||
#else
|
||||
#ifdef MATLAB_MEX_FILE
|
||||
if ( utIsInterruptPending() )
|
||||
throw UserExceptionHandling();
|
||||
#endif
|
||||
|
|
|
@ -5139,9 +5139,7 @@ dynSparseMatrix::Solve_ByteCode_Symbolic_Sparse_GaussianElimination(int Size, bo
|
|||
{
|
||||
/*clock_t time11 = clock();
|
||||
mexPrintf("t=%d, record = %d\n",t, record);*/
|
||||
#ifdef OCTAVE_MEX_FILE
|
||||
OCTAVE_QUIT;
|
||||
#else
|
||||
#ifdef MATLAB_MEX_FILE
|
||||
if ( utIsInterruptPending() )
|
||||
throw UserExceptionHandling();
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue