Detailed description |
In trying to come up with a reproducible example for this SO question: https://stackoverflow.com/questions/74971430/qr-factorization-in-r-not-giving-correct-answer-with-large-sparse-matrix
... I instead managed to create a reproducible segfault example. This is with the most recent Matrix 1.5-4
```
set.seed(101)
library(Matrix)
d <- 173700
n <- 1e6
As <- sparseMatrix(i=integer(0),
j=integer(0),
dims = c(d, d), repr = "T")
As[cbind(sample(d, size = n, replace = TRUE),
sample(d, size = n, replace = TRUE))] <- rnorm(n)
bs <- sparseMatrix(i = 1:d, j = rep(1, d), x = rnorm(d))
qr_decomp <- qr(As, LAPACK = TRUE, tol = 1e-10)
```
address 0x557bb8913e50, cause 'memory not mapped'
Segmentation fault (core dumped)
R Under development (unstable) (2022-12-21 r83491)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Pop!_OS 22.04 LTS
Matrix products: default
BLAS: /usr/local/lib/R/lib/libRblas.so
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3; LAPACK version 3.10.0
|
|