Cosmetic changes plus small bug fixes.

time-shift
Marco Ratto 2010-10-08 16:19:03 +02:00
parent e846c5cda7
commit 25230060e5
7 changed files with 18 additions and 14 deletions

View File

@ -201,7 +201,11 @@ else
for j=1:totCPU-1, for j=1:totCPU-1,
nfiles = ceil(nBlockPerCPU(j)/MAX_nirfs_dsge); nfiles = ceil(nBlockPerCPU(j)/MAX_nirfs_dsge);
NumberOfIRFfiles_dsge(j+1) =NumberOfIRFfiles_dsge(j)+nfiles; NumberOfIRFfiles_dsge(j+1) =NumberOfIRFfiles_dsge(j)+nfiles;
nfiles = ceil(nBlockPerCPU(j)/MAX_nirfs_dsgevar); if MAX_nirfs_dsgevar,
nfiles = ceil(nBlockPerCPU(j)/MAX_nirfs_dsgevar);
else
nfiles=0;
end
NumberOfIRFfiles_dsgevar(j+1) =NumberOfIRFfiles_dsgevar(j)+nfiles; NumberOfIRFfiles_dsgevar(j+1) =NumberOfIRFfiles_dsgevar(j)+nfiles;
nfiles = ceil(nBlockPerCPU(j)/MAX_nruns); nfiles = ceil(nBlockPerCPU(j)/MAX_nruns);
ifil2(j+1) =ifil2(j)+nfiles; ifil2(j+1) =ifil2(j)+nfiles;
@ -346,7 +350,7 @@ end
% Save the local variables. % Save the local variables.
localVars=[]; localVars=[];
Check=options_.TeX Check=options_.TeX;
if (Check) if (Check)
localVars.varlist_TeX=varlist_TeX; localVars.varlist_TeX=varlist_TeX;
end end

View File

@ -277,7 +277,7 @@ while fpar<npar % Parallel 'while'!!!
if whoiam, if whoiam,
fprintf('Done! \n'); fprintf('Done! \n');
waitbarString = [ 'Subdraw ' int2str(fpar) '/' int2str(npar) ' done.']; waitbarString = [ 'Subdraw ' int2str(fpar) '/' int2str(npar) ' done.'];
fMessageStatus((fpar-fpar0)/(npar-fpar0),whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab), MasterName, DyMo) fMessageStatus((fpar-fpar0)/(npar-fpar0),whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab), MasterName, DyMo);
end end
end end

View File

@ -43,7 +43,7 @@ end
% Reshape 'myinputs' for local computation. % Reshape 'myinputs' for local computation.
% In order to avoid confusion in the name space, the instruction struct2local(myinputs) is replaced by: % In order to avoid confusion in the name space, the instruction struct2local(myinputs) is replaced by:
Check=options_.TeX Check=options_.TeX;
if (Check) if (Check)
varlist_TeX=myinputs.varlist_TeX; varlist_TeX=myinputs.varlist_TeX;
end end
@ -164,7 +164,7 @@ for i=fpar:npar,
if whoiam, if whoiam,
fprintf('Done! \n'); fprintf('Done! \n');
waitbarString = [ 'Exog. shocks ' int2str(i) '/' int2str(npar) ' done.']; waitbarString = [ 'Exog. shocks ' int2str(i) '/' int2str(npar) ' done.'];
fMessageStatus((i-fpar+1)/(npar-fpar+1),whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab), MasterName, DyMo) fMessageStatus((i-fpar+1)/(npar-fpar+1),whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab), MasterName, DyMo);
end end
end% loop over exo_var end% loop over exo_var

View File

@ -87,16 +87,16 @@ OutputFileName = {};
for i=fpar:nvar for i=fpar:nvar
if max(abs(Mean(:,i))) > 10^(-6) if max(abs(Mean(:,i))) > 10^(-6)
subplotnum = subplotnum+1; subplotnum = subplotnum+1;
set(0,'CurrentFigure',hh) set(0,'CurrentFigure',hh);
subplot(nn,nn,subplotnum); subplot(nn,nn,subplotnum);
plot([1 n2],[0 0],'-r','linewidth',0.5); plot([1 n2],[0 0],'-r','linewidth',0.5);
hold on hold on
for k = 1:9 for k = 1:9
plot(1:n2,squeeze(Distrib(k,:,i)),'-g','linewidth',0.5) plot(1:n2,squeeze(Distrib(k,:,i)),'-g','linewidth',0.5);
end end
plot(1:n2,Mean(:,i),'-k','linewidth',1) plot(1:n2,Mean(:,i),'-k','linewidth',1);
xlim([1 n2]); xlim([1 n2]);
hold off hold off;
name = deblank(varlist(i,:)); name = deblank(varlist(i,:));
title(name,'Interpreter','none') title(name,'Interpreter','none')
end end
@ -126,7 +126,7 @@ for i=fpar:nvar
if whoiam, if whoiam,
waitbarString = [ 'Variable ' int2str(i) '/' int2str(nvar) ' done.']; waitbarString = [ 'Variable ' int2str(i) '/' int2str(nvar) ' done.'];
fMessageStatus((i-fpar+1)/(nvar-fpar+1),whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab), MasterName, DyMo) fMessageStatus((i-fpar+1)/(nvar-fpar+1),whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab), MasterName, DyMo);
end end

View File

@ -297,6 +297,6 @@ end
if ~isnumeric(options_.parallel), if ~isnumeric(options_.parallel),
options_.parallel_info.leaveSlaveOpen = leaveSlaveOpen; options_.parallel_info.leaveSlaveOpen = leaveSlaveOpen;
if leaveSlaveOpen == 0, if leaveSlaveOpen == 0,
closeSlave(options_.parallel), closeSlave(options_.parallel,options_.parallel_info.RemoteTmpFolder),
end end
end end

View File

@ -298,7 +298,7 @@ for b=fpar:B
if whoiam, if whoiam,
fprintf('Done! \n'); fprintf('Done! \n');
waitbarString = [ 'Subdraw ' int2str(b) '/' int2str(B) ' done.']; waitbarString = [ 'Subdraw ' int2str(b) '/' int2str(B) ' done.'];
fMessageStatus((b-fpar+1)/(B-fpar+1),whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab), MasterName, DyMo) fMessageStatus((b-fpar+1)/(B-fpar+1),whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab), MasterName, DyMo);
end end
end end

View File

@ -193,7 +193,7 @@ for b = fblck:nblck,
if mod(j,50)==0 & whoiam if mod(j,50)==0 & whoiam
% keyboard; % keyboard;
waitbarString = [ '(' int2str(b) '/' int2str(options_.mh_nblck) '), ' sprintf('accept. %3.f%%%%', 100 * isux/j)]; waitbarString = [ '(' int2str(b) '/' int2str(options_.mh_nblck) '), ' sprintf('accept. %3.f%%%%', 100 * isux/j)];
fMessageStatus(prtfrc,whoiam,waitbarString, '', options_.parallel(ThisMatlab), MasterName, DyMo) fMessageStatus(prtfrc,whoiam,waitbarString, '', options_.parallel(ThisMatlab), MasterName, DyMo);
end end
else else
if mod(j, 3)==0 & ~whoiam if mod(j, 3)==0 & ~whoiam
@ -201,7 +201,7 @@ for b = fblck:nblck,
elseif mod(j,50)==0 & whoiam, elseif mod(j,50)==0 & whoiam,
% keyboard; % keyboard;
waitbarString = [ '(' int2str(b) '/' int2str(options_.mh_nblck) ') ' sprintf('%f done, acceptation rate %f',prtfrc,isux/j)]; waitbarString = [ '(' int2str(b) '/' int2str(options_.mh_nblck) ') ' sprintf('%f done, acceptation rate %f',prtfrc,isux/j)];
fMessageStatus(prtfrc,whoiam,waitbarString, waitbarTitle, options_.parallel(ThisMatlab), MasterName, DyMo) fMessageStatus(prtfrc,whoiam,waitbarString, waitbarTitle, options_.parallel(ThisMatlab), MasterName, DyMo);
end end
end end