-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error parallelizing fitGAM #43
Comments
Hi @trebbiano I'm not sure how much we can help with this; It does seem that Let us know if that works for you. |
Thanks for the reply. I have updated to the latest > sce5k <- fitGAM(counts = countsOrdered, sds = crv1, nknots=15, verbose=TRUE, genes=1:5000, parallel=TRUE, BPPARAM=BPPARAM)
Adding 2265 jobs ...
Submitting 2265 jobs in 12 chunks using cluster functions 'Multicore' ...
Clearing registry ...
Error in names(res) <- nms :
'names' attribute [5000] must be the same length as the vector [2265] 2265 is the number of cells in this dataset and is equivalent to the 23989 above, otherwise the datasets are equivalent. I also tried the sub-sampling at lower knots number as you suggested, which produces a yet different error: > sce100knots6 <- fitGAM(counts = countsOrdered, sds = crv1, nknots=6, verbose=TRUE, genes=1:100, BPPARAM=BPPARAM, parallel=TRUE)
Adding 2265 jobs ...
Submitting 2265 jobs in 12 chunks using cluster functions 'Multicore' ...
Clearing registry ...
Error: BiocParallel errors
element index: 1, 2, 3, 4, 5, 6, ...
first error: unused arguments (B2M = 120, TMSB4X = 48, MT.CO1 = 59, RPL41 = 48, EEF1A1 = 57, RPL13 = 55, RPS12 = 46, RPL10 = 41, MT.A
TP6 = 52, MT.CO2 = 49, RPLP1 = 63, TPT1 = 35, RPS27 = 51, RPS18 = 55, MT.CO3 = 31, RPL28 = 39, RPS19 = 17, RPS15A = 32, MT.CYB = 31, RP
S27A = 33, RPS2 = 24, RPL34 = 25, RPL30 = 46, RPS14 = 34, TMSB10 = 25, RPL32 = 31, RPS3 = 26, RPS23 = 26, RPS24 = 29, RPS8 = 28, RPL19
= 24, GNLY = 0, RPS3A = 22, RPL11 = 26, RPL3 = 20, ACTB = 22, RPL39 = 22, CCL5 = 8, RPL37 = 19, PTMA = 30, RPL26 = 24, RPL21 = 28, RPS2
9 = 19, MT.ND3 = 27, RPL13A = 38, RPS6 = 23, RPL18A = 26, RPS28 = 25, RPLP2 = 18, MT.ND4 = 28, RPL12 = 15, RPS15 = 21, RPL7A = 11, AC00
4086.1 = 26, RPL23A = 23, RPS7 = 16, RPS25 = 16, RPS4X = 15, NKG7 = 1, RPL35A = 17, RPL14 = 10, RPL18 = 22, RPL27A = 27, HLA.A = 13, FA
U = 11, RPL9 = 21, RPL15 = 17, HLA.C = 12, RPL29 = 10, RPS16 = 25, HLA.B = 12, RPS21 = 20, RPL37A = 16, RPL5 = 16, RPS9 = 1 I never encountered these issues with the parallel mode switched off. |
Hi @trebbiano Thank you for checking that. The error may be a bug in subsetting the genes, I'l llook into that and keep you updated.
|
For 200 genes, this direct subsetting gives the same error message as using > sce200Sub <- fitGAM(counts = countsOrdered[1:200,], sds = crv1, nknots=6, verbose=TRUE, parallel = TRUE, BPPARAM=BPPARAM)
Adding 2265 jobs ...
Submitting 2265 jobs in 12 chunks using cluster functions 'Multicore' ...
Clearing registry ...
Error: BiocParallel errors
element index: 1, 2, 3, 4, 5, 6, ...
first error: unused arguments (B2M = 120, TMSB4X = 48, MT.CO1 = 59, RPL41 = 48, EEF1A1 = 57, RPL13 = 55, RPS12 = 46, RPL10 = 41, MT.ATP6 = 52, MT.CO2 = 49, RPLP1 = 63, TPT1 = 35, RPS27 = 51, RPS18 = 55, MT.CO3 = 31, RPL28 = 39, RPS19 = 17, RPS15A = 32, MT.CYB = 31, RPS27A = 33, RPS2 = 24, RPL34 = 25, RPL30 = 46, RPS14 = 34, TMSB10 = 25, RPL32 = 31, RPS3 = 26, RPS23 = 26, RPS24 = 29, RPS8 = 28, RPL19 = 24, GNLY = 0, RPS3A = 22, RPL11 = 26, RPL3 = 20, ACTB = 22, RPL39 = 22, CCL5 = 8, RPL37 = 19, PTMA = 30, RPL26 = 24, RPL21 = 28, RPS29 = 19, MT.ND3 = 27, RPL13A = 38, RPS6 = 23, RPL18A = 26, RPS28 = 25, RPLP2 = 18, MT.ND4 = 28, RPL12 = 15, RPS15 = 21, RPL7A = 11, AC004086.1 = 26, RPL23A = 23, RPS7 = 16, RPS25 = 16, RPS4X = 15, NKG7 = 1, RPL35A = 17, RPL14 = 10, RPL18 = 22, RPL27A = 27, HLA.A = 13, FAU = 11, RPL9 = 21, RPL15 = 17, HLA.C = 12, RPL29 = 10, RPS16 = 25, HLA.B = 12, RPS21 = 20, RPL37A = 16, RPL5 = 16, RPS9 = 1 For completeness I also tried the direct subsetting for the larger gene set and higher knots which produced the same error as > sce5kSub <- fitGAM(counts = countsOrdered[1:5000,], sds = crv1, nknots=15, verbose=TRUE, parallel = TRUE, BPPARAM=BPPARAM) Adding 2265 jobs ...
Submitting 2265 jobs in 12 chunks using cluster functions 'Multicore' ...
Clearing registry ...
Error in names(res) <- nms :
'names' attribute [5000] must be the same length as the vector [2265] Thanks for looking into this! |
Hi @trebbiano I'm not getting any errors when parallelizing the fitting using your settings (but reduced to 2 workers), also not when subsetting genes. I tried this by borrowing code from #37 which I paste below. Could you check if this errors for you? It may be worth updating
|
Thanks for working on this issue. I was able to run this code using up to date release versions (+ > sce <- fitGAM(counts = counts, sds = crv, nknots = 6, verbose = TRUE, BPPARAM = BPPARAM, parallel = TRUE)
Adding 100 jobs ...
Submitting 100 jobs in 2 chunks using cluster functions 'Multicore' ...
Clearing registry ...
Error in names(res) <- nms :
'names' attribute [4921] must be the same length as the vector [100]
> sce <- fitGAM(counts = counts, sds = crv, nknots = 6, genes=1:200, verbose = TRUE, BPPARAM = BPPARAM, parallel = TRUE)
Adding 100 jobs ...
Submitting 100 jobs in 2 chunks using cluster functions 'Multicore' ...
Clearing registry ...
Error in names(res) <- nms :
'names' attribute [200] must be the same length as the vector [100] Traceback: > traceback()
8: BiocParallel::bplapply(as.data.frame(t(as.matrix(counts)[id,
])), counts_to_Gam, BPPARAM = BPPARAM)
7: BiocParallel::bplapply(as.data.frame(t(as.matrix(counts)[id,
])), counts_to_Gam, BPPARAM = BPPARAM)
6: .fitGAM(counts = counts, U = U, pseudotime = pseudotime, cellWeights = cellWeights,
genes = genes, weights = weights, offset = offset, nknots = nknots,
verbose = verbose, parallel = parallel, BPPARAM = BPPARAM,
control = control, sce = sce, family = family)
5: .local(counts, ...)
4: fitGAM(counts = counts, sds = crv, nknots = 6, genes = 1:200,
verbose = TRUE, BPPARAM = BPPARAM, parallel = TRUE)
3: fitGAM(counts = counts, sds = crv, nknots = 6, genes = 1:200,
verbose = TRUE, BPPARAM = BPPARAM, parallel = TRUE)
2: .traceback(x)
1: traceback(sce <- fitGAM(counts = counts, sds = crv, nknots = 6,
genes = 1:200, verbose = TRUE, BPPARAM = BPPARAM, parallel = TRUE)) Here is my > BPPARAM
class: BatchtoolsParam
bpisup: FALSE; bpnworkers: 2; bptasks: 40; bpjobname: BPJOB
bplog: FALSE; bpthreshold: INFO; bpstopOnError: TRUE
bpRNGseed: NA; bptimeout: 2592000; bpprogressbar: TRUE
bpexportglobals: TRUE
bplogdir: NA
bpresultdir: NA
cluster type: multicore
template: NA
registryargs:
file.dir: /gpfs/home/trebbiano/file772e5b48e335
work.dir: getwd()
packages: character(0)
namespaces: character(0)
source: character(0)
load: character(0)
make.default: FALSE
saveregistry: FALSE
resources: Does this differ from yours? I would guess a hardware configuration difference but then why would that produce a different size vector? Could |
Hi @trebbiano, since you are experiencing the error using the same code but I cannot reproduce it I assume it must be something about either the system or the Here is my output for
|
That looks quite different! Let me look into what the parameter settings mean and if I can adjust them to look similar to yours. If they are not enforced by the hardware configuration it may be possible. |
Hi @trebbiano |
Hi, I'm running v1.1.16 in R3.6.1 in a CentOS environment (more info below). I get the following error running
fitGAM
in parallel mode:The same command runs fine without
parallel = TRUE
but the cpu time is prohibitively long.The error seems to come from
batchtools
but could be related to howtradeSeq
prepares the jobs. Thanks in advance for looking into this!Relevant upstream code:
The text was updated successfully, but these errors were encountered: