Closed IanButterworth closed 4 months ago
Oscar here (grabbed Ian's phone) @aviatesk can you look into this? It seems like we must have some horrible effects bug here (broken nothrow analysis possibly?)
Thanks for the ping. I'll look into it.
It appears that this error is caused by the @simd
usage within tr(::Matrix{T}) where T
rather than the effects modeling issues. It seems like using a lazy string in checksquare
is not directly causing this error. This error happens non-deterministically, indicating that the issue is randomness caused by the macro.
MRE:
using LineaAlgebra, Test
for _ = 1:100; begin
n = 10
areal = randn(n,n)/2
a = convert(Matrix{Float64}, areal)
aherm = a' + a
@test tr(aherm) == tr(Hermitian(aherm))
aimg = randn(n,n)/2
areal = randn(n,n)/2
a = convert(Matrix{ComplexF32}, complex.(areal, aimg))
aherm = a' + a
@test tr(aherm) == tr(Hermitian(aherm))
end; end
Thanks for investigating & fixing. I had thought this was a return type change from real to complex, hence the alarm.
Seen on this 1.10 backports PR https://github.com/JuliaLang/julia/pull/53714 but the problematic commit was reverted on that PR
feceefe
(#53714)Quoting https://github.com/JuliaLang/julia/pull/53714#issuecomment-2052421573
I confirmed locally that this error was introduced by
feceefe
(#53714)which is weird for just a change switching to lazy strings?
Specifically, reverting just this one makes tests pass https://github.com/JuliaLang/julia/blob/97b0571cbd74cfc7959fe065b5dfc47d0636fc4e/stdlib/LinearAlgebra/src/LinearAlgebra.jl#L241
Also leaving it lazy and adding a
@show m
under that line makes test pass