Fixes with screen output for parallel/octave + cosmethics
parent
8111b671ff
commit
bed32115d2
|
@ -73,7 +73,13 @@ if whoiam
|
||||||
fMessageStatus(0,whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab));
|
fMessageStatus(0,whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab));
|
||||||
end
|
end
|
||||||
for j=fpar:npar,
|
for j=fpar:npar,
|
||||||
|
if exist('OCTAVE_VERSION'),
|
||||||
|
if (whoiam==0),
|
||||||
|
printf(' Parameter %d... ',j);
|
||||||
|
end
|
||||||
|
else
|
||||||
fprintf(' Parameter %d... ',j);
|
fprintf(' Parameter %d... ',j);
|
||||||
|
end
|
||||||
for b = 1:nblck
|
for b = 1:nblck
|
||||||
startline = 0;
|
startline = 0;
|
||||||
for n = 1:NumberOfMcFilesPerBlock
|
for n = 1:NumberOfMcFilesPerBlock
|
||||||
|
@ -116,7 +122,13 @@ for j=fpar:npar,
|
||||||
UDIAG(ligne,6,j-fpar+1) = UDIAG(ligne,6,j-fpar+1) + sum(abs(pmet(:,1)-moyenne).^3)/(n-1);
|
UDIAG(ligne,6,j-fpar+1) = UDIAG(ligne,6,j-fpar+1) + sum(abs(pmet(:,1)-moyenne).^3)/(n-1);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if exist('OCTAVE_VERSION'),
|
||||||
|
if (whoiam==0),
|
||||||
|
printf('Done! \n');
|
||||||
|
end
|
||||||
|
else
|
||||||
fprintf('Done! \n');
|
fprintf('Done! \n');
|
||||||
|
end
|
||||||
if whoiam,
|
if whoiam,
|
||||||
waitbarString = [ 'Parameter ' int2str(j) '/' int2str(npar) ' done.'];
|
waitbarString = [ 'Parameter ' int2str(j) '/' int2str(npar) ' done.'];
|
||||||
fMessageStatus((j-fpar+1)/(npar-fpar+1),whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab))
|
fMessageStatus((j-fpar+1)/(npar-fpar+1),whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab))
|
||||||
|
|
|
@ -266,13 +266,17 @@ while fpar<npar
|
||||||
ifil2 = ifil2 + 1;
|
ifil2 = ifil2 + 1;
|
||||||
irun2 = 0;
|
irun2 = 0;
|
||||||
end
|
end
|
||||||
if exist('OCTAVE_VERSION')
|
if exist('OCTAVE_VERSION'),
|
||||||
|
if (whoiam==0),
|
||||||
printf(['Posterior IRF %3.f%% done\r'],(fpar/npar*100));
|
printf(['Posterior IRF %3.f%% done\r'],(fpar/npar*100));
|
||||||
elseif ~whoiam
|
end
|
||||||
|
elseif ~whoiam,
|
||||||
waitbar(fpar/npar,h);
|
waitbar(fpar/npar,h);
|
||||||
end
|
end
|
||||||
if whoiam,
|
if whoiam,
|
||||||
|
if ~exist('OCTAVE_VERSION')
|
||||||
fprintf('Done! \n');
|
fprintf('Done! \n');
|
||||||
|
end
|
||||||
waitbarString = [ 'Subdraw ' int2str(fpar) '/' int2str(npar) ' done.'];
|
waitbarString = [ 'Subdraw ' int2str(fpar) '/' int2str(npar) ' done.'];
|
||||||
fMessageStatus((fpar-fpar0)/(npar-fpar0),whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab));
|
fMessageStatus((fpar-fpar0)/(npar-fpar0),whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab));
|
||||||
end
|
end
|
||||||
|
|
|
@ -164,7 +164,9 @@ for b = fblck:nblck,
|
||||||
if exist('OCTAVE_VERSION') || options_.console_mode
|
if exist('OCTAVE_VERSION') || options_.console_mode
|
||||||
if mod(j, 10) == 0
|
if mod(j, 10) == 0
|
||||||
if exist('OCTAVE_VERSION')
|
if exist('OCTAVE_VERSION')
|
||||||
|
if (whoiam==0),
|
||||||
printf('MH: Computing Metropolis-Hastings (chain %d/%d): %3.f%% done, acception rate: %3.f%%\r', b, nblck, 100 * prtfrc, 100 * isux / j);
|
printf('MH: Computing Metropolis-Hastings (chain %d/%d): %3.f%% done, acception rate: %3.f%%\r', b, nblck, 100 * prtfrc, 100 * isux / j);
|
||||||
|
end
|
||||||
else
|
else
|
||||||
fprintf(' MH: Computing Metropolis-Hastings (chain %d/%d): %3.f \b%% done, acception rate: %3.f \b%%\r', b, nblck, 100 * prtfrc, 100 * isux / j);
|
fprintf(' MH: Computing Metropolis-Hastings (chain %d/%d): %3.f \b%% done, acception rate: %3.f \b%%\r', b, nblck, 100 * prtfrc, 100 * isux / j);
|
||||||
end
|
end
|
||||||
|
|
|
@ -290,14 +290,18 @@ for b=fpar:B
|
||||||
% DirectoryName=TempPath;
|
% DirectoryName=TempPath;
|
||||||
|
|
||||||
|
|
||||||
if exist('OCTAVE_VERSION')
|
if exist('OCTAVE_VERSION'),
|
||||||
|
if (whoiam==0),
|
||||||
printf('Taking subdraws: %3.f%% done\r', b/B*100);
|
printf('Taking subdraws: %3.f%% done\r', b/B*100);
|
||||||
|
end
|
||||||
elseif ~whoiam,
|
elseif ~whoiam,
|
||||||
waitbar(b/B,h);
|
waitbar(b/B,h);
|
||||||
end
|
end
|
||||||
|
|
||||||
if whoiam,
|
if whoiam,
|
||||||
|
if ~exist('OCTAVE_VERSION')
|
||||||
fprintf('Done! \n');
|
fprintf('Done! \n');
|
||||||
|
end
|
||||||
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));
|
fMessageStatus((b-fpar+1)/(B-fpar+1),whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab));
|
||||||
end
|
end
|
||||||
|
|
|
@ -201,7 +201,9 @@ for b = fblck:nblck,
|
||||||
if exist('OCTAVE_VERSION') || options_.console_mode
|
if exist('OCTAVE_VERSION') || options_.console_mode
|
||||||
if mod(j, 10) == 0
|
if mod(j, 10) == 0
|
||||||
if exist('OCTAVE_VERSION')
|
if exist('OCTAVE_VERSION')
|
||||||
|
if (whoiam==0)
|
||||||
printf('MH: Computing Metropolis-Hastings (chain %d/%d): %3.f%% done, acception rate: %3.f%%\r', b, nblck, 100 * prtfrc, 100 * isux / j);
|
printf('MH: Computing Metropolis-Hastings (chain %d/%d): %3.f%% done, acception rate: %3.f%%\r', b, nblck, 100 * prtfrc, 100 * isux / j);
|
||||||
|
end
|
||||||
else
|
else
|
||||||
s0=repmat('\b',1,length(newString));
|
s0=repmat('\b',1,length(newString));
|
||||||
newString=sprintf('MH: Computing Metropolis-Hastings (chain %d/%d): %3.f%% done, acceptance rate: %3.f%%', b, nblck, 100 * prtfrc, 100 * isux / j);
|
newString=sprintf('MH: Computing Metropolis-Hastings (chain %d/%d): %3.f%% done, acceptance rate: %3.f%%', b, nblck, 100 * prtfrc, 100 * isux / j);
|
||||||
|
|
Loading…
Reference in New Issue