julia> g() = (a = rand(10,10); b = rand(10); v = cg(rand(10,10), rand(10)); return a, b, v)
julia> for i = 1:1000
a,b,v = g()
check = any(isnan.(v))
check && return a, b, v
end
Run this a few times if need be to see the bug. You'll find that v is all NaNs although if you run cg on the matrix and vector again you won't find NaNs.
FWIW, I also seem to see this pop up more often when I do @spawn g() and I have multiple threads.
On Julia v1.4, run the following code:
Run this a few times if need be to see the bug. You'll find that
v
is all NaNs although if you runcg
on the matrix and vector again you won't find NaNs.FWIW, I also seem to see this pop up more often when I do
@spawn g()
and I have multiple threads.