HenrikBengtsson / future

:rocket: R package: future: Unified Parallel and Distributed Processing in R for Everyone
https://future.futureverse.org
957 stars 83 forks source link

RStudio: One-time-per-session warning about disabled multicore processing #318

Closed HenrikBengtsson closed 5 years ago

HenrikBengtsson commented 5 years ago

Several RStudio users were caught by surprise when they updated to future 1.13.0 and (after troubleshooting) discovered that forked processing is now disabled when running R from the RStudio environment. Sorry about that. I can imagine that more people are still discovering this change in behavior, or find it odd, or it doesn't match up with examples they find online, in vignettes etc.

Because of this, I just added the below warning to the development branch (to become future 1.14.0). Is this a good idea, or will that introduce additional confusion?

> library(future)
> plan(multiprocess)
Warning message:
[ONE-TIME WARNING] Forked processing ('multicore') is disabled in future (>= 1.13.0)
when running R from RStudio, because it is considered unstable. Because of this,
plan("multicore") will fall back to plan("sequential"), and plan("multiprocess") will
fall back to plan("multisession") - not plan("multicore") as in the past. For more
details, how to control forked processing or not, and how to silence this warning in
future R sessions, see ?future::supportsMulticore
jmcphers commented 5 years ago

This RStudio issue has some more info on why forking can be problematic in its R session wrapper: https://github.com/rstudio/rstudio/issues/2597

HenrikBengtsson commented 5 years ago

I'll go with this warning for the next release.

kaizen89 commented 4 years ago

Same issue here version 1.15.0

HenrikBengtsson commented 4 years ago

@kaizen89, I'm not sure what "same issue" means. Note that the warning (https://github.com/HenrikBengtsson/future/issues/318#issue-456472836) is intentional and serves to inform RStudio users. We want that warning - without the warning people were more confused.

kaizen89 commented 4 years ago

Oups, sorry. I read the post too fast. So this means that we can no longer use multicore processing with future?

HenrikBengtsson commented 4 years ago

Please read the warning: "... For more details, how to control forked processing or not, and how to silence this warning in future R sessions, see ?future::supportsMulticore ?parallelly::supportsMulticore"