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 Bernhard Thiele, 7 years ago

Owner: changed from Bernhard Thiele to Lennart Ochel
Status: newassigned

comment:2 by Bernhard Thiele, 7 years ago

Cc: Bernhard Thiele added

comment:3 by Lennart Ochel, 7 years ago

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 by Francesco Casella, 7 years ago

Cc: Per Östlund added
Milestone: 1.13.02.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.

in reply to:  4 comment:5 by Per Östlund, 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 Martin Sjölund, 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 Martin Sjölund, 7 years ago

Owner: changed from Lennart Ochel to Martin Sjölund
Status: assignedaccepted

comment:8 by Martin Sjölund, 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.

comment:9 by Martin Sjölund, 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.

in reply to:  9 comment:10 by Francesco Casella, 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.

Note: See TracTickets for help on using tickets.