Question: sva: Parallel execution of sva()-function fails.
1
gravatar for maltethodberg
2.6 years ago by
maltethodberg130
Sweden
maltethodberg130 wrote:

I have been trying to calculate SVs using the sva-package in parallel, but no matter what backend I use, it always fails. Consider for examples this example code based on the vignette:

library(parallel)
library(BiocParallel)
library(sva)
library(bladderbatch)
data(bladderdata)

# Data from the vignette
pheno <- pData(bladderEset)
edata <- exprs(bladderEset)
mod <- model.matrix(~as.factor(cancer), data=pheno)

# Serial execution (Works)
svaSerial <- lapply(1:3, function(x) sva(dat=edata, mod=mod, n.sv=x))

# Parallel execution using parallel (Fails)
svaSerial <- mclapply(1:3, function(x) sva(dat=edata, mod=mod, n.sv=x), mc.cores=3)

# Parallel execution using BioC (Fails)
svaSerial <- bplapply(1:5, function(x) sva(dat=edata, mod=mod, n.sv=x), BPPARAM=MulticoreParam(workers=3))

 The code executes just fine under lapply, but mclapply, bpapply, etc. fails, without any informative error messages.

Any ideas why this is?

sva parallel • 550 views
ADD COMMENTlink modified 2.6 years ago by Martin Morgan ♦♦ 23k • written 2.6 years ago by maltethodberg130
Answer: sva: Parallel execution of sva()-function fails.
0
gravatar for Martin Morgan
2.6 years ago by
Martin Morgan ♦♦ 23k
United States
Martin Morgan ♦♦ 23k wrote:

A simpler example might be

bplapply(1:2, sqrt, BPPARAM=MulticoreParam(2))

In BiocParallel version 1.8.1 or later you might try

options(bphost="localhost")
bplapply(1:2, sqrt, BPPARAM=MulticoreParam(2))

There might also be an issue with blocked ports. BiocParallel chooses a random port between 11000 and 12000. If these are blocked, specify an open port with

options(port=12345)
ADD COMMENTlink written 2.6 years ago by Martin Morgan ♦♦ 23k
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: 283 users visited in the last hour