dynare_config

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

dynare_config

Postby marimel » Fri Jun 27, 2014 6:50 am

Hi ! )
Just very interesred in configuration file)
this is a part of an authentic code

Code: Select all
%% Set mex routine names
mex_status = cell(1,3);
mex_status(1,1) = {'mjdgges'};
[u]mex_status(1,2) = {'qz'};[/u]
mex_status(1,3) = {'Generalized QZ'};
mex_status(2,1) = {'gensylv'};
[u]mex_status(2,2) = {'gensylv'};[/u]
mex_status(2,3) = {'Sylvester equation solution'};
mex_status(3,1) = {'A_times_B_kronecker_C'};
[u]mex_status(3,2) = {'kronecker'};[/u]
mex_status(3,3) = {'Kronecker products'};
mex_status(4,1) = {'sparse_hessian_times_B_kronecker_C'};
[u]mex_status(4,2) = {'kronecker'};[/u]
mex_status(4,3) = {'Sparse kronecker products'};
mex_status(5,1) = {'local_state_space_iteration_2'};
[u]mex_status(5,2) = {'particle/local_state_space_iteration'};[/u]
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


Why the cycle is organized only to check highlighted dll files? I mean what if I have other files exist both in dynareroot and as a subfolder in matlab path?
Hope it wouldn't bore for you to answer)
Thanks in advance!
marimel
 
Posts: 8
Joined: Thu Jun 19, 2014 8:57 am

Re: dynare_config

Postby jpfeifer » Fri Jun 27, 2014 8:54 am

Sorry, but I don't understand the question. We check for the presence of our prepackaged mex-files and remove some paths to avoid naming conflicts. Do you face a particular problem?
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: dynare_config

Postby marimel » Fri Jun 27, 2014 10:06 am

Thanks for reply!
there is not a problem, everything is working, I'm just interested why this cycle is so specific, why not to check all prepackaged mex-files and remove all paths if exist? I must be wrong, but It seems strange somehow..
marimel
 
Posts: 8
Joined: Thu Jun 19, 2014 8:57 am

Re: dynare_config

Postby marimel » Fri Jun 27, 2014 10:34 am

One more question if you don't mind, cause I've just started my friendship with dynare)
what does command: (status,result)=system(command) do? [(command) - dynareroot with model file name] is it run dynare.exe or..?
marimel
 
Posts: 8
Joined: Thu Jun 19, 2014 8:57 am

Re: dynare_config

Postby jpfeifer » Fri Jun 27, 2014 11:51 am

It runs the dynare_m.exe, which is the preprocessor that creates the m-files Dynare uses.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: dynare_config

Postby marimel » Fri Jun 27, 2014 12:10 pm

preprocessor creates some additional m-files, and how to find them? And what about evalin('base', model_name) command, is it also run in exe file? or it is using those additional files? I mean is it possible to see the code which form the structure of M_ and oo_ and others?
marimel
 
Posts: 8
Joined: Thu Jun 19, 2014 8:57 am

Re: dynare_config

Postby jpfeifer » Fri Jun 27, 2014 1:47 pm

The files are in the folder, e.g. the _dynamic.m and _static.m. The evalin-command runs the m-file with the same name as your mod-file. If your mod-file is called mymodel.mod, the m-file is called mymodel.m.
All Dynare codes that are run are accessible via debugging in Matlab.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 5 guests