-
Notifications
You must be signed in to change notification settings - Fork 129
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
multisession "future_lapply"
error when R quits: Error in unserialize(node$con) : error reading from connection
#255
Comments
Also, for the non-HPC backends, this one seems specific to |
MWE: library(future)
future::plan(multisession)
f <- future::future(capture.output(1+1, type = "message"))
q()
## Error in unserialize(node$con) : error reading from connection
## Calls: <Anonymous> ... doTryCatch -> recvData -> recvData.SOCKnode -> unserialize
## Execution halted So I think it's because of this |
"future_lapply"
parallelism when R quits."future_lapply"
error when R quits: Error in unserialize(node$con) : error reading from connection
"future_lapply"
error when R quits: Error in unserialize(node$con) : error reading from connection"future_lapply"
error when R quits: Error in unserialize(node$con) : error reading from connection
As @HenrikBengtsson said, users can get around this one either by using library(future)
cl <- parallel::makeCluster(2L)
plan("cluster", workers = cl) ## same as plan(multisession, workers = 2L)
> f <- future(capture.output(message("hello"), type = "message"))
> value(f)
[1] "hello"
> f <- future(capture.output(message("world"), type = "message"))
> value(f)
[1] "world"
> parallel::stopCluster(cl)
> q("no") |
Solution applied from ropensci/drake#255 (comment)
## Fix - fixed problem occurring when performing PCA without mask - fixed issue related to plan(multisession), suggested by @rnedelec on github, following documented issue in ropensci/drake#255 (comment) ## Addition - option added to display progress bar. Set to FALSE as default
The errors are the same as futureverse/future#143. They only appear when I quit the R session, so I cannot use
traceback()
to dig further. They affects both"future_lapply"
parallelism on the master branch and"future"
parallelism on thei227-attempt2
branch (which is almost ready to alpha test).Targets appear to build normally anyway, and the errors do not appear with
drake
5.0.0 (current CRAN version).The text was updated successfully, but these errors were encountered: