Browse Source

[OpenBLAS]: benchmark error of potrf

[description]: when the matrix size goes higher than 5800 during the cpotrf test, error info, such as "Potrf info = 5679", will be returned on ARM64 and x86 machines. Uplo = L & F.
[solution]: changed the func for building the matrix so that the complex Hermitian matrix can stay positive definite during the computation.
[dts]:
tags/v0.3.10^2
l00536773 5 years ago
parent
commit
6b7ef6543a
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      benchmark/potrf.c

+ 2
- 2
benchmark/potrf.c View File

@@ -193,14 +193,14 @@ int main(int argc, char *argv[]){
a[((long)j + (long)j * (long)m) * 2 + 1] = 0.; a[((long)j + (long)j * (long)m) * 2 + 1] = 0.;


for(i = j + 1; i < m; i++) { for(i = j + 1; i < m; i++) {
a[((long)i + (long)j * (long)m) * 2 + 0] = ((double) rand() / (double) RAND_MAX) - 0.5;
a[((long)i + (long)j * (long)m) * 2 + 0] = 0;
a[((long)i + (long)j * (long)m) * 2 + 1] = ((double) rand() / (double) RAND_MAX) - 0.5; a[((long)i + (long)j * (long)m) * 2 + 1] = ((double) rand() / (double) RAND_MAX) - 0.5;
} }
} }
} else { } else {
for (j = 0; j < m; j++) { for (j = 0; j < m; j++) {
for(i = 0; i < j; i++) { for(i = 0; i < j; i++) {
a[((long)i + (long)j * (long)m) * 2 + 0] = ((double) rand() / (double) RAND_MAX) - 0.5;
a[((long)i + (long)j * (long)m) * 2 + 0] = 0.;
a[((long)i + (long)j * (long)m) * 2 + 1] = ((double) rand() / (double) RAND_MAX) - 0.5; a[((long)i + (long)j * (long)m) * 2 + 1] = ((double) rand() / (double) RAND_MAX) - 0.5;
} }




Loading…
Cancel
Save