You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bernardo Pacini at U of Michigan was seeing an extra call to compute_totals which took 90 minutes for his bigger models. The cause is that the hook function that kicks off the scaling report is being triggered after the computation of the linear constraint derivatives, which does not set the '_total_jac' attribute on the Driver. That _total_jac attribute is used by the scaling report to determine if it should call _compute_totals on the Driver.
As a general solution that may be useful for other hook functions in the future, we could update the hook machinery to allow a boolean function to be passed to register_hook that will be evaluated prior to triggering the hook, and the hook would only be triggered if the boolean function returned True.
Example
No example code provided.
OpenMDAO Version
3.32.1
Relevant environment information
No response
The text was updated successfully, but these errors were encountered:
Description
Bernardo Pacini at U of Michigan was seeing an extra call to compute_totals which took 90 minutes for his bigger models. The cause is that the hook function that kicks off the scaling report is being triggered after the computation of the linear constraint derivatives, which does not set the '_total_jac' attribute on the Driver. That
_total_jac
attribute is used by the scaling report to determine if it should call_compute_totals
on the Driver.As a general solution that may be useful for other hook functions in the future, we could update the hook machinery to allow a boolean function to be passed to
register_hook
that will be evaluated prior to triggering the hook, and the hook would only be triggered if the boolean function returned True.Example
No example code provided.
OpenMDAO Version
3.32.1
Relevant environment information
No response
The text was updated successfully, but these errors were encountered: