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

fixed bugs when GSA asks to evaluate only the likelihood without any filter/smoother;

parent 4d9426cf
No related branches found
Tags
No related merge requests found
......@@ -222,12 +222,14 @@ else
[nCPU, totCPU, nBlockPerCPU] = distributeJobs(options_.parallel, 1, B);
ifil=zeros(7,totCPU);
for j=1:totCPU-1,
nfiles = ceil(nBlockPerCPU(j)/MAX_nsmoo);
ifil(1,j+1) =ifil(1,j)+nfiles;
nfiles = ceil(nBlockPerCPU(j)/MAX_ninno);
ifil(2,j+1) =ifil(2,j)+nfiles;
nfiles = ceil(nBlockPerCPU(j)/MAX_nerro);
ifil(3,j+1) =ifil(3,j)+nfiles;
if run_smoother
nfiles = ceil(nBlockPerCPU(j)/MAX_nsmoo);
ifil(1,j+1) =ifil(1,j)+nfiles;
nfiles = ceil(nBlockPerCPU(j)/MAX_ninno);
ifil(2,j+1) =ifil(2,j)+nfiles;
nfiles = ceil(nBlockPerCPU(j)/MAX_nerro);
ifil(3,j+1) =ifil(3,j)+nfiles;
end
if naK
nfiles = ceil(nBlockPerCPU(j)/MAX_naK);
ifil(4,j+1) =ifil(4,j)+nfiles;
......
......@@ -163,7 +163,7 @@ for b=fpar:B
end
set_all_parameters(deep);
[dr,info] = resol(oo_.steady_state,0);
SteadyState = dr.ys;
if run_smoother
[alphahat,etahat,epsilonhat,alphatilde,SteadyState,trend_coeff,aK] = ...
DsgeSmoother(deep,gend,Y,data_index,missing_value);
......@@ -225,7 +225,7 @@ for b=fpar:B
irun = irun + ones(7,1);
if irun(1) > MAX_nsmoo || b == B
if run_smoother && (irun(1) > MAX_nsmoo || b == B)
stock = stock_smooth(:,:,1:irun(1)-1);
ifil(1) = ifil(1) + 1;
save([DirectoryName '/' M_.fname '_smooth' int2str(ifil(1)) '.mat'],'stock');
......@@ -239,7 +239,7 @@ for b=fpar:B
irun(1) = 1;
end
if irun(2) > MAX_ninno || b == B
if run_smoother && (irun(2) > MAX_ninno || b == B)
stock = stock_innov(:,:,1:irun(2)-1);
ifil(2) = ifil(2) + 1;
save([DirectoryName '/' M_.fname '_inno' int2str(ifil(2)) '.mat'],'stock');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment