Error when using Dynare parallel computing toolbox

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.

Error when using Dynare parallel computing toolbox

Postby dsinigaglia » Wed Jan 11, 2012 2:37 pm

I have been trying to run some estimations using the Dynare parallel toolbox, with Dynare 4.2.4 and Matlab R2011a in a standard Windows environment. I believe I took all the necessary steps, as defined in related documents and instructions. In fact, the parallel toolbox runs smoothly, either with local or remote runs. The problem arises in very end of the estimation routine, when Dynare has to compile the results altogether. I get the following error message:

MH: Posterior (dsge) IRFs...
MH: Posterior IRFs, done!
??? Undefined function or variable "MAX_naK".

Error in ==> prior_posterior_statistics at 230
nfiles = ceil(nBlockPerCPU(j)/MAX_naK);

Error in ==> dynare_estimation_1 at 903
prior_posterior_statistics('posterior',data,gend,data_index,missing_value);

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> Model_name at 1088
dynare_estimation(var_list_);

Error in ==> dynare at 120
evalin('base',fname) ;

The error is the same, regardless the type of computing - local, remote or combined, the number of cores used or any configuration option that can be called at Dynare's invocation. Also, take notice the process of estimation is almost complete when the error occurs: I get ok! messages for all steps, including MH acceptance rates, MCMC diagnosis, computing of posterior means, covariances and log marginal density, IRF plots. What I do not get is the results.mat file and the smoothed and historical variables file set.

Can anyone help me on this?

Regards,

Daniel
dsinigaglia
 
Posts: 8
Joined: Mon Jul 14, 2008 5:41 am
Location: New York

Re: Error when using Dynare parallel computing toolbox

Postby rattoma » Thu Jan 12, 2012 4:09 pm

This happens when the posterior filter or forecast is not triggered.
I can give you the fix (which will be also available in GIT):

prior_posterior_statistics.m
trap lines 230-231 within an if statement, such that
(... snip ...)
if naK
nfiles = ceil(nBlockPerCPU(j)/MAX_naK);
ifil(4,j+1) =ifil(4,j)+nfiles;
end


trap lines 235-238 within another if statement, such that
(... snip ...)
if horizon
nfiles = ceil(nBlockPerCPU(j)/MAX_nforc1);
ifil(6,j+1) =ifil(6,j)+nfiles;
nfiles = ceil(nBlockPerCPU(j)/MAX_nforc2);
ifil(7,j+1) =ifil(7,j)+nfiles;
end

this should fix your problem.
thanks for reporting this

Marco
rattoma
 
Posts: 51
Joined: Tue Jan 04, 2005 10:48 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 5 guests