diff options
author | Denis Davydov <davydden@gmail.com> | 2016-04-25 16:21:19 +0200 |
---|---|---|
committer | Denis Davydov <davydden@gmail.com> | 2016-04-25 16:21:19 +0200 |
commit | dd37959899d03fc33d59f725dbad4fe33b579725 (patch) | |
tree | 4fee497509d6cb6dc65c6967b435ee773cfff44e | |
parent | 42be50d10b649a130e64f2a742fa4133ed5534b7 (diff) | |
download | spack-dd37959899d03fc33d59f725dbad4fe33b579725.tar.gz spack-dd37959899d03fc33d59f725dbad4fe33b579725.tar.bz2 spack-dd37959899d03fc33d59f725dbad4fe33b579725.tar.xz spack-dd37959899d03fc33d59f725dbad4fe33b579725.zip |
output with new lines
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 |