Skip to content
Snippets Groups Projects
Commit fbc3068a authored by Florian Atteneder's avatar Florian Atteneder
Browse files

fix wrong callback invokation when finishing

parent 398dfb8d
Branches opt-allocs
No related tags found
No related merge requests found
...@@ -56,18 +56,19 @@ function main(parfile) ...@@ -56,18 +56,19 @@ function main(parfile)
finally finally
# finish timer and progress bar # finish timer and progress bar
idx = findfirst(cb -> cb isa TimerOutputCallback, reverse(env.callbacks.callbacks)) idx = findlast(cb -> cb isa TimerOutputCallback, env.callbacks.callbacks)
if !isnothing(idx) if !isnothing(idx)
timercb = env.callbacks.callbacks[idx] timercb = env.callbacks.callbacks[idx]
timercb([], 0.0, 0, force=true) timercb([], 0.0, 0, force=true)
end end
idx = findfirst(cb -> cb isa ProgressCallback, reverse(env.callbacks.callbacks)) # Can't force atm, because ProgressCallback uses an internal CallbackTiming...
if !isnothing(idx) # forwarded through the callback, henc
progresscb = env.callbacks.callbacks[idx] # idx = findlast(cb -> cb isa ProgressCallback, env.callbacks.callbacks)
progresscb([], 0.0, 0, force=true) # if !isnothing(idx)
else # progresscb = env.callbacks.callbacks[idx]
display(dg1d.TO) # progresscb([], 0.0, 0, force=true)
end # end
display(dg1d.TO)
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment