Dear DESeq2 Development Team,
In the last days I realized that the DESeq() function seems to create multiple threads for the R process. I thought this might be dependent on the parameter flag "parallel" and its setting, but it still continues to do this while parallel = FALSE. Even though this is not a serious bug, because the threads stay on listening and dont use up any computation time whatsoever, there are some things which bug me and I hope you can shed some light upon these:
1.) Sometimes these threads of the process don't shut down properly if the parent process is closed, which leads to an accumulation of lost threads.
2.) With htop it seems that each process receives full number of workers as threads even if parallel=FALSE, which seems a little odd to me. Is this intended? If I set the MulticoreParam as default and on lets say 4 workers upfront, it uses this number. For me this totally makes sense in an parallel = TRUE scenario.
3.) When testing parallel=T vs parallel=F I realized that parallel T stops doing anything after
"gene-wise dispersion estimates: 6 workers". All the threads are in Sleep.
Here is the test case I used:
data("airway") se <- airway
dds <- DESeqDataSet(se, design = ~ cell + dex) dds<-DESeq(dds,parallel=F)
As well as the MulticoreParam settings as well as the output of bpparam():
> register(MulticoreParam(6,log=TRUE),default=TRUE) > bpparam() class: MulticoreParam bpisup: FALSE; bpworkers: 6; bptasks: 0; bpjobname: BPJOB bplog: TRUE; bpthreshold: INFO; bpstopOnError: TRUE bptimeout: 2592000; bpprogressbar: FALSE bpRNGseed: bplogdir: NA bpresultdir: NA cluster type: FORK
sessionInfo() R version 3.3.0 (2016-05-03) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux 8 (jessie) locale:  C attached base packages:  stats4 parallel stats graphics grDevices utils datasets  methods base other attached packages:  BiocParallel_1.6.0 DESeq2_1.12.0  airway_0.105.0 SummarizedExperiment_1.2.0  Biobase_2.32.0 GenomicRanges_1.24.0  GenomeInfoDb_1.8.0 IRanges_2.6.0  S4Vectors_0.10.0 BiocGenerics_0.18.0 loaded via a namespace (and not attached):  Rcpp_0.12.4.5 RColorBrewer_1.1-2 plyr_1.8.3  XVector_0.12.0 tools_3.3.0 zlibbioc_1.18.0  rpart_4.1-10 RSQLite_1.0.0 annotate_1.50.0  gtable_0.2.0 lattice_0.20-33 Matrix_1.2-6  DBI_0.4 gridExtra_2.2.1 genefilter_1.54.0  cluster_2.0.4 locfit_1.5-9.1 grid_3.3.0  nnet_7.3-12 data.table_1.9.6 AnnotationDbi_1.34.0  XML_3.98-1.4 survival_2.39-2 foreign_0.8-66  latticeExtra_0.6-28 Formula_1.2-1 geneplotter_1.50.0  ggplot2_2.1.0 Hmisc_3.17-4 scales_0.4.0  splines_3.3.0 colorspace_1.2-6 xtable_1.8-2  acepack_1.3-3.3 munsell_0.4.3 chron_2.3-47