Opened 7 years ago
Last modified 7 years ago
#4756 accepted defect
Clock partitioning should be skipped in systems without clock partitions
Reported by: | Francesco Casella | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | 2.0.0 |
Component: | Backend | Version: | |
Keywords: | Cc: | Bernhard Thiele, Per Östlund |
Description
Please check the execstat log of the DistributionSystemModelicaActiveLoads_N_80_M_80 model. The preOpt clockPartitioning
phase takes over 5 seconds and half a gigabye net memory to find out that the system has in fact no clocked partitions at all.
I guess it shouldn't be hard to check from NF data that there are no instances of clocks in the model, so as to skip this phase entirely. Is there any reason not to do that?
Change History (10)
comment:1 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 7 years ago
Cc: | added |
---|
comment:3 by , 7 years ago
follow-up: 5 comment:4 by , 7 years ago
Cc: | added |
---|---|
Milestone: | 1.13.0 → 2.0.0 |
In fact, one should rather check for the absence of synchronous operators in order to skip the clock partitioning, as the default clock may be used.
@perost, can you take care of this for the NF? That's where it will really be needed, as much bigger models will be handled by it.
comment:5 by , 7 years ago
Replying to casella:
@perost, can you take care of this for the NF? That's where it will really be needed, as much bigger models will be handled by it.
There's currently no support for any synchronous features in the new frontend, so for now the backend can just assume that clock partitioning is not needed if -d=newInst is used. Or just check while creating the backend structures as lochel suggests, that way it will work the same with both the new and old frontend.
comment:6 by , 7 years ago
In this case we could possibly even check if std<3.3, but we need a better check for the future anyway.
comment:7 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | assigned → accepted |
comment:8 by , 7 years ago
I created https://github.com/OpenModelica/OMCompiler/pull/2211 which simply looks for clocked operators being elaborated and I then set a flag that synchronous features might be used. Hopefully it works fine.
follow-up: 10 comment:9 by , 7 years ago
Hmmm... Does the clockPartition also perform the work that used to be performed by just the partitioning module? We get some diffs that the number of independent subsystems is just 1 if I disable the module, so I guess it does perform some good work.
comment:10 by , 7 years ago
Replying to sjoelund.se:
Hmmm... Does the clockPartition also perform the work that used to be performed by just the partitioning module?
In that case, it should really have another name.
I guess we could detect this while creating the backend data structures. That way we would not need to traverse everything later on again.