-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
better error trap when constant equals 1 #1363
Comments
Indeed this is unrelated to parallization and problem comes from having backward indexing of I'm not sure why we don't warn users when we encounter backward indexing. @danielturek @perrydv do either of you remember why, when we check |
@paciorek I think it was the case that some historical-types of model structures, backwards indexing can just "arise" somewhat naturally, and in those cases, it should be ignored... that was what BUGS did. So, we followed that model (of silently ignoring it), but (per usual) added an option for different behavior, if that's what a user wants (in this case, processing the backwards indexing). Given all of that. Perhaps one path is to introduce a warning when we ignore such indexing, but perhaps that warning itself could be suppress-able. Or, maybe controlled by our |
A related issue came up recently on nimble-users here. (The message subject was not really relevant.) The issue was whether if nimbleModel sees "for(i in a:b)", where My thoughts echo @danielturek 's. It does not seem like something is broken here. Given that it is a declarative language, index order should not matter. I can see some cases where it might be convenient to allow negative orders, but they seem rare. More often it seems it would be unintentional. |
Ok, I will add a warning when we notice backward indexing and it is being ignored (which is the default). |
Actually one other note here is that we actually get errors with backwards indexing. (And the exact error depends on other stuff in the model.) So I'm confused as to what use cases we might have checked when we were setting this up.
|
This came up as a possible parallelization question, but the error seems like it is probably simply triggered by using
T
without defining it and coercion to the value 1. Try seeing if running it serially but withT
not set also triggers and presuming so, trap the error.The text was updated successfully, but these errors were encountered: