In a single for loop, I use a single random seed to generate all the "random numbers". They are very random as I take one from the stream at a time, without any gap.
However, in parfor, each worker uses a different random seed, therefore, the numbers obtained may have interference with each other. Therefore, they are not really random as they do not come from a single seed.
Also, for my case, I do not know how many random numbers each worker needs beforehand. How can I solve this problem?
Aucun commentaire:
Enregistrer un commentaire