-
Notifications
You must be signed in to change notification settings - Fork 153
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
parallel::makeCluster after setwd() to project directory takes forever #2080
Comments
I had a renv project which run with version 0.17.3. I updated renv to install the version 1.0.11 and fix one problem. Since then, the command
|
Do you mean First, can you try running:
andd see if the issue still reproduces? If it does still, then can you try replacing your project's
and see if that helps? |
Sorry, I mean |
Thanks, this is helpful! Can I ask you to try one more thing, so I can get some more information to fix this on the renv side? Can you try using the following library(utils)
local({
Rprof("trace.Rprof")
on.exit(Rprof(NULL))
source("renv/activate.R")
}) Then, try running: library(parallel)
cl <- makeCluster(1L, type = "PSOCK")
stopCluster(cl)
summaryRprof("trace.Rprof") and let me know what the output there is? |
Here are the 2 tables in the output object. And the 2 other elements :
N.B. : The same renv project is slow when I open it by a double click on the .Rproj file (~ 3 minutes). |
Thanks! Can you confirm whether you're using Bioconductor packages within this project? It looks like the slowness is coming from a call (through the BiocManager package) to check whether the version of R + the version of Bioconductor being used are compatible. |
Yes, I 'm using Bioconductor inside the project. I confirm that. "Bioconductor": { |
I haven't found time yet to run the tests but I am running Bioconductor too.
…On Tue, Jan 28, 2025, 1:51 AM Kevin Ushey ***@***.***> wrote:
Thanks! Can you confirm whether you're using Bioconductor packages within
this project? It looks like the slowness is coming from a call (through the
BiocManager package) to check whether the version of R + the version of
Bioconductor being used are compatible.
—
Reply to this email directly, view it on GitHub
<#2080 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABSHV4LF5MZHHZIVQFG5MED2M3IB5AVCNFSM6AAAAABV4SOEP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJXGM2DCOJZHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
One other (simpler) workaround would be to set:
in your project's |
Thank you for your quick solution. Yes it is faster for sure. |
This should now be fixed in the latest 1.1.0 release; please let me know if you're still having trouble. |
Sorry for my late answer. I just tried the new version renv 1.1.1 and the project opens quickly without adding the lines that you mentioned in the I made a Error in (function (err) : Failed to parse 'renv.lock':
I just saw after this message that there is an issue about this (#2089 ) |
Any chance you can share a reproducible example, or the lock file you have in that project? |
Sure. Here is the lock file that I have. Should I open a new issue for that? |
I am just adapting an existing workflow which makes heavy usage of parallel to renv. First user here, so might be doing something wrong. I noticed that if my R work directory is the project folder (as created using
renv::init()
or reloaded usingrenv::load()
), and I then attempt to create my usual parallel cluster usingparallel::makeCluster()
, then it takes forever (a least 5-10 min, I have always ended up cancelling). Normally it might take 10-20 seconds but not this long. My current solution is to create a subfolder within the project folder andsetwd()
to it, it does work normally, but I was wondering whether this is expected behaviour.And yes, I have read that setting work directory can be bad practice. I need to do it for 2 reasons:
setwd()
.Below abbreviated output from sessionInfo():
The text was updated successfully, but these errors were encountered: