r-lib / later

Schedule an R function or formula to run after a specified period of time.
https://r-lib.github.io/later
Other
137 stars 27 forks source link

parallel::makeCluster(type="FORK") fails with later attached #148

Closed jzhangc closed 3 years ago

jzhangc commented 3 years ago

Whenever later is attached, the FORK type makeCluster will fail. PSOCK works.

library(later) library(parallel) cl <- makeCluster(2, type = "FORK")

Error message:

Error in makeForkCluster(nnodes = spec, ...) : Cluster setup failed. In addition: Warning message: In socketAccept(socket = socket, blocking = TRUE, open = "a+b", : problem in accepting connections on this socket

Session Info:

R version 4.0.5 (2021-03-31) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Big Sur 10.16 Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib locale: [1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8 attached base packages: [1] parallel stats graphics grDevices utils datasets methods base
other attached packages: [1] later_1.2.0 loaded via a namespace (and not attached): [1] compiler_4.0.5 cli_2.5.0 tools_4.0.5 Rcpp_1.0.6 rlang_0.4.11

wch commented 3 years ago

Using git bisect, it looks like this was introduced by b7ec34c99d12e069a5839f5b9df31c220cd4886f, which was part of #141.