-
Notifications
You must be signed in to change notification settings - Fork 13
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
cannot run varimpact with multicore parallelisation #20
Comments
A few comments, from easy-to-hard grasp:
So, I recommend trying to run with Regarding:
I'm not a varimpact user, so I don't see what the problem really is, but I guess it's that it does not give the same results as when running with |
Thanks very much Henrik, this is really helpful. plan(multisession) does not work for me with varimpact as described above, but I was running it in R Studio. It also does not work in R. When you say "You obviously have to do that outside of the RStudio Console, e.g. in a regular terminal, or gamble and re-enable forked processing in the RStudio Console as explained in ?parallelly::supportsMulticore." - can I do it in R (instead of R Studio) in the R console there? I've just done it in R. But I run plan(multicore) - I was not aware of the points you highlighted - and it worked! Once again, thanks very much! |
'multisession' works equally well in RStudio as when running R in the terminal. My comments above regarding RStudio and parallelization was around 'multicore', i.e. forked processing.
Yes, 'multicore' is enabled when running R in the terminal. It's only in the RStudio Console that it's disabled by default.
Great. So, if I understand it correctly, it works for you in R when you use |
I wish I had something to offer here, but Chris (ck37) knows the inner
workings. Thanks for all your attention to this.
Alan Hubbard
Division of Biostatistics
UC Berkeley
(510)643-6160
http://hubbard.berkeley.edu
…On Wed, Nov 24, 2021 at 12:11 PM Henrik Bengtsson ***@***.***> wrote:
plan(multisession) does not work for me with varimpact as described above,
but I was running it in R Studio. It also does not work in R.
'multisession' works equally well in RStudio as when running R in the
terminal. My comments above regarding RStudio and parallelization was
around 'multicore', i.e. *forked* processing.
When you say "You obviously have to do that outside of the RStudio
Console, e.g. in a regular terminal, or gamble and re-enable forked
processing in the RStudio Console as explained in
?parallelly::supportsMulticore." - can I do it in R (instead of R Studio)
in the R console there?
Yes, 'multicore' is enabled when running R in the terminal. It's only in
the RStudio Console that it's disabled by default.
But I run plan(multicore) - I was not aware of the points you highlighted
- and it worked!
Great. So, if I understand it correctly, it works for you in R when you
use plan(multicore), but not plan(multisession). If so, I suspect there's
something in *varimpact* that *requires* forked parallel processing in
order for it to work. @ck37 <https://github.com/ck37>, do you have any
comments?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#20 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADTKDDKFEW3IJYL26JSOR6LUNVBI3ANCNFSM5IKKOCOA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hi Chris,
It seems that for me at least multicore parallelisation is not working with varimpact, but it might be I am doing something wrong. varimpact now seems to work with my current library (including learners with different parameters) but without parallelisation it has been more than 24hours to run just 2 folds CV and it is still running... I tried to create an example, please see below:
I am using macOS Big Sur, MacBook Air (M1, 2020), 16 GB RAM, 8 cores
R version 4.1.0
As a result I get:
I closed my R session and started again and obtained the same result via "snow":
Any ideas on what might be happening?
I think this is related with plan("multisession"). If I run plan("multicore"), it does not give me those error messages, but I am not sure if it is doing anything. Also, if I run plan("multiprocess"), I get the following message:
This whole problem might be related to the future package. I was wondering if there is a way to pass parallel = "multicore" as an argument to varimpact, similarly to how we do for CV.SuperLearner? That way of doing parallelisation seems to be working fine. With that in mind, I tried to change tmle_estimate_q.R line 118 replacing SuperLearner::SuperLearner by SuperLearner::mcSuperLearner and same for tmle_estimate_g.R line 78, and then I run these two R scripts in my computer after loading varimpact. I did not get any error message but not sure if it is working. Any advice?
Once again, thanks very much for your input on this!
The text was updated successfully, but these errors were encountered: