BiocParallel serialization errors on Windows
1
0
Entering edit mode
hayleyw • 0
@43494c06
Last seen 3 months ago
Canada

Hello All,

I am trying to run a model with variancePartition, which uses BiocParallel for parallel processing, on a Windows computer. I have run this program on my MacBook pro several times without any parallel processing issues. However, every time I run it on my partner's Windows computer, I am met with warnings and the model immediately quits. I would like to be able to run this on the Windows computer as it has more cores available than my Mac. I would opt to run it without parallel processing, but this takes far too much time, as when I tried it previously the model ran for more than 36 hours before it was interrupted by an automatic Windows update. I have googled this issue and tried some of the remedies suggested (e.g., restarting R, reducing the number of cores being used), but so far nothing has worked. I have included some of the code, the error/output, and the sessionInfo() below.

Code:
param <- SnowParam(workers= 8, "SOCK", progressbar = TRUE)

betafit.age <- dream(ilogit2(adj.m_matrix), formula, pheno, ddf = "Kenward-Roger", BPPARAM = param)

Output: 

Error in serialize(data, node$con) : error writing to connection
iteration: Error in serialize(data, node$con) : 
  (converted from warning) 'package:stats' may not be available when loading

Error in serialize(data, node$con) : error writing to connection


> sessionInfo()
R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default


locale:
[1] LC_COLLATE=English_Canada.utf8  LC_CTYPE=English_Canada.utf8   
[3] LC_MONETARY=English_Canada.utf8 LC_NUMERIC=C                   
[5] LC_TIME=English_Canada.utf8    

time zone: America/Toronto
tzcode source: internal

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

other attached packages:
 [1] dbplyr_2.4.0                variancePartition_1.32.2    BiocParallel_1.36.0        
 [4] limma_3.58.1                ggplot2_3.4.4               DMRcate_2.16.1             
 [7] minfi_1.48.0                bumphunter_1.44.0           locfit_1.5-9.8             
[10] iterators_1.0.14            foreach_1.5.2               Biostrings_2.70.1          
[13] XVector_0.42.0              SummarizedExperiment_1.32.0 Biobase_2.62.0             
[16] MatrixGenerics_1.14.0       matrixStats_1.1.0           GenomicRanges_1.54.1       
[19] GenomeInfoDb_1.38.1         IRanges_2.36.0              S4Vectors_0.40.2           
[22] BiocGenerics_0.48.1        

loaded via a namespace (and not attached):
  [1] ProtGenerics_1.34.0                                
  [2] fs_1.6.3                                           
  [3] bitops_1.0-7                                       
  [4] devtools_2.4.5                                     
  [5] httr_1.4.7                                         
  [6] RColorBrewer_1.1-3                                 
  [7] numDeriv_2016.8-1.1                                
  [8] profvis_0.3.8                                      
  [9] tools_4.3.2                                        
 [10] doRNG_1.8.6                                        
 [11] backports_1.4.1                                    
 [12] utf8_1.2.4                                         
 [13] R6_2.5.1                                           
 [14] HDF5Array_1.30.0                                   
 [15] lazyeval_0.2.2                                     
 [16] Gviz_1.46.1                                        
 [17] permute_0.9-7                                      
 [18] rhdf5filters_1.14.1                                
 [19] withr_2.5.2                                        
 [20] urlchecker_1.0.1                                   
 [21] prettyunits_1.2.0                                  
 [22] gridExtra_2.3                                      
 [23] base64_2.0.1                                       
 [24] preprocessCore_1.64.0                              
 [25] cli_3.6.1                                          
 [26] IlluminaHumanMethylationEPICanno.ilm10b4.hg19_0.6.0
 [27] mvtnorm_1.2-4                                      
 [28] readr_2.1.4                                        
 [29] genefilter_1.84.0                                  
 [30] askpass_1.2.0                                      
 [31] Rsamtools_2.18.0                                   
 [32] foreign_0.8-86                                     
 [33] R.utils_2.12.3                                     
 [34] siggenes_1.76.0                                    
 [35] illuminaio_0.44.0                                  
 [36] dichromat_2.0-0.1                                  
 [37] sessioninfo_1.2.2                                  
 [38] scrime_1.3.5                                       
 [39] BSgenome_1.70.1                                    
 [40] rstudioapi_0.15.0                                  
 [41] RSQLite_2.3.4                                      
 [42] generics_0.1.3                                     
 [43] BiocIO_1.12.0                                      
 [44] gtools_3.9.5                                       
 [45] dplyr_1.1.4                                        
 [46] interp_1.1-5                                       
 [47] Matrix_1.6-4                                       
 [48] fansi_1.0.6                                        
 [49] abind_1.4-5                                        
 [50] R.methodsS3_1.8.2                                  
 [51] lifecycle_1.0.4                                    
 [52] edgeR_4.0.3                                        
 [53] yaml_2.3.7                                         
 [54] gplots_3.1.3                                       
 [55] rhdf5_2.46.1                                       
 [56] SparseArray_1.2.2                                  
 [57] BiocFileCache_2.10.1                               
 [58] grid_4.3.2                                         
 [59] blob_1.2.4                                         
 [60] promises_1.2.1                                     
 [61] ExperimentHub_2.10.0                               
 [62] crayon_1.5.2                                       
 [63] miniUI_0.1.1.1                                     
 [64] lattice_0.21-9                                     
 [65] GenomicFeatures_1.54.1                             
 [66] annotate_1.80.0                                    
 [67] KEGGREST_1.42.0                                    
 [68] pillar_1.9.0                                       
 [69] knitr_1.45                                         
 [70] beanplot_1.3.1                                     
 [71] rjson_0.2.21                                       
 [72] boot_1.3-28.1                                      
 [73] corpcor_1.6.10                                     
 [74] codetools_0.2-19                                   
 [75] glue_1.6.2                                         
 [76] data.table_1.14.10                                 
 [77] remotes_2.4.2.1                                    
 [78] vctrs_0.6.5                                        
 [79] png_0.1-8                                          
 [80] Rdpack_2.6                                         
 [81] IlluminaHumanMethylation450kanno.ilmn12.hg19_0.6.1 
 [82] gtable_0.3.4                                       
 [83] cachem_1.0.8                                       
 [84] xfun_0.41                                          
 [85] rbibutils_2.2.16                                   
 [86] S4Arrays_1.2.0                                     
 [87] mime_0.12                                          
 [88] survival_3.5-7                                     
 [89] statmod_1.5.0                                      
 [90] interactiveDisplayBase_1.40.0                      
 [91] ellipsis_0.3.2                                     
 [92] nlme_3.1-164                                       
 [93] pbkrtest_0.5.2                                     
 [94] usethis_2.2.2                                      
 [95] bit64_4.0.5                                        
 [96] bsseq_1.38.0                                       
 [97] progress_1.2.3                                     
 [98] EnvStats_2.8.1                                     
 [99] filelock_1.0.2                                     
[100] nor1mix_1.3-2                                      
[101] KernSmooth_2.23-22                                 
[102] rpart_4.1.23                                       
[103] colorspace_2.1-0                                   
[104] DBI_1.1.3                                          
[105] Hmisc_5.1-1                                        
[106] nnet_7.3-19                                        
[107] tidyselect_1.2.0                                   
[108] bit_4.0.5                                          
[109] compiler_4.3.2                                     
[110] curl_5.2.0                                         
[111] htmlTable_2.4.2                                    
[112] xml2_1.3.6                                         
[113] DelayedArray_0.28.0                                
[114] rtracklayer_1.62.0                                 
[115] checkmate_2.3.1                                    
[116] scales_1.3.0                                       
[117] caTools_1.18.2                                     
[118] remaCor_0.0.16                                     
[119] quadprog_1.5-8                                     
[120] rappdirs_0.3.3                                     
[121] stringr_1.5.1                                      
[122] digest_0.6.33                                      
[123] minqa_1.2.6                                        
[124] rmarkdown_2.25                                     
[125] GEOquery_2.70.0                                    
[126] aod_1.3.3                                          
[127] RhpcBLASctl_0.23-42                                
[128] jpeg_0.1-10                                        
[129] htmltools_0.5.7                                    
[130] pkgconfig_2.0.3                                    
[131] base64enc_0.1-3                                    
[132] lme4_1.1-35.1                                      
[133] sparseMatrixStats_1.14.0                           
[134] ensembldb_2.26.0                                   
[135] fastmap_1.1.1                                      
[136] rlang_1.1.2                                        
[137] htmlwidgets_1.6.4                                  
[138] shiny_1.8.0                                        
[139] DelayedMatrixStats_1.24.0                          
[140] mclust_6.0.1                                       
[141] R.oo_1.25.0                                        
[142] VariantAnnotation_1.48.1                           
[143] RCurl_1.98-1.13                                    
[144] magrittr_2.0.3                                     
[145] Formula_1.2-5                                      
[146] GenomeInfoDbData_1.2.11                            
[147] Rhdf5lib_1.24.1                                    
[148] munsell_0.5.0                                      
[149] Rcpp_1.0.11                                        
[150] stringi_1.8.2                                      
[151] zlibbioc_1.48.0                                    
[152] MASS_7.3-60                                        
[153] org.Hs.eg.db_3.18.0                                
[154] AnnotationHub_3.10.0                               
[155] plyr_1.8.9                                         
[156] pkgbuild_1.4.3                                     
[157] deldir_2.0-2                                       
[158] splines_4.3.2                                      
[159] multtest_2.58.0                                    
[160] hms_1.1.3                                          
[161] rngtools_1.5.2                                     
[162] reshape2_1.4.4                                     
[163] biomaRt_2.58.0                                     
[164] pkgload_1.3.3                                      
[165] missMethyl_1.36.0                                  
[166] BiocVersion_3.18.1                                 
[167] XML_3.99-0.16                                      
[168] evaluate_0.23                                      
[169] latticeExtra_0.6-30                                
[170] biovizBase_1.50.0                                  
[171] BiocManager_1.30.22                                
[172] nloptr_2.0.3                                       
[173] tzdb_0.4.0                                         
[174] httpuv_1.6.13                                      
[175] tidyr_1.3.0                                        
[176] openssl_2.1.1                                      
[177] purrr_1.0.2                                        
[178] reshape_0.8.9                                      
[179] broom_1.0.5                                        
[180] xtable_1.8-4                                       
[181] restfulr_0.0.15                                    
[182] AnnotationFilter_1.26.0                            
[183] fANCOVA_0.6-1                                      
[184] later_1.3.2                                        
[185] snow_0.4-4                                         
[186] tibble_3.2.1                                       
[187] lmerTest_3.1-3                                     
[188] memoise_2.0.1                                      
[189] AnnotationDbi_1.64.1                               
[190] GenomicAlignments_1.38.0                           
[191] cluster_2.1.6
variancePartition BiocParallel • 1.5k views
ADD COMMENT
0
Entering edit mode

Can you provide a small example of the code that produces the error? It doesn't need to be with the full data set, but providing a little example that others can read and then copy/paste to test will probably get your more responses.

ADD REPLY
0
Entering edit mode

Thank you for the suggestion! I have edited my post to include some of the code I used.

ADD REPLY
1
Entering edit mode
@gabrielhoffman-8391
Last seen 10 days ago
United States

I fixed this and posted an update yesterday. See this bug report

Using BPPARAM = SnowParam(...,exportglobals = FALSE) on Windows will resolve your issue.

The next release of variancePartition will handle this in the backend so it will be transparent to the user.

Confirm that this works for you?

Best,

Gabriel

ADD COMMENT
0
Entering edit mode

Thank you, I was able to run the code without any parallel processing warnings. However, the dream() function does not seem to be using the Kenward-Roger method (when selected) and the model is failing 90+ responses (on both the Windows and MacBook computers). I have run this before on both computers without it failing in any responses, so I am not sure why it is doing it now. Additionally, when using the eBayes() function, the results usually return within minutes, however, it is taking significantly longer, I am not sure if this is also an issue.

Best, Hayley

ADD REPLY

Login before adding your answer.

Traffic: 655 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