BiocParallel : unable to find an inherited method for function 'bplapply' for signature '"integer", "call"'
1
1
Entering edit mode
@wolfgang-raffelsberger-2876
Last seen 12 days ago
France

Dear expeRts,

I've been using sucessfully multi-processor functionalities from the package BiocParallel on Windows. Now I'm experiencing a problem on Ubuntu-Linux (18.04 LTS) :

Since my functions didn't work, I realized that even the quick-start example from the "Introduction to BiocParallel" vignette doesn't work on my Linux. Any suggestions what I've been missing ?

Thank's in advance, Wolfgang

> library(BiocParallel)
> 
> FUN <- function(x) { round(sqrt(x), 4) }
> 
> options(MulticoreParam=quote(MulticoreParam(workers=4)))
>
> bpparam()
MulticoreParam(workers = 4)
>
>
> bplapply(1:4, FUN)
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘bplapply’ for signature ‘"integer", "call"’
>
>
> registered()
$MulticoreParam
class: MulticoreParam
  bpisup: FALSE; bpnworkers: 3; bptasks: 0; bpjobname: BPJOB
  bplog: FALSE; bpthreshold: INFO; bpstopOnError: TRUE
  bpRNGseed: ; bptimeout: 2592000; bpprogressbar: FALSE
  bpexportglobals: TRUE
  bplogdir: NA
  bpresultdir: NA
  cluster type: FORK

$SnowParam
class: SnowParam
  bpisup: FALSE; bpnworkers: 6; bptasks: 0; bpjobname: BPJOB
  bplog: FALSE; bpthreshold: INFO; bpstopOnError: TRUE
  bpRNGseed: ; bptimeout: 2592000; bpprogressbar: FALSE
  bpexportglobals: TRUE
  bplogdir: NA
  bpresultdir: NA
  cluster type: SOCK

$SerialParam
class: SerialParam
  bpisup: FALSE; bpnworkers: 1; bptasks: 0; bpjobname: BPJOB
  bplog: FALSE; bpthreshold: INFO; bpstopOnError: TRUE
  bpRNGseed: ; bptimeout: 2592000; bpprogressbar: FALSE
  bpexportglobals: TRUE
  bplogdir: NA
  bpresultdir: NA

> 
>
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
 [1] LC_CTYPE=fr_FR.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=fr_FR.UTF-8        LC_COLLATE=fr_FR.UTF-8    
 [5] LC_MONETARY=fr_FR.UTF-8    LC_MESSAGES=fr_FR.UTF-8   
 [7] LC_PAPER=fr_FR.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] BiocParallel_1.22.0

loaded via a namespace (and not attached):
[1] compiler_4.0.2 parallel_4.0.2
>
software error • 402 views
ADD COMMENT
1
Entering edit mode
@martin-morgan-1513
Last seen 3 months ago
United States

Try to set the option without quote()

> options(MulticoreParam=quote(MulticoreParam(workers=4)))
> bpparam()
MulticoreParam(workers = 4)
> res = bplapply(1:3, sqrt)
Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function 'bplapply' for signature '"integer", "call"'
> options(MulticoreParam=MulticoreParam(workers=4))
> bpparam()
class: MulticoreParam
  bpisup: FALSE; bpnworkers: 4; bptasks: 0; bpjobname: BPJOB
  bplog: FALSE; bpthreshold: INFO; bpstopOnError: TRUE
  bpRNGseed: ; bptimeout: 2592000; bpprogressbar: FALSE
  bpexportglobals: TRUE
  bplogdir: NA
  bpresultdir: NA
  cluster type: FORK   
> res = bplapply(1:3, sqrt)
>
ADD COMMENT
0
Entering edit mode

Great, this worked ! Big thanks !!

ADD REPLY

Login before adding your answer.

Traffic: 411 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6