Two further symptoms on Jammy's OpenBLAS (`libopenblas0-pthread`
0.3.20+ds-1), seen from R 4.6.1, which uses OpenBLAS for both BLAS and
LAPACK (LAPACK 3.10.0 bundled with OpenBLAS). CPU: Intel Xeon w9-3575X
(Granite Rapids; AVX-512, AMX). `OPENBLAS_VERBOSE=2` reports
`Core: Cooperlake` on this CPU. `OPENBLAS_NUM_THREADS=1` in every test.
**1. Wrong results from the default (Cooperlake) kernel, without any
error.**
For the AR(1) matrix A = 0.5^|i-j|:
```r
for (n in c(12, 20, 40, 64)) {
a <- 0.5^abs(outer(1:n, 1:n, "-")); r <- chol(a)
cat(n, max(abs(crossprod(r) - a)), max(abs(solve(a) %*% a - diag(n))), "\n")
}
```
| `OPENBLAS_CORETYPE` | `solve()` | `chol()` |
|---|---|---|
| unset (Cooperlake) | wrong from n = 12 (error up to 0.5) | wrong from n = 40
(error 0.25) |
| SkylakeX, Haswell | error about 1e-16 | error about 1e-16 |
`eigen()` was also wrong under the default kernel.
**2. `dsyevr` fails with INFO > 0 under several kernels, including
SkylakeX.**
The attached symmetric positive-definite matrix (eigenvalues 0.0143 to
0.205; `chol()` succeeds) makes `dsyevr` (JOBZ = 'V', RANGE = 'A') return
INFO = 2:
```r
A <- as.matrix(read.table("dsyevr_failing_matrix_G200.txt.gz"))
dimnames(A) <- NULL
eigen(A, symmetric = TRUE) # R calls dsyevr
```
| LAPACK | BLAS | result |
|---|---|---|
| OpenBLAS 0.3.20 | OpenBLAS, `OPENBLAS_CORETYPE` unset | INFO = 2 |
| OpenBLAS 0.3.20 | OpenBLAS, SkylakeX | INFO = 2 |
| OpenBLAS 0.3.20 | OpenBLAS, Haswell | ok, reconstruction error 6e-16 |
| reference 3.10.0 (`liblapack3`) | OpenBLAS, SkylakeX | INFO = 2 |
| reference 3.10.0 | reference 3.10.0 (`libblas3`) | ok, reconstruction error
9e-16 |
The reference builds were loaded with `LD_PRELOAD`. Since the reference
LAPACK fails on the OpenBLAS kernels and succeeds on the reference BLAS, the
fault seems to be in a BLAS kernel called by `dsyevr`, not in LAPACK.
On the family of matrices this one comes from (k * A for k = 125, ..., 375,
four 200 x 200 covariances, 1,004 calls), the failures were:
| `OPENBLAS_CORETYPE` | failures |
|---|---|
| SkylakeX | 6 / 1004 |
| Nehalem | 13 / 502 |
| Sandybridge | 2 / 502 |
| Prescott | 2 / 502 |
| Haswell | 0 / 502 |
| reference BLAS | 0 / 1004 |
The failing calls are deterministic and differ between kernels. Generic test
matrices of the same size (AR(1), Wishart, equicorrelation) did not fail.
Workaround in use: `OPENBLAS_CORETYPE=SkylakeX` for symptom 1, and Cholesky
factors instead of `eigen()` for drawing Gaussian vectors, for symptom 2.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2040027
Title:
[SPR][ICX] OpenBLAS: Issues while testing sbgemm for Sapphire Rapids
(SPR)
To manage notifications about this bug go to:
https://bugs.launchpad.net/intel/+bug/2040027/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs