Opened 7 years ago

Closed 6 years ago

#4626 closed defect (wontfix)

Unit checking in the new front end is slow

Reported by: Francesco Casella Owned by: Martin Sjölund
Priority: blocker Milestone: 1.14.0
Component: OMEdit Version:
Keywords: Cc: Per Östlund, arunkumar palanisamy, Adeel Asghar

Description (last modified by Per Östlund)

The unit-checking feature is the performance bottleneck of the new front-end, even for models that actually don't have unit information in their variables (see, e.g. the AdvectionReaction models of the ScalableTestSuite).

This may not be a big problem, because unit testing usually makes sense when developing new models, and that is normally done using small scale test models, so making this module faster is really not a high priority.

I would suggest that @perost changes the default behaviour to turn off unit checking by default on the new front end, so that we see the performance of stuff that reall matter, and then @mahge930 and @arun3688 have a closer look at performance issues and try to improve them, if this is not too hard.

@mahge930, please make sure there are test cases in the testsuite where unit checking is switched on after the default is changed.

Change History (15)

comment:1 by Francesco Casella, 7 years ago

Description: modified (diff)

comment:2 by Per Östlund, 7 years ago

Description: modified (diff)

I had Martin disable the unit checking for the Hudson library testing job for the new frontend, but now that you mention it it makes more sense to just turn it off in the new frontend instead. I will do that, it's just a matter of flipping the debug flag to be false by default.

comment:3 by Christoph Buchner <buchner@…>, 7 years ago

Fixing/correcting the unit checking bottleneck in the new frontend is not a preferable approach? Is the needed fix too complicated/unknown/time-consuming?

in reply to:  3 comment:4 by Per Östlund, 7 years ago

Replying to Christoph Buchner <buchner@…>:

Fixing/correcting the unit checking bottleneck in the new frontend is not a preferable approach? Is the needed fix too complicated/unknown/time-consuming?

The unit checking should of course be fixed, but it has low priority since it's not an essential part of the instantiation. The proper fix would be to reimplement it to use the new frontend structure instead of doing it on the flat DAE, but until someone has time to do that we disable it. It can still be enabled with -d=frontEndUnitCheck.

in reply to:  3 comment:5 by Francesco Casella, 7 years ago

Cc: Adeel Asghar added

We have much more urgent and critical priorities to get the new front-end running, see #4138.

Unit checking is usually performed on basic component model definitions, not on large modular models. For that kind of use, the current performance is more than adequate; for a component model with several hundred equations, the time taken by unit checking will be unnoticeable (a small fraction of a second).

Of course if anybody who is not currently involved in the new front-end development wants to get involved on this, he/she is welcome to do so.

In the meantime, one reasonable compromise would be to do unit checking in OMEdit when checking components only, not when simulating them. @adeas31, could this be implemented quickly?

comment:6 by Martin Sjölund, 7 years ago

Well, we could just make the check if CHECK_MODEL or FRONTEND_UNIT_CHECK then unitChecking(...), assuming you always want unit checking when doing model checking.

in reply to:  6 ; comment:7 by Francesco Casella, 7 years ago

Replying to sjoelund.se:

Well, we could just make the check if CHECK_MODEL or FRONTEND_UNIT_CHECK then unitChecking(...), assuming you always want unit checking when doing model checking.

Sounds good to me.

comment:8 by Christoph Buchner <buchner@…>, 7 years ago

Sounds good to me! It makes more users aware of unit issues (which I think is very useful), while not negatively impacting performance.

in reply to:  7 comment:9 by Francesco Casella, 7 years ago

Replying to sjoelund.se:

Well, we could just make the check if CHECK_MODEL or FRONTEND_UNIT_CHECK then unitChecking(...), assuming you always want unit checking when doing model checking.

See #4629

in reply to:  6 comment:10 by Francesco Casella, 6 years ago

Component: New InstantiationOMEdit
Milestone: Future1.13.0

Replying to sjoelund.se:

Well, we could just make the check if CHECK_MODEL or FRONTEND_UNIT_CHECK then unitChecking(...), assuming you always want unit checking when doing model checking.

@adeas31, could you implement this for OMEdit 1.13.0?

Thanks!

comment:11 by Adeel Asghar, 6 years ago

I think Martin's idea is to do it in Compiler. I am not sure how you want this to be handled in OMEdit.

Last edited 6 years ago by Adeel Asghar (previous) (diff)

in reply to:  11 comment:12 by Francesco Casella, 6 years ago

Owner: changed from Mahder Alemseged Gebremedhin to Martin Sjölund
Status: newassigned

Replying to adeas31:

I think Martin's idea is to do it in Compiler. I am not sure how you want this to be handled in OMEdit.

OK, sorry, I missed that.

Last edited 6 years ago by Adeel Asghar (previous) (diff)

comment:13 by Francesco Casella, 6 years ago

Priority: lowblocker

This issue must be resolved in 1.14.0

comment:14 by Francesco Casella, 6 years ago

Milestone: 1.13.01.14.0

comment:15 by Francesco Casella, 6 years ago

Resolution: wontfix
Status: assignedclosed

OK, we have a consensus that fast unit checking in the new FE is not a critical issue, as long as unit checking is performed only when checking a model, not when compiling it to run it.

For this specific task, we have #4629, so we can close this ticket.

Note: See TracTickets for help on using tickets.