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

lapack: posv: flaky test #1164

Open
nsajko opened this issue Jan 4, 2025 · 1 comment · May be fixed by #1166
Open

lapack: posv: flaky test #1164

nsajko opened this issue Jan 4, 2025 · 1 comment · May be fixed by #1166

Comments

@nsajko
Copy link
Contributor

nsajko commented Jan 4, 2025

The test:

@testset "posv and some errors for friends" begin
@testset for elty in (Float32, Float64, ComplexF32, ComplexF64)
local n = 10
A = rand(elty,n,n)/100
A += real(diagm(0 => n*real(rand(elty,n))))
if elty <: Complex
A = A + A'
else
A = A + transpose(A)
end
B = rand(elty,n,n)
D = copy(A)
C = copy(B)
D,C = LAPACK.posv!('U',D,C)

Observed in CI of PR JuliaLang/julia#56899:

https://buildkite.com/julialang/julia-master/builds/43437#019432a7-3343-4c56-b59b-6275b3cec3e9/862-916

LinearAlgebra/lapack                             (3) |         failed at 2025-01-04T11:14:05.793
Error During Test at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-R17H3W25T9.0/build/default-honeycrisp-R17H3W25T9-0/julialang/julia-master/julia-640e80cd1d/share/julia/stdlib/v1.12/LinearAlgebra/test/lapack.jl:677
  Got exception outside of a @test
  PosDefException: matrix is not positive definite; Factorization failed.
  Stacktrace:
    [1] chkposdef
      @ /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-R17H3W25T9.0/build/default-honeycrisp-R17H3W25T9-0/julialang/julia-master/julia-640e80cd1d/share/julia/stdlib/v1.12/LinearAlgebra/src/lapack.jl:54 [inlined]
    [2] posv!(uplo::Char, A::Matrix{Float32}, B::Matrix{Float32})
      @ LinearAlgebra.LAPACK /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-R17H3W25T9.0/build/default-honeycrisp-R17H3W25T9-0/julialang/julia-master/julia-640e80cd1d/share/julia/stdlib/v1.12/LinearAlgebra/src/lapack.jl:3273
    [3] macro expansion
      @ /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-R17H3W25T9.0/build/default-honeycrisp-R17H3W25T9-0/julialang/julia-master/julia-640e80cd1d/share/julia/stdlib/v1.12/LinearAlgebra/test/lapack.jl:689 [inlined]
    [4] macro expansion
      @ /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-R17H3W25T9.0/build/default-honeycrisp-R17H3W25T9-0/julialang/julia-master/julia-640e80cd1d/share/julia/stdlib/v1.12/Test/src/Test.jl:1853 [inlined]
    [5] macro expansion
      @ /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-R17H3W25T9.0/build/default-honeycrisp-R17H3W25T9-0/julialang/julia-master/julia-640e80cd1d/share/julia/stdlib/v1.12/LinearAlgebra/test/lapack.jl:677 [inlined]
    [6] macro expansion
      @ /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-R17H3W25T9.0/build/default-honeycrisp-R17H3W25T9-0/julialang/julia-master/julia-640e80cd1d/share/julia/stdlib/v1.12/Test/src/Test.jl:1764 [inlined]
    [7] top-level scope
      @ /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-R17H3W25T9.0/build/default-honeycrisp-R17H3W25T9-0/julialang/julia-master/julia-640e80cd1d/share/julia/stdlib/v1.12/LinearAlgebra/test/lapack.jl:677
    [8] include(mod::Module, _path::String)
      @ Base ./Base.jl:300
    [9] macro expansion
      @ /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-R17H3W25T9.0/build/default-honeycrisp-R17H3W25T9-0/julialang/julia-master/julia-640e80cd1d/share/julia/test/testdefs.jl:33 [inlined]
   [10] macro expansion
      @ /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-R17H3W25T9.0/build/default-honeycrisp-R17H3W25T9-0/julialang/julia-master/julia-640e80cd1d/share/julia/stdlib/v1.12/Test/src/Test.jl:1764 [inlined]
   [11] macro expansion
      @ /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-R17H3W25T9.0/build/default-honeycrisp-R17H3W25T9-0/julialang/julia-master/julia-640e80cd1d/share/julia/test/testdefs.jl:26 [inlined]
   [12] macro expansion
      @ ./timing.jl:611 [inlined]
   [13] runtests(name::String, path::String, isolate::Bool; seed::UInt128)
      @ Main /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-R17H3W25T9.0/build/default-honeycrisp-R17H3W25T9-0/julialang/julia-master/julia-640e80cd1d/share/julia/test/testdefs.jl:24
   [14] runtests
      @ /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-R17H3W25T9.0/build/default-honeycrisp-R17H3W25T9-0/julialang/julia-master/julia-640e80cd1d/share/julia/test/testdefs.jl:5 [inlined]
   [15] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{seed::UInt128})
      @ Base ./essentials.jl:1058
   [16] (::Distributed.var"#handle_msg##4#handle_msg##5"{Distributed.CallMsg{:call_fetch}})()
      @ Distributed /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-R17H3W25T9.0/build/default-honeycrisp-R17H3W25T9-0/julialang/julia-master/julia-640e80cd1d/share/julia/stdlib/v1.12/Distributed/src/process_messages.jl:287
   [17] run_work_thunk(thunk::Distributed.var"#handle_msg##4#handle_msg##5"{Distributed.CallMsg{:call_fetch}}, print_error::Bool)
      @ Distributed /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-R17H3W25T9.0/build/default-honeycrisp-R17H3W25T9-0/julialang/julia-master/julia-640e80cd1d/share/julia/stdlib/v1.12/Distributed/src/process_messages.jl:70
   [18] (::Distributed.var"#handle_msg##2#handle_msg##3"{Distributed.CallMsg{:call_fetch}, Distributed.MsgHeader, Sockets.TCPSocket})()
      @ Distributed /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-R17H3W25T9.0/build/default-honeycrisp-R17H3W25T9-0/julialang/julia-master/julia-640e80cd1d/share/julia/stdlib/v1.12/Distributed/src/process_messages.jl:287
@stevengj
Copy link
Member

stevengj commented Jan 5, 2025

Seems like it should just do:

A = randn(elty,n,n)
A = A' * A

ViralBShah added a commit that referenced this issue Jan 13, 2025
@ViralBShah ViralBShah linked a pull request Jan 13, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants