summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/openblas/package.py15
-rw-r--r--var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c5
-rw-r--r--var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output10
3 files changed, 22 insertions, 8 deletions
diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py
index 252f699652..61250fb310 100644
--- a/var/spack/repos/builtin/packages/openblas/package.py
+++ b/var/spack/repos/builtin/packages/openblas/package.py
@@ -97,14 +97,21 @@ double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0};
double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5};
cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans,
3, 3, 2, 1, A, 3, B, 3, 2, C, 3);
-for (i = 0; i < 8; i++)
- printf("%lf ", C[i]);
-printf("%lf", C[8]);
+for (i = 0; i < 9; i++)
+ printf("%f\n", C[i]);
return 0;
}
"""
expected = """\
-11.000000 -9.000000 5.000000 -9.000000 21.000000 -1.000000 5.000000 -1.000000 3.000000\
+11.000000
+-9.000000
+5.000000
+-9.000000
+21.000000
+-1.000000
+5.000000
+-1.000000
+3.000000
"""
with open("check.c", 'w') as f:
f.write(source)
diff --git a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c
index 37785bf47f..634e99d20b 100644
--- a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c
+++ b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c
@@ -7,8 +7,7 @@ double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0};
double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5};
cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans,
3, 3, 2, 1, A, 3, B, 3, 2, C, 3);
-for (i = 0; i < 8; i++)
- printf("%lf ", C[i]);
-printf("%lf", C[8]);
+for (i = 0; i < 9; i++)
+ printf("%f\n", C[i]);
return 0;
}
diff --git a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output
index 490905aca0..b8316d7477 100644
--- a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output
+++ b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output
@@ -1 +1,9 @@
-11.000000 -9.000000 5.000000 -9.000000 21.000000 -1.000000 5.000000 -1.000000 3.000000 \ No newline at end of file
+11.000000
+-9.000000
+5.000000
+-9.000000
+21.000000
+-1.000000
+5.000000
+-1.000000
+3.000000