#6206 closed defect (fixed)
The NF fails to evaluate expression in Buildings library
Reported by: | Francesco Casella | Owned by: | Per Östlund |
---|---|---|---|
Priority: | critical | Milestone: | 1.18.0 |
Component: | New Instantiation | Version: | |
Keywords: | Cc: | Michael Wetter |
Description (last modified by )
Please check
Buildings.Fluid.Geothermal.Borefields.Examples.Borefields. The NF fails with
[Compiler/NFFrontEnd/NFCeval.mo:1125:9-1125:67:writable] Error: Internal error NFCeval.evalBinaryPow failed to evaluate borFie2UTubParDat.conDat.hBor ^ 2.0
Change History (18)
comment:1 by , 4 years ago
Milestone: | 1.17.0 → 1.18.0 |
---|
comment:2 by , 4 years ago
comment:3 by , 4 years ago
If I add a second evalExp_impl
, it does evaluate it and gets further (but there are many other places where that cref is not evaluated fully).
comment:4 by , 4 years ago
Description: | modified (diff) |
---|
comment:5 by , 4 years ago
The issue is that the model has variability issues, where e.g. record instance parameter are given bindings that are variables, i.e. there are record instances that should be declared as parameter but aren't. There's been some confusion in the past about what the variability of record instances that only contain constants/parameters is, but #1832 says that there are no special rules for record instances.
So the error message comes from the fact that Ceval skips evaluating nonparameter crefs. Ceval should probably just give an error in such cases, but I think there's a reason for it that I don't remember. But it doesn't matter, the actual issue is that the variability issue should be caught earlier so we never get there in the first place.
I've fixed the variability check in PR 7361 so that we now get a better error message:
[Borefields.mo:2050:111-2050:140:writable] Error: Component borFieDat of variability parameter has binding 'borFie2UTubParDat' of higher variability continuous.
The fix is trivial, just add parameter
to some of the components in the model. But I will wait until the library coverage job has been run with this change, in case there are other models in the library with this issue that should be fixed at the same time.
comment:6 by , 4 years ago
OK, it seems that we are on the right path to finally solve this issue and get a big boost of the success ratio of the library. Thanks!
follow-up: 9 comment:7 by , 4 years ago
I just checked the new error message, and indeed it worked fine
[Buildings 7.0.0/Fluid/Geothermal/Borefields/Examples/Borefields.mo:15:5-15:32:writable] Error: Component borFieDat of variability parameter has binding 'borFie2UTubParDat' of higher variability continuous.
I'm not sure how many instances of this error are there in the Jenkins run of the library, which is important to know if you want to fix the library itself on the 7.0.x maintenance branch. Maybe you can grep "of higher variability continuous" in the directory where all the error logs are written, in order to find out?
comment:8 by , 4 years ago
Unfortunately the other ticket failing because of not evaluated structural parameter, #5991, seems not to be affected, it probably has a different root cause.
comment:9 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to casella:
I'm not sure how many instances of this error are there in the Jenkins run of the library, which is important to know if you want to fix the library itself on the 7.0.x maintenance branch. Maybe you can grep "of higher variability continuous" in the directory where all the error logs are written, in order to find out?
Already done, see this PR, so I guess we might as well close this.
follow-up: 12 comment:10 by , 4 years ago
Cc: | added |
---|
I'd prefer to close this once we have proof everything works fine on our testsuite, just in case something goes wrong in the process.
BTW, I'm not sure I'm getting all the details right:
- @perost opened issue #2438
- @perost opened PR #2439 to address it, which was rejected by the CI system checks, maybe because it was applied to the master branch
- @mwetter then opened PR #2441 on master, which passed but is not yet merged in, and PR #2442 on maint_7.0.x, which is ready to be merged. I'm not sure if the two are equivalent, because they apparently refer to different commits, and if they both address the issue raised in #2438.
@mwetter, can you please shed some light and merge in everything ASAP, so we can see the results on our CI testsuite?
Thanks!
comment:11 by , 4 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:12 by , 4 years ago
Replying to casella:
I'd prefer to close this once we have proof everything works fine on our testsuite, just in case something goes wrong in the process.
Fine with me.
Replying to casella:
BTW, I'm not sure I'm getting all the details right:
- @perost opened issue #2438
- @perost opened PR #2439 to address it, which was rejected by the CI system checks, maybe because it was applied to the master branch
- @mwetter then opened PR #2441 on master, which passed but is not yet merged in, and PR #2442 on maint_7.0.x, which is ready to be merged. I'm not sure if the two are equivalent, because they apparently refer to different commits, and if they both address the issue raised in #2438.
@mwetter, can you please shed some light and merge in everything ASAP, so we can see the results on our CI testsuite?
Thanks!
I guess he can't reply here since the Trac is in read-only mode for non-admins, but the new PRs just apply my fix to master and the maintenance branch. I'm not sure why a new PR was needed for master, but it's just his workflow I guess.
comment:13 by , 4 years ago
OK, @mwetter please reply on github. We will migrate trac on github anytime soon :)
comment:14 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Closing again since the library issue has now been fixed.
follow-up: 16 comment:15 by , 4 years ago
OK. Let's see how many models are fixed on our CI as soon as it runs again.
comment:16 by , 4 years ago
Replying to casella:
OK. Let's see how many models are fixed on our CI as soon as it runs again.
15 models will be improved (since all the fixed models are example/validation models that don't affect other models), but about 6-7 of them still don't pass the frontend if I remember correctly from my testing.
comment:17 by , 4 years ago
comment:18 by , 4 years ago
OK. Too bad many of them are now failing for other issues. We'll track them down later on.
borFie2UTubPar.groTemRes.borFieDat.conDat.hBor
evaluates toborFie2UTubParDat.conDat.hBor
which is a little odd.