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

Corrections in parallelization vignette #22

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

ManonSimonot
Copy link
Collaborator

No description provided.

@astamm
Copy link
Collaborator

astamm commented Jan 7, 2025

Thanks.

Also, benchmarking shows that the future mechanism works as expected but we also need to make sure that the parallel mechanism also works as expected.

On that note, the double parallelism mechanism is required for now because we want to use future but need parallel in optimParallel and rgenoud but it is tricky to set up correctly because when you do:

future::plan(multisession, workers = ncores)
cl <- parallel::makeCluster(ncores)
parallel::setDefaultCluster(cl)

you set up parallel sessions (at least in the case of future). Hence you probably need to declare half the number of cores you want to use to spread all of them between future and parallel. Worth investigating as well.

@astamm
Copy link
Collaborator

astamm commented Jan 7, 2025

Also you need future::multisession in place of multisession unless you import library(future) at the beginning of the document/script.

@astamm
Copy link
Collaborator

astamm commented Jan 7, 2025

Also, when you are done and ready for merge, please let me know if the branch can be deleted (to avoid keeping useless branches). Ideally, we should even fork the repo and send PR from a personal accounts.

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.

2 participants