Fixes with screen output for parallel/octave + cosmethics

time-shift
Marco Ratto 2011-02-02 14:13:11 +01:00
parent 8111b671ff
commit bed32115d2
5 changed files with 171 additions and 147 deletions

View File

@ -73,7 +73,13 @@ if whoiam
fMessageStatus(0,whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab));
end
for j=fpar:npar,
if exist('OCTAVE_VERSION'),
if (whoiam==0),
printf(' Parameter %d... ',j);
end
else
fprintf(' Parameter %d... ',j);
end
for b = 1:nblck
startline = 0;
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);
end
end
if exist('OCTAVE_VERSION'),
if (whoiam==0),
printf('Done! \n');
end
else
fprintf('Done! \n');
end
if whoiam,
waitbarString = [ 'Parameter ' int2str(j) '/' int2str(npar) ' done.'];
fMessageStatus((j-fpar+1)/(npar-fpar+1),whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab))

View File

@ -266,13 +266,17 @@ while fpar<npar
ifil2 = ifil2 + 1;
irun2 = 0;
end
if exist('OCTAVE_VERSION')
if exist('OCTAVE_VERSION'),
if (whoiam==0),
printf(['Posterior IRF %3.f%% done\r'],(fpar/npar*100));
elseif ~whoiam
end
elseif ~whoiam,
waitbar(fpar/npar,h);
end
if whoiam,
if ~exist('OCTAVE_VERSION')
fprintf('Done! \n');
end
waitbarString = [ 'Subdraw ' int2str(fpar) '/' int2str(npar) ' done.'];
fMessageStatus((fpar-fpar0)/(npar-fpar0),whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab));
end

View File

@ -164,7 +164,9 @@ for b = fblck:nblck,
if exist('OCTAVE_VERSION') || options_.console_mode
if mod(j, 10) == 0
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);
end
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);
end

View File

@ -290,14 +290,18 @@ for b=fpar:B
% DirectoryName=TempPath;
if exist('OCTAVE_VERSION')
if exist('OCTAVE_VERSION'),
if (whoiam==0),
printf('Taking subdraws: %3.f%% done\r', b/B*100);
end
elseif ~whoiam,
waitbar(b/B,h);
end
if whoiam,
if ~exist('OCTAVE_VERSION')
fprintf('Done! \n');
end
waitbarString = [ 'Subdraw ' int2str(b) '/' int2str(B) ' done.'];
fMessageStatus((b-fpar+1)/(B-fpar+1),whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab));
end

View File

@ -201,7 +201,9 @@ for b = fblck:nblck,
if exist('OCTAVE_VERSION') || options_.console_mode
if mod(j, 10) == 0
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);
end
else
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);