openblas in the repository returns incorrect results
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openblas (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Dear maintainer,
I'm writing to report a bug in the openBLAS library in the official apt minor. The current latest version of the openBLAS in Ubuntu 22.04 is the v0.3.20. It has a bug, that will returns the incorrect svd decomposition results.
Ways to replicate:
# in bash
apt install libopenblas-base
apt install r-base
R
# in R environment
# check blas in openblas
sessionInfo()
# generate the test matrix
m = 1923
n = 2902
mat = matrix(rnorm(m*n), nrow=m)
# svd
mt.svd = svd(mat)
# reconstruct the matrix by svd values
mat_reco = mt.svd$u %*% diag(mt.svd$d) %*% t(mt.svd$v)
# test the matrix is same to the original or not.
quantile(mat_reco - mat)
###################
# Expected behaviour:
# the quantiles would be very close to 0
# Current behaviour:
# It will give the NA value, or gives the very large range.
# Does it depend on R version?
# A: No, I tested on default R to the latest R 4.3.0, all has the same problem.
# Does it depend on openBLAS version?
# A: I tested on multiple versions by sudo update-alternatives --config libblas.
# 1. default libblas works all good.
# 2. openBLAS 0.3.13 and 0.3.23 (compile myself) workes without any problem.
# 3. The openBLAS (0.3.20) installed by apt break the code.
# Do you replicate on other machine?
# A: Yes. I replicate in Docker image in the other machine. The problem in openBLAS v0.3.20 installed from apt all presents.
#######
So the way to fix the problem is to update the openBLAS version in official minors to newer version.
Thanks for your work.
Regards,
ZZ