Skip to content
Snippets Groups Projects
Commit c4a6c475 authored by Marco Ratto's avatar Marco Ratto
Browse files

1) moved waitbar instances to core

2) new input argument parallel_info for masterparallel
3) force not closing slave (consecutive pm3 calls)
parent 187e5573
No related branches found
No related tags found
No related merge requests found
......@@ -111,13 +111,6 @@ end
irun = ones(7,1);
ifil = zeros(7,1);
if exist('OCTAVE_VERSION')
diary off;
else
if isnumeric(options_.parallel)
h = waitbar(0,'Taking subdraws...');
end
end
stock_param = zeros(MAX_nruns, npar);
stock_logpo = zeros(MAX_nruns,1);
......@@ -182,10 +175,6 @@ end
localVars.MAX_momentsno = MAX_momentsno;
localVars.ifil=ifil;
if isnumeric(options_.parallel)
localVars.h=h;
end
if strcmpi(type,'posterior'),
b=0;
......@@ -239,7 +228,7 @@ else
if options_.steadystate_flag,
NamFileInput(length(NamFileInput)+1,:)={'',[M_.fname '_steadystate.m']};
end
[fout] = masterParallel(options_.parallel, 1, B,NamFileInput,'prior_posterior_statistics_core', localVars,globalVars);
[fout] = masterParallel(options_.parallel, 1, B,NamFileInput,'prior_posterior_statistics_core', localVars,globalVars, options_.parallel_info);
end
ifil = fout(end).ifil;
......@@ -260,6 +249,13 @@ stock_gend=gend;
stock_data=Y;
save([DirectoryName '/' M_.fname '_data.mat'],'stock_gend','stock_data');
if ~isnumeric(options_.parallel),
leaveSlaveOpen = options_.parallel_info.leaveSlaveOpen;
if options_.parallel_info.leaveSlaveOpen == 0,
options_.parallel_info.leaveSlaveOpen = 1; % force locally to leave open remote matlab sessions (repeated pm3 calls)
end
end
if options_.smoother
pm3(endo_nbr,gend,ifil(1),B,'Smoothed variables',...
'',M_.endo_names(1:M_.orig_endo_nbr, :),'tit_tex',M_.endo_names,...
......@@ -293,3 +289,11 @@ if options_.forecast
'',varlist,'tit_tex',M_.endo_names,...
varlist,'PointForecast',[M_.dname '/metropolis'],'_forc_point');
end
if ~isnumeric(options_.parallel),
options_.parallel_info.leaveSlaveOpen = leaveSlaveOpen;
if leaveSlaveOpen == 0,
closeSlave(options_.parallel),
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment