No longer automatically add M-file substitutes for missing MEX files
However, keep the substitutes under matlab/missing/mex/, so that they can be manually added should the need arise.time-shift
parent
e872f08cc5
commit
e79c618f38
|
@ -154,109 +154,6 @@ P(end+1:end+length(mexpaths)) = mexpaths;
|
||||||
% Set matlab's path
|
% Set matlab's path
|
||||||
addpath(P{:});
|
addpath(P{:});
|
||||||
|
|
||||||
% Set mex routine names
|
|
||||||
mex_status = cell(1,3);
|
|
||||||
mex_status(1,1) = {'mjdgges'};
|
|
||||||
mex_status(1,2) = {'qz'};
|
|
||||||
mex_status(1,3) = {'Generalized QZ'};
|
|
||||||
mex_status(2,1) = {'gensylv'};
|
|
||||||
mex_status(2,2) = {'gensylv'};
|
|
||||||
mex_status(2,3) = {'Sylvester equation solution'};
|
|
||||||
mex_status(3,1) = {'A_times_B_kronecker_C'};
|
|
||||||
mex_status(3,2) = {'kronecker'};
|
|
||||||
mex_status(3,3) = {'Kronecker products'};
|
|
||||||
mex_status(4,1) = {'sparse_hessian_times_B_kronecker_C'};
|
|
||||||
mex_status(4,2) = {'kronecker'};
|
|
||||||
mex_status(4,3) = {'Sparse kronecker products'};
|
|
||||||
mex_status(5,1) = {'local_state_space_iteration_2'};
|
|
||||||
mex_status(5,2) = {'reduced_form_models/local_state_space_iteration_2'};
|
|
||||||
mex_status(5,3) = {'Local state space iteration (second order)'};
|
|
||||||
number_of_mex_files = size(mex_status,1);
|
|
||||||
|
|
||||||
% Remove some directories from matlab's path. This is necessary if the user has
|
|
||||||
% added dynare_v4/matlab with the subfolders. Matlab has to ignore these
|
|
||||||
% subfolders if valid mex files exist.
|
|
||||||
matlab_path = path;
|
|
||||||
for i=1:number_of_mex_files
|
|
||||||
test = strfind(matlab_path,[dynareroot mex_status{i,2}]);
|
|
||||||
action = length(test);
|
|
||||||
if action
|
|
||||||
rmpath([dynareroot mex_status{i,2}]);
|
|
||||||
matlab_path = path;
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
% Test if valid mex files are available, if a mex file is not available
|
|
||||||
% a matlab version of the routine is included in the path.
|
|
||||||
if verbose
|
|
||||||
skipline()
|
|
||||||
disp('Configuring Dynare ...')
|
|
||||||
end
|
|
||||||
|
|
||||||
for i=1:number_of_mex_files
|
|
||||||
test = (exist(mex_status{i,1},'file') == 3);
|
|
||||||
if ~test
|
|
||||||
addpath([dynareroot mex_status{i,2}]);
|
|
||||||
message = '[m] ';
|
|
||||||
else
|
|
||||||
message = '[mex] ';
|
|
||||||
end
|
|
||||||
if verbose
|
|
||||||
disp([ message mex_status{i,3} '.' ])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
% Test if bytecode DLL is present
|
|
||||||
if exist('bytecode', 'file') == 3
|
|
||||||
message = '[mex] ';
|
|
||||||
else
|
|
||||||
message = '[no] ';
|
|
||||||
end
|
|
||||||
if verbose
|
|
||||||
disp([ message 'Bytecode evaluation.' ])
|
|
||||||
end
|
|
||||||
|
|
||||||
% Test if k-order perturbation DLL is present
|
|
||||||
if exist('k_order_perturbation', 'file') == 3
|
|
||||||
message = '[mex] ';
|
|
||||||
else
|
|
||||||
message = '[no] ';
|
|
||||||
end
|
|
||||||
if verbose
|
|
||||||
disp([ message 'k-order perturbation solver.' ])
|
|
||||||
end
|
|
||||||
|
|
||||||
% Test if dynare_simul_ DLL is present
|
|
||||||
if exist('dynare_simul_', 'file') == 3
|
|
||||||
message = '[mex] ';
|
|
||||||
else
|
|
||||||
message = '[no] ';
|
|
||||||
end
|
|
||||||
if verbose
|
|
||||||
disp([ message 'k-order solution simulation.' ])
|
|
||||||
end
|
|
||||||
|
|
||||||
% Test if qmc_sequence DLL is present
|
|
||||||
if exist('qmc_sequence', 'file') == 3
|
|
||||||
message = '[mex] ';
|
|
||||||
else
|
|
||||||
message = '[no] ';
|
|
||||||
end
|
|
||||||
if verbose
|
|
||||||
disp([ message 'Quasi Monte-Carlo sequence (Sobol).' ])
|
|
||||||
end
|
|
||||||
|
|
||||||
% Test if MS-SBVAR DLL is present
|
|
||||||
if exist('ms_sbvar_command_line', 'file') == 3
|
|
||||||
message = '[mex] ';
|
|
||||||
else
|
|
||||||
message = '[no] ';
|
|
||||||
end
|
|
||||||
if verbose
|
|
||||||
disp([ message 'Markov Switching SBVAR.' ])
|
|
||||||
skipline()
|
|
||||||
end
|
|
||||||
|
|
||||||
% Initialization of the dates and dseries classes (recursive).
|
% Initialization of the dates and dseries classes (recursive).
|
||||||
initialize_dseries_class();
|
initialize_dseries_class();
|
||||||
|
|
||||||
|
|
|
@ -493,10 +493,6 @@ if options_.analytic_derivation
|
||||||
error('analytic derivation is incompatible with diffuse filter')
|
error('analytic derivation is incompatible with diffuse filter')
|
||||||
end
|
end
|
||||||
options_.analytic_derivation = 1;
|
options_.analytic_derivation = 1;
|
||||||
if ~(exist('sylvester3','file')==2)
|
|
||||||
dynareroot = strrep(which('dynare'),'dynare.m','');
|
|
||||||
addpath([dynareroot 'gensylv'])
|
|
||||||
end
|
|
||||||
if estim_params_.np
|
if estim_params_.np
|
||||||
% check if steady state changes param values
|
% check if steady state changes param values
|
||||||
M=M_;
|
M=M_;
|
||||||
|
|
|
@ -310,12 +310,6 @@ if prior_exist
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
% add function for generalyzed sylvester equation, we also check this in dynare_estimation_init, however, for analytic_derivation=0, we make double sure that it is added
|
|
||||||
if ~(exist('sylvester3','file')==2)
|
|
||||||
dynareroot = strrep(which('dynare'),'dynare.m','');
|
|
||||||
addpath([dynareroot 'gensylv'])
|
|
||||||
end
|
|
||||||
|
|
||||||
% check if identification directory is already created
|
% check if identification directory is already created
|
||||||
IdentifDirectoryName = CheckPath('identification',dname);
|
IdentifDirectoryName = CheckPath('identification',dname);
|
||||||
|
|
||||||
|
@ -978,4 +972,4 @@ skipline()
|
||||||
disp('==== Identification analysis completed ====')
|
disp('==== Identification analysis completed ====')
|
||||||
skipline(2)
|
skipline(2)
|
||||||
|
|
||||||
options_ = store_options_; %restore options set
|
options_ = store_options_; %restore options set
|
||||||
|
|
|
@ -80,59 +80,6 @@ should give you an error message complaining that you did not specify a MOD
|
||||||
file.
|
file.
|
||||||
|
|
||||||
|
|
||||||
Dynamic Loadable Libraries
|
|
||||||
──────────────────────────
|
|
||||||
|
|
||||||
For better performance, some parts of Dynare are written in the C++ language,
|
|
||||||
which is faster than standard M-files. These parts are compiled and distributed
|
|
||||||
as dynamic loadable libraries (DLL), located in the 'mex' subdirectory of your
|
|
||||||
Dynare installation.
|
|
||||||
|
|
||||||
If the DLL are correctly detected by MATLAB® or Octave, the following should
|
|
||||||
be displayed when you launch Dynare:
|
|
||||||
|
|
||||||
Configuring Dynare ...
|
|
||||||
[mex] Generalized QZ.
|
|
||||||
[mex] Sylvester equation solution.
|
|
||||||
[mex] Kronecker products.
|
|
||||||
[mex] Sparse kronecker products.
|
|
||||||
[mex] Local state space iteration (second order).
|
|
||||||
[mex] Bytecode evaluation.
|
|
||||||
[mex] k-order perturbation solver.
|
|
||||||
[mex] k-order solution simulation.
|
|
||||||
[mex] Quasi Monte-Carlo sequence (Sobol).
|
|
||||||
|
|
||||||
On the contrary, if DLL are not detected, Dynare will fallback on
|
|
||||||
slower alternatives written in M-files (only for some of the DLLs),
|
|
||||||
and display the following:
|
|
||||||
|
|
||||||
Configuring Dynare ...
|
|
||||||
[m] Generalized QZ.
|
|
||||||
[m] Sylvester equation solution.
|
|
||||||
[m] Kronecker products.
|
|
||||||
[m] Sparse kronecker products.
|
|
||||||
[m] Local state space iteration (second order).
|
|
||||||
[no] Bytecode evaluation.
|
|
||||||
[no] k-order perturbation solver.
|
|
||||||
[no] k-order solution simulation.
|
|
||||||
[no] Quasi Monte-Carlo sequence (Sobol).
|
|
||||||
|
|
||||||
In this last case, Dynare will run correctly on the basic features,
|
|
||||||
but with suboptimal speed, and some features will be missing. There
|
|
||||||
could be several reasons for MATLAB® or Octave failing to detect
|
|
||||||
the DLL:
|
|
||||||
|
|
||||||
— Your path settings may be wrong. Make sure that the ‘matlab’ subdirectory of
|
|
||||||
your Dynare installation is the only Dynare directory present in the path
|
|
||||||
variable.
|
|
||||||
|
|
||||||
— Your MATLAB® or Octave version may be incompatible with the provided
|
|
||||||
binaries.
|
|
||||||
|
|
||||||
— You may have a custom M-file in your search path with the same name than a
|
|
||||||
DLL, therefore overriding it.
|
|
||||||
|
|
||||||
|
|
||||||
Credits
|
Credits
|
||||||
───────
|
───────
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue