Filter löschen
Filter löschen

What is the rule for StreamIndex of Random Number Streams in worker by default

2 Ansichten (letzte 30 Tage)
I want to get reproducible random number sequence in parfor-loops and follow the example in Repeat Random Numbers in parfor-Loops. By the test
parfor i = 1:4
str{i} = RandStream.getGlobalStream;
end
I find that when the number of parfor-loops is larger than the number of workers, the StreamIndex of the random number stream used in parfor-loops is not definite and often switch from several choices.
So what is the rule for StreamIndex on worker by default and how to control it?

Antworten (0)

Kategorien

Mehr zu Parallel for-Loops (parfor) finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by