Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doRNG one registerDoRNG(3.14) backend used to generate different sequences of streams of seeds #11

Open
bashirhamidi opened this issue Mar 15, 2019 · 0 comments

Comments

@bashirhamidi
Copy link

Dear Renaud,
I’m using your package in a foreach dopar loop to run a simulation. I’d like to manually split up the simulation to five (5) different machines to reduce computation time.

Entire simulation has 500k loops, but separated to different machine each will have 100k loops. I’d like to have a unique attr(df, "rng") for each of 500k loops using one registerDoRNG seed. For instance, for me to specify

  • machine1 to use registerDoRNG(3.14), generate rngs from 1:100k
  • machine2 to use registerDoRNG(3.14), generate rngs from 100,001:200k
  • repeat for all other machines.

Is there any way I could specify this using doRNG?

Currently I have

registerDoRNG(3.14)
res <- foreach::foreach(i=1:500000,
                               .combine=rbind,
                               .packages = c("permute", "lattice", "matrixStats", "vegan", "HMP")
                               ) %dopar%
  {
    df <- simulation code here
}
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

No branches or pull requests

1 participant