During the CI of #157, this error happened once only (didn't happen when re-running the job)
https://github.com/timholy/ProgressMeter.jl/actions/runs/6605620538/job/17940975807?pr=157#step:7:15122
this code errored:
|
println("Testing ProgressThresh() with Threads.@threads across $threads threads") |
|
thresh = 1.0 |
|
prog = ProgressMeter.ProgressThresh(thresh; desc="Minimizing:") |
|
vals = fill(300.0, 1) |
|
threadsUsed = Int[] |
|
Threads.@threads for _ in 1:100000 |
|
!in(Threads.threadid(), threadsUsed) && push!(threadsUsed, Threads.threadid()) |
|
push!(vals, -rand()) |
|
valssum = sum(vals) |
|
if valssum > thresh |
|
ProgressMeter.update!(prog, valssum) |
|
else |
|
ProgressMeter.finish!(prog) |
|
break |
|
end |
|
sleep(0.1*rand()) |
|
end |
|
@test sum(vals) <= thresh |
|
@test length(threadsUsed) == threads #Ensure that all threads are used |
basically sum([300.0; -rand()...]) == NaN ??
the seed is set in test.jl so it should be repetable
is it because of threads? It doesn't seem to be a problem with ProgressMeter.jl really
Or is it not a big deal since it happened only once in a CI?
During the CI of #157, this error happened once only (didn't happen when re-running the job)
https://github.com/timholy/ProgressMeter.jl/actions/runs/6605620538/job/17940975807?pr=157#step:7:15122
this code errored:
ProgressMeter.jl/test/test_threads.jl
Lines 43 to 61 in 5b3bd1d
basically
sum([300.0; -rand()...]) == NaN??the seed is set in
test.jlso it should be repetableis it because of threads? It doesn't seem to be a problem with
ProgressMeter.jlreallyOr is it not a big deal since it happened only once in a CI?