Skip to content

Commit

Permalink
Fix LAPACK test: don't call sygvd! on undefed matrix (#47397)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarrasch authored Nov 2, 2022
1 parent 02fe132 commit 22fe28b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions stdlib/LinearAlgebra/test/lapack.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ using LinearAlgebra: BlasInt
vals, Z = LAPACK.syevr!('V', copy(Asym))
@test Z*(Diagonal(vals)*Z') Asym
@test all(vals .> 0.0)
@test LAPACK.syevr!('N','V','U',copy(Asym),0.0,1.0,4,5,-1.0)[1] vals[vals .< 1.0]
@test LAPACK.syevr!('N','I','U',copy(Asym),0.0,1.0,4,5,-1.0)[1] vals[4:5]
@test vals LAPACK.syev!('N','U',copy(Asym))
@test_throws DimensionMismatch LAPACK.sygvd!(1,'V','U',copy(Asym),Matrix{elty}(undef,6,6))
@test LAPACK.syevr!('N', 'V', 'U', copy(Asym), 0.0, 1.0, 4, 5, -1.0)[1] vals[vals .< 1.0]
@test LAPACK.syevr!('N', 'I', 'U', copy(Asym), 0.0, 1.0, 4, 5, -1.0)[1] vals[4:5]
@test vals LAPACK.syev!('N', 'U', copy(Asym))
@test_throws DimensionMismatch LAPACK.sygvd!(1, 'V', 'U', copy(Asym), zeros(elty, 6, 6))
end
end

Expand Down

0 comments on commit 22fe28b

Please sign in to comment.