Opened 6 years ago

Last modified 6 years ago

#4756 accepted defect

Clock partitioning should be skipped in systems without clock partitions

Reported by: casella Owned by: sjoelund.se
Priority: high Milestone: 2.0.0
Component: Backend Version:
Keywords: Cc: bthiele, perost

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 Changed 6 years ago by bthiele

  • Owner changed from bthiele to lochel
  • Status changed from new to assigned

comment:2 Changed 6 years ago by bthiele

  • Cc bthiele added

comment:3 Changed 6 years ago by lochel

I guess we could detect this while creating the backend data structures. That way we would not need to traverse everything later on again.

comment:4 follow-up: Changed 6 years ago by casella

  • Cc perost added
  • Milestone changed from 1.13.0 to 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 in reply to: ↑ 4 Changed 6 years ago by perost

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 Changed 6 years ago by sjoelund.se

In this case we could possibly even check if std<3.3, but we need a better check for the future anyway.

comment:7 Changed 6 years ago by sjoelund.se

  • Owner changed from lochel to sjoelund.se
  • Status changed from assigned to accepted

comment:8 Changed 6 years ago by sjoelund.se

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.

comment:9 follow-up: Changed 6 years ago by sjoelund.se

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 in reply to: ↑ 9 Changed 6 years ago by casella

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.

Note: See TracTickets for help on using tickets.