diff --git a/matlab/dynare_config.m b/matlab/dynare_config.m index 7b3fdb646..03fcf9f49 100644 --- a/matlab/dynare_config.m +++ b/matlab/dynare_config.m @@ -154,109 +154,6 @@ P(end+1:end+length(mexpaths)) = mexpaths; % Set matlab's path 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). initialize_dseries_class(); diff --git a/matlab/dynare_estimation_init.m b/matlab/dynare_estimation_init.m index 5011a392a..5bd1ce9ac 100644 --- a/matlab/dynare_estimation_init.m +++ b/matlab/dynare_estimation_init.m @@ -493,10 +493,6 @@ if options_.analytic_derivation error('analytic derivation is incompatible with diffuse filter') end options_.analytic_derivation = 1; - if ~(exist('sylvester3','file')==2) - dynareroot = strrep(which('dynare'),'dynare.m',''); - addpath([dynareroot 'gensylv']) - end if estim_params_.np % check if steady state changes param values M=M_; diff --git a/matlab/dynare_identification.m b/matlab/dynare_identification.m index 3803522fe..8f9141896 100644 --- a/matlab/dynare_identification.m +++ b/matlab/dynare_identification.m @@ -310,12 +310,6 @@ if prior_exist 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 IdentifDirectoryName = CheckPath('identification',dname); @@ -978,4 +972,4 @@ skipline() disp('==== Identification analysis completed ====') skipline(2) -options_ = store_options_; %restore options set \ No newline at end of file +options_ = store_options_; %restore options set diff --git a/matlab/gensylv/gensylv.m b/matlab/missing/mex/gensylv/gensylv.m similarity index 100% rename from matlab/gensylv/gensylv.m rename to matlab/missing/mex/gensylv/gensylv.m diff --git a/matlab/kronecker/A_times_B_kronecker_C.m b/matlab/missing/mex/kronecker/A_times_B_kronecker_C.m similarity index 100% rename from matlab/kronecker/A_times_B_kronecker_C.m rename to matlab/missing/mex/kronecker/A_times_B_kronecker_C.m diff --git a/matlab/kronecker/sparse_hessian_times_B_kronecker_C.m b/matlab/missing/mex/kronecker/sparse_hessian_times_B_kronecker_C.m similarity index 100% rename from matlab/kronecker/sparse_hessian_times_B_kronecker_C.m rename to matlab/missing/mex/kronecker/sparse_hessian_times_B_kronecker_C.m diff --git a/matlab/reduced_form_models/local_state_space_iteration_2/local_state_space_iteration_2.m b/matlab/missing/mex/local_state_space_iterations/local_state_space_iteration_2.m similarity index 100% rename from matlab/reduced_form_models/local_state_space_iteration_2/local_state_space_iteration_2.m rename to matlab/missing/mex/local_state_space_iterations/local_state_space_iteration_2.m diff --git a/matlab/qz/mjdgges.m b/matlab/missing/mex/mjdgges/mjdgges.m similarity index 100% rename from matlab/qz/mjdgges.m rename to matlab/missing/mex/mjdgges/mjdgges.m diff --git a/matlab/gensylv/sylvester3.m b/matlab/sylvester3.m similarity index 100% rename from matlab/gensylv/sylvester3.m rename to matlab/sylvester3.m diff --git a/matlab/gensylv/sylvester3a.m b/matlab/sylvester3a.m similarity index 100% rename from matlab/gensylv/sylvester3a.m rename to matlab/sylvester3a.m diff --git a/windows/README.txt b/windows/README.txt index 4cfac6e41..5038c50ca 100644 --- a/windows/README.txt +++ b/windows/README.txt @@ -80,59 +80,6 @@ should give you an error message complaining that you did not specify a MOD 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 ───────