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

fix computation of initial prc0 under mh_recover (to avoid 0% being always...

fix computation of initial prc0 under mh_recover (to avoid 0% being always displayed when recovery starts)
parent aad5c360
No related branches found
No related tags found
No related merge requests found
......@@ -172,11 +172,19 @@ for curr_block = fblck:nblck
logpo2 = zeros(InitSizeArray(curr_block),1);
end
end
if mh_recover_flag==0
accepted_draws_this_chain = 0;
accepted_draws_this_file = 0;
feval_this_chain = 0;
feval_this_file = 0;
draw_iter = 1;
draw_index_current_file = fline(curr_block); %get location of first draw in current block
end
%Prepare waiting bars
if whoiam
refresh_rate = sampler_options.parallel_bar_refresh_rate;
bar_title = sampler_options.parallel_bar_title;
prc0=(curr_block-fblck)/(nblck-fblck+1)*(isoctave || options_.console_mode);
prc0=(curr_block-fblck)/(nblck-fblck+1)*(isoctave || options_.console_mode)+(draw_iter-1)/nruns(curr_block);
hh_fig = dyn_waitbar({prc0,whoiam,options_.parallel(ThisMatlab)},[bar_title ' (' int2str(curr_block) '/' int2str(options_.mh_nblck) ')...']);
else
refresh_rate = sampler_options.serial_bar_refresh_rate;
......@@ -184,14 +192,6 @@ for curr_block = fblck:nblck
hh_fig = dyn_waitbar(0,[bar_title ' (' int2str(curr_block) '/' int2str(options_.mh_nblck) ')...']);
set(hh_fig,'Name',bar_title);
end
if mh_recover_flag==0
accepted_draws_this_chain = 0;
accepted_draws_this_file = 0;
feval_this_chain = 0;
feval_this_file = 0;
draw_iter = 1;
draw_index_current_file = fline(curr_block); %get location of first draw in current block
end
sampler_options.curr_block = curr_block;
while draw_iter <= nruns(curr_block)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment