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

Add support for parabar parallel backend #137

Closed
mihaiconstantin opened this issue Oct 16, 2024 · 2 comments
Closed

Add support for parabar parallel backend #137

mihaiconstantin opened this issue Oct 16, 2024 · 2 comments

Comments

@mihaiconstantin
Copy link
Contributor

Hi Sacha,

I am trying to add support for the parabar backend, but I need to check with you first where parallelization is currently needed in bootnet. Can I safely assume that, at commit 9df9eab, the following place are the only places where a parallel backend is required?

In R/bootnet.R:

bootnet/R/bootnet.R

Lines 612 to 613 in 9df9eab

# Run loop:
bootResults <- pblapply(seq_len(nBoots), function(b){

bootnet/R/bootnet.R

Lines 788 to 790 in 9df9eab

} else {
statTableBoots <- pblapply(seq_len(nBoots),function(b){
# Set library:

In R/parSim.R:

bootnet/R/parSim.R

Lines 64 to 65 in 9df9eab

# Run the loop:
Results <- pbapply::pblapply(seq_len(totCondition), function(i){

bootnet/R/parSim.R

Lines 95 to 96 in 9df9eab

# Run the loop:
Results <- pblapply(seq_len(totCondition), function(i){

Best,
Mihai

@SachaEpskamp
Copy link
Owner

Hi Mihai,

The parSim function has actually been ported to the parSim package, which I use a lot for simulation studies. I should also make that imported in bootnet instead of having this old code in bootnet. Other than that, indeed only the bootnet function I think.

Best,
Sacha

@mihaiconstantin
Copy link
Contributor Author

Ah, I see. In that case:

  1. The PR with support for parabar backends need to in the context of the parSim package.
  2. The bootnet::bootnet function needs to be updated to use parSim::parSim.

I'll work on (1) and also give (2) a try. Since there are no tests for bootnet, it would be handy if you could take a closer look at the changes for (2). After these are done, I think we can also finally close #82.

Thanks for the clarifications!

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

2 participants