posterior_sampler_core: condition setting of seed on presence of Octave
parent
7ff6c5b2b7
commit
b4e2f38b6c
|
@ -126,9 +126,13 @@ for curr_block = fblck:nblck,
|
|||
% Matlab/Octave cluster). Therefore the trap.
|
||||
%
|
||||
% Set the random number generator type (the seed is useless but needed by the function)
|
||||
set_dynare_seed(options_.DynareRandomStreams.algo, options_.DynareRandomStreams.seed);
|
||||
if ~isoctave
|
||||
set_dynare_seed(options_.DynareRandomStreams.algo, options_.DynareRandomStreams.seed);
|
||||
else
|
||||
set_dynare_seed(options_.DynareRandomStreams.seed+curr_block);
|
||||
end
|
||||
% Set the state of the RNG
|
||||
set_dynare_random_generator_state(record.InitialSeeds(curr_block).Unifor, record.InitialSeeds(curr_block).Normal);
|
||||
set_dynare_random_generator_state(record.InitialSeeds(curr_block).Unifor, record.InitialSeeds(curr_block).Normal);
|
||||
catch
|
||||
% If the state set by master is incompatible with the slave, we only reseed
|
||||
set_dynare_seed(options_.DynareRandomStreams.seed+curr_block);
|
||||
|
|
Loading…
Reference in New Issue