[OpenBLAS]: benchmark error of potrf
authorl00536773 <linzelong2@hisilicon.com>
Thu, 16 Apr 2020 02:55:10 +0000 (10:55 +0800)
committerl00536773 <linzelong2@hisilicon.com>
Thu, 16 Apr 2020 02:55:10 +0000 (10:55 +0800)
[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]:

benchmark/potrf.c

index 580e460..cb4c23b 100644 (file)
@@ -193,14 +193,14 @@ int main(int argc, char *argv[]){
          a[((long)j + (long)j * (long)m) * 2 + 1] = 0.;
 
          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;
          }
        }
       } else {
        for (j = 0; j < m; j++) {
          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;
          }