under parallel execution do not do parallel plots when some slave is octave, irrespective to master being matlab.
parent
a016d3c521
commit
4c6a01da2e
|
@ -439,11 +439,18 @@ if ~exist('OCTAVE_VERSION')
|
||||||
if isnumeric(options_.parallel) || (M_.exo_nbr*ceil(size(varlist,1)/MaxNumberOfPlotPerFigure))<8,
|
if isnumeric(options_.parallel) || (M_.exo_nbr*ceil(size(varlist,1)/MaxNumberOfPlotPerFigure))<8,
|
||||||
[fout] = PosteriorIRF_core2(localVars,1,M_.exo_nbr,0);
|
[fout] = PosteriorIRF_core2(localVars,1,M_.exo_nbr,0);
|
||||||
else
|
else
|
||||||
globalVars = struct('M_',M_, ...
|
isRemoteOctave = 0;
|
||||||
'options_', options_);
|
for indPC=1:length(options_.parallel),
|
||||||
|
isRemoteOctave = isRemoteOctave + (findstr(options_.parallel(indPC).MatlabOctavePath, 'octave'));
|
||||||
[fout] = masterParallel(options_.parallel, 1, M_.exo_nbr,NamFileInput,'PosteriorIRF_core2', localVars, globalVars, options_.parallel_info);
|
end
|
||||||
|
if isRemoteOctave
|
||||||
|
[fout] = PosteriorIRF_core2(localVars,1,M_.exo_nbr,0);
|
||||||
|
else
|
||||||
|
globalVars = struct('M_',M_, ...
|
||||||
|
'options_', options_);
|
||||||
|
|
||||||
|
[fout] = masterParallel(options_.parallel, 1, M_.exo_nbr,NamFileInput,'PosteriorIRF_core2', localVars, globalVars, options_.parallel_info);
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
% END parallel code!
|
% END parallel code!
|
||||||
|
|
30
matlab/pm3.m
30
matlab/pm3.m
|
@ -149,17 +149,25 @@ localVars.Mean=Mean;
|
||||||
|
|
||||||
|
|
||||||
if ~exist('OCTAVE_VERSION')
|
if ~exist('OCTAVE_VERSION')
|
||||||
% Commenting for testing!
|
% Commenting for testing!
|
||||||
if isnumeric(options_.parallel) || ceil(size(varlist,1)/MaxNumberOfPlotsPerFigure)<4,
|
if isnumeric(options_.parallel) || ceil(size(varlist,1)/MaxNumberOfPlotsPerFigure)<4,
|
||||||
fout = pm3_core(localVars,1,nvar,0);
|
fout = pm3_core(localVars,1,nvar,0);
|
||||||
|
|
||||||
% Parallel execution!
|
% Parallel execution!
|
||||||
else
|
else
|
||||||
globalVars = struct('M_',M_, ...
|
isRemoteOctave = 0;
|
||||||
'options_', options_, ...
|
for indPC=1:length(options_.parallel),
|
||||||
'oo_', oo_);
|
isRemoteOctave = isRemoteOctave + (findstr(options_.parallel(indPC).MatlabOctavePath, 'octave'));
|
||||||
[fout, nBlockPerCPU, totCPU] = masterParallel(options_.parallel, 1, nvar, [],'pm3_core', localVars,globalVars, options_.parallel_info);
|
end
|
||||||
end
|
if isRemoteOctave
|
||||||
|
fout = pm3_core(localVars,1,nvar,0);
|
||||||
|
else
|
||||||
|
globalVars = struct('M_',M_, ...
|
||||||
|
'options_', options_, ...
|
||||||
|
'oo_', oo_);
|
||||||
|
[fout, nBlockPerCPU, totCPU] = masterParallel(options_.parallel, 1, nvar, [],'pm3_core', localVars,globalVars, options_.parallel_info);
|
||||||
|
end
|
||||||
|
end
|
||||||
else
|
else
|
||||||
% For the time being in Octave enviroment the pm3.m is executed only in
|
% For the time being in Octave enviroment the pm3.m is executed only in
|
||||||
% serial modality, to avoid problem with the plots.
|
% serial modality, to avoid problem with the plots.
|
||||||
|
|
Loading…
Reference in New Issue