Question: BiocParallel-1.4.0 bplapply bug when using nested lists and MulticoreParam
0
gravatar for zigaavsec
3.7 years ago by
zigaavsec0
Germany
zigaavsec0 wrote:

I just discovered a bug in BiocParallel +, version 1.4.0 when using nested lists and MulticoreParam (with BatchJobs it works fine): bplapply applies a function to each subelement of x elements:

library(BiocParallel)
param <- MulticoreParam(1)
register(param)

x <- list(a=list(1,2),b=list(3,5))

bplapply(x,I)
## $a
## [1] 1

## $b
## [1] 2

## $<NA>
## [1] 3

## $<NA>
## [1] 5

lapply(x,I)
## $a
## [[1]]
## [1] 1

## [[2]]
## [1] 2


## $b
## [[1]]
## [1] 3

## [[2]]
## [1] 5

My session info: 

> devtools::session_info()
Session info -------------------------------------------------------------------
setting  value                     
version  R version 3.2.2 (2015-08-14)
system   x86_64, linux-gnu         
ui       X11                       
language (EN)                      
collate  en_US.UTF-8               
tz       Europe/Berlin             
date     2015-12-01                  

Packages -----------------------------------------------------------------------
package        * version date       source      
BiocParallel   * 1.4.0   2015-11-18 Bioconductor
devtools         1.9.1   2015-09-11 CRAN (R 3.2.2)
digest           0.6.8   2014-12-31 CRAN (R 3.2.2)
futile.logger    1.4.1   2015-04-20 CRAN (R 3.2.2)
futile.options   1.0.0   2010-04-06 CRAN (R 3.2.2)
lambda.r         1.1.7   2015-03-20 CRAN (R 3.2.2)
memoise          0.2.1   2014-04-22 CRAN (R 3.2.2)

Is this a known error? Is it fixed in BiocParallel version 1.5.0?

Thanks!

 

 

biocparallel bug • 669 views
ADD COMMENTlink modified 3.7 years ago by Valerie Obenchain6.7k • written 3.7 years ago by zigaavsec0
Answer: BiocParallel-1.4.0 bplapply bug when using nested lists and MulticoreParam
0
gravatar for Valerie Obenchain
3.7 years ago by
United States
Valerie Obenchain6.7k wrote:

Thanks for reporting the bug and providing an example. This was a special case where number of workers = 1; so not really parallel at all. In this case, the method should dispatch to SerialParam() which is now does. You may have noticed the same code with workers > 1 gave the correct results. When no workers are specified they are auto-detected with multicoreWorkers():

> bplapply(x, I, BPPARAM=MulticoreParam())
$a
[[1]]
[1] 1

[[2]]
[1] 2


$b
[[1]]
[1] 3

[[2]]
[1] 5

This is fixed in BiocParallel 1.4.1 in release and 1.5.2 in devel. Both versions are available immediately in svn or with biocLite() tomorrow noon-ish PST.

Valerie

ADD COMMENTlink written 3.7 years ago by Valerie Obenchain6.7k
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: 297 users visited in the last hour