Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaling report can cause an extra call to compute_totals when there are linear constraints #3231

Open
naylor-b opened this issue May 13, 2024 · 0 comments
Labels

Comments

@naylor-b
Copy link
Member

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

@naylor-b naylor-b added the bug label May 13, 2024
@robfalck robfalck removed their assignment May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants