Difference in QR decomposition between operating systems in Matrix package

There seems to be a difference in Matrix 1.5-3 between centos7 and Ubuntu. The Matrix::qr function can give different results depending on the operating system. This doesn't appear to effect the base::qr function. From my research the centos7 result looks to be incorrect because it causes a test to fail in the Matrix tests.

Ubuntu Focal

> sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.1 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so

locale:
  [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8       
[4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8   
[7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C          
[10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   

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

other attached packages:
  [1] rlang_1.0.6

loaded via a namespace (and not attached):
  [1] compiler_4.2.1  Matrix_1.5-3    cli_3.5.0       tools_4.2.1     rstudioapi_0.14
[6] grid_4.2.1      lattice_0.20-45
> x <- readRDS(system.file("external", "Z_NA_rnk.rds", package="Matrix"))
> rlang::hash(Matrix::qr(x))
[1] "3b402ce7d7f7597659602c9e38de5d9f"

CentOS7

> sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblasp-r0.3.3.so

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       

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

other attached packages:
[1] withr_2.5.0 rlang_1.0.6

loaded via a namespace (and not attached):
[1] compiler_4.2.1  Matrix_1.5-3    cli_3.6.0       tools_4.2.1    
[5] grid_4.2.1      lattice_0.20-45
> x <- readRDS(system.file("external", "Z_NA_rnk.rds", package="Matrix"))
> rlang::hash(Matrix::qr(x))
[1] "57943fa4b5e166787adc1469e5e46893"

Missing in Centos may be the diffrerence

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.