traps for mixed matlab/octave clusters
parent
e94ca34e70
commit
ea57a8dc02
|
@ -132,10 +132,17 @@ end
|
|||
|
||||
jloop=0;
|
||||
|
||||
JSUM = 0;
|
||||
for b = fblck:nblck,
|
||||
jloop=jloop+1;
|
||||
try % Trap in the case matlab slave is called from an octave master.
|
||||
randn('state',record.Seeds(b).Normal);
|
||||
rand('state',record.Seeds(b).Unifor);
|
||||
catch
|
||||
JSUM = JSUM + sum(100*clock);
|
||||
randn('state',JSUM);
|
||||
rand('state',JSUM);
|
||||
end
|
||||
if (options_.load_mh_file~=0) && (fline(b)>1) && OpenOldFile(b)
|
||||
load(['./' MhDirectoryName '/' ModelName '_mh' int2str(NewFile(b)) ...
|
||||
'_blck' int2str(b) '.mat'])
|
||||
|
@ -212,9 +219,14 @@ for b = fblck:nblck,
|
|||
end
|
||||
if mod(j,50)==0 && whoiam
|
||||
% keyboard;
|
||||
if (strcmp([options_.parallel(ThisMatlab).MatlabOctavePath], 'octave'))
|
||||
waitbarString = [ '(' int2str(b) '/' int2str(options_.mh_nblck) '), ' sprintf('accept. %3.f%%',100 *prtfrc)];
|
||||
fMessageStatus(prtfrc,whoiam,waitbarString, waitbarTitle, options_.parallel(ThisMatlab));
|
||||
else
|
||||
waitbarString = [ '(' int2str(b) '/' int2str(options_.mh_nblck) '), ' sprintf('accept. %3.f%%', 100 * isux/j)];
|
||||
fMessageStatus((b-fblck)/(nblck-fblck+1)+prtfrc/(nblck-fblck+1),whoiam,waitbarString, '', options_.parallel(ThisMatlab));
|
||||
end
|
||||
end
|
||||
else
|
||||
if mod(j, 3)==0 && ~whoiam
|
||||
waitbar(prtfrc,hh,[ '(' int2str(b) '/' int2str(options_.mh_nblck) ') ' sprintf('%f done, acceptation rate %f',prtfrc,isux/j)]);
|
||||
|
|
Loading…
Reference in New Issue