I'm trying to understand how the random state propagates to the threads when using peach but can't find much documentation on it.
Empirically, from the test below, it seems like the threads do end up with different seeds but these seeds may be unrelated to the random seed of the master.
q) \S 123
q) {[x] show 20?10} peach til 10
5 1 5 7 4 4 2 2 4 9 0 7 6 4 5 2 1 7 1 9
0 3 9 6 4 3 6 0 9 1 6 7 4 4 0 0 7 0 8 4
5 7 9 4 6 8 8 6 4 6 4 7 7 6 8 9 8 7 4 2
2 8 4 2 3 2 0 3 6 3 1 2 7 8 8 3 9 2 7 6
1 0 3 9 5 2 7 5 5 3 1 2 6 1 8 9 5 2 5 5
2 6 6 7 2 0 6 9 1 4 7 9 9 8 2 7 1 4 4 3
3 2 2 0 0 9 2 6 3 1 6 1 6 5 3 4 6 0 8 9
2 3 0 3 4 3 9 0 8 1 5 7 1 1 3 3 0 5 3 4
0 9 5 2 1 2 0 2 6 4 5 7 9 7 2 6 9 1 9 8
5 7 8 0 5 6 0 2 0 0 0 5 6 4 4 8 3 9 9 2
but running both lines a second time does not reproduce this answer.
So my questions are:
- Is there a relationship between the seeds at the threads and the random state of the master?
- Are we guaranteed to get different seeds at each thread?
- Any suggestions on best practices for setting the seed at each thread or other ways of getting reproducible results?
Thanks