Question: bplapply - only SerialParam or single worker Multicore working on R/macos 10.14
0
gravatar for geo.vogler
9 months 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 • 285 views
ADD COMMENTlink modified 9 months ago by Martin Morgan ♦♦ 24k • written 9 months 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 9 months ago • written 9 months ago by Kevin Blighe400
Answer: bplapply - only SerialParam or single worker Multicore working on R/macos 10.14
1
gravatar for Martin Morgan
9 months ago by
Martin Morgan ♦♦ 24k
United States
Martin Morgan ♦♦ 24k 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 9 months ago by Martin Morgan ♦♦ 24k
1

Works!

register( BPPARAM = LocalParam(10))

bplapply(1:6, sqrt) -> WORKS

Many thanks - that was super helpful :-)

ADD REPLYlink modified 9 months ago • written 9 months 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: 366 users visited in the last hour