You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can understand it, the code is recursively going through the loop body, and in this case where it finds a break/return it inserts a special node to handle break and return statements. The problem is that when there's a return in some code that's technically part of the loop but isn't actually executed in the loop (e.g. a closure), the macro will still insert those special nodes. I guess that explains the second error, UndefVarError: ##meter#313 not defined; the meter#313 variable is probably metersym in the code, which was created on the master process and then inserted into the AST to be executed on the worker.
I saw that #146 has similar error messages, but I don't think this is related.
The text was updated successfully, but these errors were encountered:
I've run into a strange edge case with
@showprogress
andpmap
. First I import packages and add a workerThen I try running this:
Which fails with this very long error about not being able to find
ProgressMeter
:First error message
Then I import
ProgressMeter
everywhere and try again:This fails with a different error:
Second error message
But this works fine, even without
@everywhere using ProgressMeter
:For some reason the omission of
return
in thepmap
body makes it work. I had a quick look through the source to see if I could find the problem, and I think it's something to do withshowprogress_process_expr()
: https://github.com/timholy/ProgressMeter.jl/blob/v1.7.2/src/ProgressMeter.jl#L707As far as I can understand it, the code is recursively going through the loop body, and in this case where it finds a
break
/return
it inserts a special node to handle break and return statements. The problem is that when there's areturn
in some code that's technically part of the loop but isn't actually executed in the loop (e.g. a closure), the macro will still insert those special nodes. I guess that explains the second error,UndefVarError: ##meter#313 not defined
; themeter#313
variable is probablymetersym
in the code, which was created on the master process and then inserted into the AST to be executed on the worker.I saw that #146 has similar error messages, but I don't think this is related.
The text was updated successfully, but these errors were encountered: