Skip to content

Seed a new rng instead of copying TaskLocalRNG - #340

Open
jitendravjh wants to merge 1 commit into
SciML:masterfrom
jitendravjh:fix-tasklocalrng-identical-noise
Open

jitendravjh wants to merge 1 commit into
SciML:masterfrom
jitendravjh:fix-tasklocalrng-identical-noise

Conversation

@jitendravjh

Copy link
Copy Markdown

copy on a TaskLocalRNG snapshots the current task local state, so two processes built back to back with no rand in between started from the same state and produced identical noise.

Now the seed is drawn from the task local rng instead, so each process gets its own stream. An explicitly passed rng is untouched, and a fixed Random.seed! is still reproducible.

Closes #258

copy on a TaskLocalRNG snapshots the current task local state, so noise processes built back to back started from the same state and produced identical noise.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using TaskLocalRNG results in identical noise across processes

1 participant