Skip to content
Snippets Groups Projects
Commit 1e4a7c2c authored by stepan's avatar stepan
Browse files

* Cosmetic changes.

* Bug fix (with octave-3.2.2) in McMCDiagnostics.m

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2973 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 79125b89
No related branches found
No related tags found
No related merge requests found
......@@ -48,12 +48,15 @@ MAX_nruns = ceil(options_.MaxNumberOfBytes/(npar+2)/8);
load([MhDirectoryName '/' M_.fname '_mh_history.mat'])
mcfiles = [];
for blck = 1:nblck
mcfiles = cat(3,mcfiles,dir([MhDirectoryName ,filesep, M_.fname '_mh*_blck' int2str(blck) '.mat']));
NumberOfMcFilesPerBlock = size(dir([MhDirectoryName ,filesep, M_.fname '_mh*_blck1.mat']),1);
for blck = 2:nblck
tmp = size(dir([MhDirectoryName ,filesep, M_.fname '_mh*_blck' int2str(blck) '.mat']),1);
if tmp~=NumberOfMcFilesPerBlock
disp(['McMCDiagnostics:: The number of mh files in chain ' int2str(blck) ' is ' int2str(tmp) ' while'])
disp([' the number of mh files in chain 1 is ' int2str(mcfiles) '!'])
error('The number of mh files has to be constant across chains!')
end
end
NumberOfMcFilesPerBlock = size(mcfiles,1);
PastDraws = sum(record.MhDraws,1);
LastFileNumber = PastDraws(2);
......@@ -81,7 +84,6 @@ if TeX
fprintf(fidTeX,' \n');
end
disp('MCMC Diagnostics: Univariate convergence diagnostic, Brooks and Gelman (1998):')
localVars.MhDirectoryName = MhDirectoryName;
......@@ -98,16 +100,12 @@ if isnumeric(options_.parallel),% | isunix, % for the moment exclude unix platfo
fout = McMCDiagnostics_core(localVars,1,npar,0);
UDIAG = fout.UDIAG;
clear fout
else
[fout, nBlockPerCPU, totCPU] = masterParallel(options_.parallel, 1, npar,{},'McMCDiagnostics_core', localVars);
UDIAG = fout(1).UDIAG;
for j=2:totCPU,
UDIAG = cat(3,UDIAG ,fout(j).UDIAG);
end
end
% for j=1:npar
......
......@@ -24,7 +24,6 @@ UDIAG = zeros(NumberOfLines,6,npar-fpar+1);
waitbarTitle=[Parallel(ThisMatlab).PcName];
end
fMessageStatus(0,whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab), MasterName, DyMo);
end
for j=fpar:npar,
fprintf(' Parameter %d... ',j);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment