Skip to content

Commit ba76f65

Browse files
committed
Fix #15957, ILP64 MKL not working
use LAPACK.laver() instead of making LAPACK.VERSION a Ref
1 parent c7643cd commit ba76f65

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

base/linalg/lapack.jl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ import Base.@blasfunc
1010
import ..LinAlg: BlasFloat, Char, BlasInt, LAPACKException,
1111
DimensionMismatch, SingularException, PosDefException, chkstride1, checksquare
1212

13-
const VERSION = Ref{VersionNumber}()
14-
15-
function __init__()
16-
VERSION[] = VersionNumber(laver()...)
17-
end
18-
1913
#Generic LAPACK error handlers
2014
"""
2115
Handle only negative LAPACK error codes

base/linalg/svd.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ If `thin=true` (default), a thin SVD is returned. For a ``M \\times N`` matrix
124124
"""
125125
function svdfact!{T<:BlasFloat}(A::StridedMatrix{T}, B::StridedMatrix{T})
126126
# xggsvd3 replaced xggsvd in LAPACK 3.6.0
127-
if LAPACK.VERSION[] < v"3.6.0"
127+
if LAPACK.laver() < (3, 6, 0)
128128
U, V, Q, a, b, k, l, R = LAPACK.ggsvd!('U', 'V', 'Q', A, B)
129129
else
130130
U, V, Q, a, b, k, l, R = LAPACK.ggsvd3!('U', 'V', 'Q', A, B)
@@ -216,7 +216,7 @@ end
216216

217217
function svdvals!{T<:BlasFloat}(A::StridedMatrix{T}, B::StridedMatrix{T})
218218
# xggsvd3 replaced xggsvd in LAPACK 3.6.0
219-
if LAPACK.VERSION[] < v"3.6.0"
219+
if LAPACK.laver() < (3, 6, 0)
220220
_, _, _, a, b, k, l, _ = LAPACK.ggsvd!('N', 'N', 'N', A, B)
221221
else
222222
_, _, _, a, b, k, l, _ = LAPACK.ggsvd3!('N', 'N', 'N', A, B)

test/linalg/lapack.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ for elty in (Float32, Float64, Complex64, Complex128)
156156
@test_approx_eq V' lVt
157157
B = rand(elty,10,10)
158158
# xggsvd3 replaced xggsvd in LAPACK 3.6.0
159-
if LAPACK.VERSION[] < v"3.6.0"
159+
if LAPACK.laver() < (3, 6, 0)
160160
@test_throws DimensionMismatch LAPACK.ggsvd!('S','S','S',A,B)
161161
else
162162
@test_throws DimensionMismatch LAPACK.ggsvd3!('S','S','S',A,B)

0 commit comments

Comments
 (0)