Entering edit mode
Hi!
Trying to run the following command in R fails unless I use the SerialParam:
bplapply(1:6, sqrt, BPPARAM = SerialParam()) -> WORKS
bplapply(1:6, sqrt) -> FAILS (unresponsive)
bplapply(1:6, sqrt, BPPARAM = MulticoreParam(2)) -> FAILS (unresponsive)
bplapply(1:6, sqrt, BPPARAM = MulticoreParam(1)) -> WORKS
Any ideas what to do?
> sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.3
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] BiocParallel_1.16.6
loaded via a namespace (and not attached):
[1] compiler_3.5.2 snow_0.4-3 parallel_3.5.2 tools_3.5.2 yaml_2.2.0
I have posted various answers on Biostars about how to correctly use parallel processing enabled functions in R; however, I do not cover bplapply. On Windows, the equivalent to
lapply
isparLapply
; on Mac/Linux, it ismclapply
The parallel function to use is usually system dependent.