MarioniLab / DropletUtils

Clone of the Bioconductor repository for the DropletUtils package.
https://bioconductor.org/packages/devel/bioc/html/DropletUtils.html
54 stars 25 forks source link

Error with parallelization when running emptyDrops #65

Closed ycl6 closed 3 years ago

ycl6 commented 3 years ago

Hi, I encounter an error that is similar to the one I reported in scater's repo when I ran emptyDrops.

Error in .local(x, ...): cluster already started
Traceback:

1. emptyDrops(mat, BPPARAM = bpp)
2. emptyDrops(mat, BPPARAM = bpp)
3. .local(m, ...)
4. testEmptyDrops(m, lower = lower, round = FALSE, test.ambient = test.ambient, 
 .     ..., BPPARAM = BPPARAM)
5. bpstart(BPPARAM)
6. bpstart(BPPARAM)
7. .local(x, ...)
8. stop("cluster already started")

Error in serialize(data, node$con, xdr = FALSE): ignoring SIGPIPE signal
Traceback:

1. emptyDrops(mat, BPPARAM = bpp)
2. emptyDrops(mat, BPPARAM = bpp)
3. .local(m, ...)
4. bpstop(BPPARAM)
5. bpstop(BPPARAM)
6. .bpstop_impl(x)
7. .bpstop_nodes(x)
8. .send_to(cluster, i, .DONE())
9. .send_to(cluster, i, .DONE())
10. parallel:::sendData(backend[[node]], value)
11. sendData.SOCK0node(backend[[node]], value)
12. serialize(data, node$con, xdr = FALSE)

I noticed in the source codes

https://github.com/MarioniLab/DropletUtils/blob/71296b6021fc04edf257309c9858dbbc150cf9e2/R/emptyDrops.R#L190

and

https://github.com/MarioniLab/DropletUtils/blob/71296b6021fc04edf257309c9858dbbc150cf9e2/R/emptyDrops.R#L370

probably should be like below as LTLA pointed out in my original issue in scater

    if (.bpNotSharedOrUp(BPPARAM)) {
LTLA commented 3 years ago

Thanks, fixed.