Skip to content

lapack: posv: flaky test #1164

@nsajko

Description

@nsajko

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions