Closed AmandaHWChong closed 1 year ago
This seems like an error in parallelization, so try running with a single thread by including the argument BPPARAM=BiocParallel::SerialParam()
.
It works! Perfect, thank you for your help!
Hi @smgogarten , getting the same error.
> mypcrelate <- pcrelate(gds,
pcs = mypcair$vectors[,1:8],
training.set = mypcair$unrels
)
Using 18 CPU cores
676 samples to be included in the analysis...
Betas for 8 PC(s) will be calculated using 647 samples in training.set...
Running PC-Relate analysis for 676 samples using 488830 SNPs in 49 blocks...
Error in if (idx <= length(redo.index)) idx <- redo.index[idx] else idx <- idx - :
argument is of length zero
In addition: Warning messages:
1: In parallel::mccollect(wait = TRUE) :
5 parallel jobs did not deliver results
2: In parallel::mccollect(wait = FALSE, timeout = 1) :
1 parallel job did not deliver a result
Running it in serial does work, but is there a timeline for fixing the parallel? It would be ...very desired for a dataset of typical size these days. I am wondering if it is a call somewhere where mccollect
having wait = FALSE
just exits before several blocks are finished?
> sessionInfo()
R version 4.4.1 (2024-06-14)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 22.04.4 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
time zone: America/Los_Angeles
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] data.table_1.15.4 BiocParallel_1.38.0 Matrix_1.6-5
[4] GWASTools_1.50.0 Biobase_2.64.0 BiocGenerics_0.50.0
[7] GENESIS_2.34.0 SNPRelate_1.38.0 gdsfmt_1.40.0
loaded via a namespace (and not attached):
[1] tidyselect_1.2.1 dplyr_1.1.4 blob_1.2.4
[4] Biostrings_2.72.1 fastmap_1.2.0 rpart_4.1.23
[7] lifecycle_1.0.4 survival_3.7-0 RSQLite_2.3.7
[10] magrittr_2.0.3 compiler_4.4.1 rlang_1.1.4
[13] tools_4.4.1 utf8_1.2.4 bit_4.0.5
[16] SeqArray_1.44.0 purrr_1.0.2 GWASExactHW_1.2
[19] nnet_7.3-19 grid_4.4.1 stats4_4.4.1
[22] fansi_1.0.6 jomo_2.7-6 mice_3.16.0
[25] iterators_1.0.14 MASS_7.3-61 cli_3.6.3
[28] crayon_1.5.3 generics_0.1.3 httr_1.4.7
[31] minqa_1.2.7 DBI_1.2.3 DNAcopy_1.78.0
[34] cachem_1.1.0 zlibbioc_1.50.0 operator.tools_1.6.3
[37] splines_4.4.1 parallel_4.4.1 XVector_0.44.0
[40] vctrs_0.6.5 boot_1.3-30 glmnet_4.1-8
[43] sandwich_3.1-0 jsonlite_1.8.8 SparseM_1.84-2
[46] IRanges_2.38.1 S4Vectors_0.42.1 quantsmooth_1.70.0
[49] bit64_4.0.5 mitml_0.4-5 foreach_1.5.2
[52] tidyr_1.3.1 glue_1.7.0 nloptr_2.1.1
[55] pan_1.9 codetools_0.2-19 shape_1.4.6.1
[58] GenomeInfoDb_1.40.1 GenomicRanges_1.56.1 UCSC.utils_1.0.0
[61] lmtest_0.9-40 lme4_1.1-35.5 tibble_3.2.1
[64] pillar_1.9.0 quantreg_5.98 GenomeInfoDbData_1.2.12
[67] R6_2.5.1 SeqVarTools_1.42.0 formula.tools_1.7.1
[70] lattice_0.22-5 backports_1.5.0 memoise_2.0.1
[73] broom_1.0.6 MatrixModels_0.5-3 Rcpp_1.0.13
[76] nlme_3.1-165 mgcv_1.9-1 logistf_1.26.0
[79] zoo_1.8-12 pkgconfig_2.0.3
Hi,
I have been trying run pcrelate(), however I am receiving this error:
Error in if (idx <= length(redo.index)) idx <- redo.index[idx] else idx <- idx - : argument is of length zero Calls: pcrelate ... .reducer_add -> .reducer_add -> .map_index -> .map_index In addition: Warning message: In parallel::mccollect(wait = FALSE, timeout = 1) : 1 parallel job did not deliver a result
Do you have any advice on how to troubleshoot this issue?