Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Do not merge] Test LBT forwards for MKL #39685

Closed
wants to merge 2 commits into from
Closed

Conversation

ViralBShah
Copy link
Member

@ViralBShah ViralBShah commented Feb 16, 2021

This branch is solely for the purpose of triggering CI to see if LBT works fine with MKL. The purpose is to be confident that LBT works as intended.

@ViralBShah ViralBShah added the linear algebra Linear algebra label Feb 16, 2021
@ViralBShah ViralBShah marked this pull request as draft February 16, 2021 05:02
@ViralBShah
Copy link
Member Author

All the linalg tests pass for me locally with MKL, with the exception of one matmul test, which is off by 1e-15.

@ViralBShah
Copy link
Member Author

arctic1:~/julia/stdlib/LinearAlgebra/test $ ~/julia/julia  ~/julia/test/runtests.jl LinearAlgebra
Test                           (Worker) | Time (s) | GC (s) | GC % | Alloc (MB) | RSS (MB)
LinearAlgebra/bidiag               (13) |        started at 2021-02-16T00:22:27.745
LinearAlgebra/bunchkaufman          (9) |        started at 2021-02-16T00:22:27.850
LinearAlgebra/blas                 (22) |        started at 2021-02-16T00:22:28.078
LinearAlgebra/svd                  (10) |        started at 2021-02-16T00:22:28.078
LinearAlgebra/matmul                (5) |        started at 2021-02-16T00:22:28.078
LinearAlgebra/ldlt                 (28) |        started at 2021-02-16T00:22:28.078
LinearAlgebra/special               (7) |        started at 2021-02-16T00:22:28.079
LinearAlgebra/eigen                 (8) |        started at 2021-02-16T00:22:28.079
LinearAlgebra/tridiag              (12) |        started at 2021-02-16T00:22:28.079
LinearAlgebra/cholesky             (15) |        started at 2021-02-16T00:22:28.079
LinearAlgebra/adjtrans             (23) |        started at 2021-02-16T00:22:28.079
LinearAlgebra/qr                    (3) |        started at 2021-02-16T00:22:28.079
LinearAlgebra/pinv                 (24) |        started at 2021-02-16T00:22:28.079
LinearAlgebra/schur                 (6) |        started at 2021-02-16T00:22:28.079
LinearAlgebra/triangular            (2) |        started at 2021-02-16T00:22:28.079
LinearAlgebra/symmetric            (17) |        started at 2021-02-16T00:22:28.080
LinearAlgebra/diagonal             (14) |        started at 2021-02-16T00:22:28.080
LinearAlgebra/lu                   (16) |        started at 2021-02-16T00:22:28.080
LinearAlgebra/lapack               (11) |        started at 2021-02-16T00:22:28.080
LinearAlgebra/hessenberg           (21) |        started at 2021-02-16T00:22:28.080
LinearAlgebra/givens               (25) |        started at 2021-02-16T00:22:28.080
LinearAlgebra/addmul               (27) |        started at 2021-02-16T00:22:28.080
LinearAlgebra/uniformscaling       (19) |        started at 2021-02-16T00:22:28.080
LinearAlgebra/generic              (18) |        started at 2021-02-16T00:22:28.080
LinearAlgebra/structuredbroadcast  (26) |        started at 2021-02-16T00:22:28.080
LinearAlgebra/dense                 (4) |        started at 2021-02-16T00:22:28.080
LinearAlgebra/lq                   (20) |        started at 2021-02-16T00:22:28.080
LinearAlgebra/ldlt                 (28) |     5.29 |   0.11 |  2.0 |     352.19 |   366.54
LinearAlgebra/givens               (25) |    29.92 |   1.45 |  4.8 |    1592.73 |   346.70
LinearAlgebra/pinv                 (24) |    53.80 |   2.24 |  4.2 |    2547.93 |   507.18
LinearAlgebra/adjtrans             (23) |    59.87 |   2.89 |  4.8 |    3629.59 |   416.29
LinearAlgebra/blas                 (22) |    66.34 |   3.08 |  4.6 |    4132.01 |   465.50
LinearAlgebra/schur                 (6) |    70.55 |   2.62 |  3.7 |    3670.15 |   418.44
LinearAlgebra/generic              (18) |    81.41 |   4.30 |  5.3 |    4221.60 |   618.42
LinearAlgebra/structuredbroadcast  (26) |    88.05 |   3.24 |  3.7 |    5058.08 |   436.64
LinearAlgebra/lapack               (11) |    92.83 |   3.31 |  3.6 |    5249.86 |   450.77
LinearAlgebra/eigen                 (8) |    98.99 |   4.32 |  4.4 |    5131.15 |   445.63
LinearAlgebra/uniformscaling       (19) |   105.97 |   5.01 |  4.7 |    5628.94 |   541.38
LinearAlgebra/bunchkaufman          (9) |   107.25 |   3.26 |  3.0 |    5598.98 |   478.81
LinearAlgebra/tridiag              (12) |   107.92 |   3.67 |  3.4 |    6846.18 |   472.32
LinearAlgebra/hessenberg           (21) |   121.82 |   5.18 |  4.3 |    8501.39 |   501.77
LinearAlgebra/lq                   (20) |   121.97 |   4.98 |  4.1 |    7419.22 |   495.16
LinearAlgebra/svd                  (10) |   122.80 |   5.10 |  4.2 |    7322.12 |   492.62
LinearAlgebra/qr                    (3) |   148.55 |   6.42 |  4.3 |   10195.97 |   589.02
LinearAlgebra/special               (7) |   177.91 |   4.89 |  2.7 |   10596.81 |   532.20
LinearAlgebra/cholesky             (15) |   180.98 |   6.60 |  3.6 |   11420.84 |   560.73
LinearAlgebra/lu                   (16) |   182.47 |   6.97 |  3.8 |   12271.21 |   639.03
LinearAlgebra/bidiag               (13) |   249.36 |   8.05 |  3.2 |   16550.79 |   627.38
LinearAlgebra/dense                 (4) |   249.55 |  11.73 |  4.7 |   19027.42 |   684.38
LinearAlgebra/symmetric            (17) |   279.34 |  11.82 |  4.2 |   19885.31 |   726.52
LinearAlgebra/matmul                (5) |         failed at 2021-02-16T00:27:29.049
Test Failed at /home/viralbshah/julia/usr/share/julia/stdlib/v1.7/LinearAlgebra/test/matmul.jl:157
  Expression: mul!(C, vf, transpose(vf), 2, 3) == (2vf) * vf' .+ 3C0
   Evaluated: [2.672853676317912 5.701988959944631 6.1515193199096165; 4.23283169516415 10.849207990624716 12.446672107121286; 8.696884532776396 12.177753310194722 18.216932972206614] == [2.672853676317912 5.701988959944631 6.1515193199096165; 4.23283169516415 10.849207990624716 12.446672107121286; 8.696884532776394 12.177753310194722 18.216932972206614]

LinearAlgebra/diagonal             (14) |   306.32 |  14.85 |  4.8 |   24418.50 |   811.70
LinearAlgebra/addmul               (27) |   590.24 |  18.20 |  3.1 |   50158.50 |   947.62
LinearAlgebra/triangular            (2) |   628.10 |  24.13 |  3.8 |   47470.74 |  1349.84

Test Summary:                       |  Pass  Fail  Total
  Overall                           | 88008     1  88009
    LinearAlgebra/ldlt              |     8            8
    LinearAlgebra/givens            |  1847         1847
    LinearAlgebra/pinv              |   288          288
    LinearAlgebra/adjtrans          |   313          313
    LinearAlgebra/blas              |   687          687
    LinearAlgebra/schur             |   430          430
    LinearAlgebra/generic           |   538          538
    LinearAlgebra/structuredbroadcast |   646          646
    LinearAlgebra/lapack            |   800          800
    LinearAlgebra/eigen             |   422          422
    LinearAlgebra/uniformscaling    |   510          510
    LinearAlgebra/bunchkaufman      |  5285         5285
    LinearAlgebra/tridiag           |  1416         1416
    LinearAlgebra/hessenberg        |   403          403
    LinearAlgebra/lq                |  3005         3005
    LinearAlgebra/svd               |   540          540
    LinearAlgebra/qr                |  4531         4531
    LinearAlgebra/special           |  3159         3159
    LinearAlgebra/cholesky          |  2416         2416
    LinearAlgebra/lu                |  1287         1287
    LinearAlgebra/bidiag            |  3597         3597
    LinearAlgebra/dense             |  7881         7881
    LinearAlgebra/symmetric         |  2744         2744
    LinearAlgebra/matmul            |  1025     1   1026
    LinearAlgebra/diagonal          |  2628         2628
    LinearAlgebra/addmul            |  3906         3906
    LinearAlgebra/triangular        | 37696        37696
    FAILURE

The global RNG seed was 0x7b2c9a1834e0497cec404b5624c5dae9.

Error in testset LinearAlgebra/matmul:
Test Failed at /home/viralbshah/julia/usr/share/julia/stdlib/v1.7/LinearAlgebra/test/matmul.jl:157
  Expression: mul!(C, vf, transpose(vf), 2, 3) == (2vf) * vf' .+ 3C0
   Evaluated: [2.672853676317912 5.701988959944631 6.1515193199096165; 4.23283169516415 10.849207990624716 12.446672107121286; 8.696884532776396 12.177753310194722 18.216932972206614] == [2.672853676317912 5.701988959944631 6.1515193199096165; 4.23283169516415 10.849207990624716 12.446672107121286; 8.696884532776394 12.177753310194722 18.216932972206614]
ERROR: LoadError: Test run finished with errors
in expression starting at /home/viralbshah/julia/test/runtests.jl:93

@ViralBShah
Copy link
Member Author

And the difference between the expected and the computed in the failing test:

julia> [2.672853676317912 5.701988959944631 6.1515193199096165; 4.23283169516415 10.849207990624716 12.446672107121286; 8.696884532776396 12.177753310194722 18.216932972206614] - [2.672853676317912 5.701988959944631 6.1515193199096165; 4.23283169516415 10.849207990624716 12.446672107121286; 8.696884532776394 12.177753310194722 18.216932972206614]
3×3 Matrix{Float64}:
 0.0          0.0  0.0
 0.0          0.0  0.0
 1.77636e-15  0.0  0.0

@ViralBShah
Copy link
Member Author

ViralBShah commented Feb 16, 2021

@staticfloat Do you know why tester_linux64 is not running? This PR tests literally every platform except for the one we really want! :-)

@staticfloat
Copy link
Member

just a long queue. It's running now.

ViralBShah and others added 2 commits February 16, 2021 16:13
All BLAS and LAPACK are now routed through LBT.
SuiteSparse is also linked against LBT.
OpenBLAS is still installed as before, and is
what LBT forwards to by default.

Co-authored-by: Simon Byrne <simonbyrne@gmail.com>
Co-authored-by: Kristoffer Carlsson <kcarlsson89@gmail.com>
@ViralBShah
Copy link
Member Author

Linux64 has passed the tests fully, and the others only have small issues. I feel that LBT + MKL work reasonably well as a result and closing this PR.

@ViralBShah ViralBShah closed this Feb 17, 2021
@DilumAluthge DilumAluthge deleted the vs/lbt-mkl branch February 17, 2021 14:18
@ViralBShah ViralBShah restored the vs/lbt-mkl branch February 25, 2021 19:11
@carstenbauer
Copy link
Member

Out of curiosity, on master it is not yet possible to easily switch to MKL (based on MKL_jll), right?

@ViralBShah
Copy link
Member Author

There's a PR up on MKL.jl with instructions.

JuliaLinearAlgebra/MKL.jl#62

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear algebra Linear algebra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants