OMCompiler icon indicating copy to clipboard operation
OMCompiler copied to clipboard

[BE] Do not run clockPartitioning unless needed

Open sjoelund opened this issue 7 years ago • 13 comments

This resolves ticket:4756 by keeping track of when clocked operators have been used.

sjoelund avatar Feb 16 '18 10:02 sjoelund

The test suite is unstable according to OpenModelica_TEST_PULL_REQUEST 2018-02-16_11-19-44.

OpenModelica-Hudson avatar Feb 16 '18 10:02 OpenModelica-Hudson

The test suite is unstable according to OpenModelica_TEST_PULL_REQUEST 2018-02-21_11-25-51.

OpenModelica-Hudson avatar Feb 21 '18 10:02 OpenModelica-Hudson

The test suite is unstable according to OpenModelica_TEST_PULL_REQUEST 2018-02-21_12-04-31.

OpenModelica-Hudson avatar Feb 21 '18 11:02 OpenModelica-Hudson

The test suite is unstable according to OpenModelica_TEST_PULL_REQUEST 2018-02-21_12-25-29.

OpenModelica-Hudson avatar Feb 21 '18 11:02 OpenModelica-Hudson

The test suite is unstable according to OpenModelica_TEST_PULL_REQUEST 2018-02-21_12-41-47.

OpenModelica-Hudson avatar Feb 21 '18 11:02 OpenModelica-Hudson

The test suite is unstable according to OpenModelica_TEST_PULL_REQUEST 2018-02-21_13-05-33.

OpenModelica-Hudson avatar Feb 21 '18 12:02 OpenModelica-Hudson

The test suite is unstable according to OpenModelica_TEST_PULL_REQUEST 2018-02-21_13-23-54.

OpenModelica-Hudson avatar Feb 21 '18 12:02 OpenModelica-Hudson

It really seems like clockPartioning is doing more than just finding out clock partitions. Any chance to get a good understanding of what that actually is?

casella avatar Feb 21 '18 14:02 casella

I don't know. I just ran this job a bunch of times while testing VisualStudio-related things

sjoelund avatar Feb 21 '18 14:02 sjoelund

The module is also calculating independent partitions to run other modules with smaller equation sets.

lochel avatar Feb 21 '18 14:02 lochel

@lochel: OK. So, that will mean that if there are functions in the backend whose complexity is (significantly) greater than O(N), the overall time should be smaller if there are such independent systems, as long as this is not offset by the time taken by this module. Are you aware of any such functions, besides those who scale badly due to sub-optimal implementation (see #4146)?

Anyway, I would suggest to change its name to systemPartitioning, as it doesn't necessarily involve clocks. Unless the system partitioning and the clock partitioning can be split in two separate modules, is that the case?

Sorry for asking about all these details, but all the documentation of this module says is

clockPartitioning (Does the clock partitioning.)

which is incorrect and a bit misleading. In fact, there was an old flag (disablePartitioning) which was more correctly described as

Deactivates partitioning of entire equation system. 

Unfortunately this is now deprecated in favour of clockPartitioning

casella avatar Feb 21 '18 15:02 casella

@casella No, I am not aware of further modules. But that doesn't mean too much...

I think it is reasonable to rename that module. I am fine with the proposal systemPartitioning.

@sjoelund If you want, I can take over this PR and implement the switch to deactivate the clock partitioning.

lochel avatar Feb 23 '18 09:02 lochel

@lochel Sure, you can push to my branch I'm sure. Then we can rename it and see if it helps performance to disable only the clock partitioning part.

sjoelund avatar Feb 23 '18 09:02 sjoelund