Question: bplapply - only SerialParam or single worker Multicore working on R/macos 10.14
0
gravatar for geo.vogler
7 days ago by
geo.vogler10
geo.vogler10 wrote:

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 
biocparallel R mac • 68 views
ADD COMMENTlink modified 7 days ago by Martin Morgan ♦♦ 23k • written 7 days ago by geo.vogler10

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 is parLapply; on Mac/Linux, it is mclapply

The parallel function to use is usually system dependent.

ADD REPLYlink modified 7 days ago • written 7 days ago by Kevin Blighe40
Answer: bplapply - only SerialParam or single worker Multicore working on R/macos 10.14
1
gravatar for Martin Morgan
7 days ago by
Martin Morgan ♦♦ 23k
United States
Martin Morgan ♦♦ 23k wrote:

These functions communicate via 'ports', and likely ports on your machine are not accessible. It might take some research to identify open ports, and then provide manager.port=... to the constructor.

You might also be interested in the LocalParam() type, available after

BiocManager::install("Bioconductor/BiocParallel", ref="LocalParam")
ADD COMMENTlink written 7 days ago by Martin Morgan ♦♦ 23k
1

Works!

register( BPPARAM = LocalParam(10))

bplapply(1:6, sqrt) -> WORKS

Many thanks - that was super helpful :-)

ADD REPLYlink modified 6 days ago • written 6 days ago by geo.vogler10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 284 users visited in the last hour