RfastOfficial/Rfast

Running rowMedians with parallel = TRUE on certain matrices can crash R session

StevenMayher opened this issue · 0 comments

Describe the bug
I haven't fully deduced the precise nature of the following bug, but it seems that running rowMedians with parallel = TRUE on the matrix generated below crashes my R session:

To Reproduce

library(Rfast)
set.seed(42)
mat = matrix(sample(100000, replace = TRUE), nrow = 1000, ncol = 100)
rowMedians(mat, parallel = TRUE)

Expected behavior

rowMedians(mat, parallel = FALSE)

Desktop:

sessionInfo()

R version 4.3.3 (2024-02-29 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

time zone: America/New_York
tzcode source: internal

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

other attached packages:
[1] Rfast_2.1.0 RcppParallel_5.1.7 RcppZiggurat_0.1.6 Rcpp_1.0.12

loaded via a namespace (and not attached):
[1] compiler_4.3.3 parallel_4.3.3 tools_4.3.3 rstudioapi_0.15.0