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

Fix how the optimization module receives parameters from TAO #28922

Open
lynnmunday opened this issue Oct 23, 2024 · 0 comments · May be fixed by #28923
Open

Fix how the optimization module receives parameters from TAO #28922

lynnmunday opened this issue Oct 23, 2024 · 0 comments · May be fixed by #28923
Assignees
Labels
P: normal A defect affecting operation with a low possibility of significantly affects. T: defect An anomaly, which is anything that deviates from expectations.

Comments

@lynnmunday
Copy link
Contributor

Bug Description

@lindsayad noticed that OptimizeSolve gives TAO PETSC ownership of a solution vector pointer that is then also being modified by OptimizeSolve. So both the TAO optimization algorithms and OptimizeSolve are changing values in this vectors. This behavior is wrong and causes the TAO optimization algorithms to be incorrectly applied. This is also not allowed in a PETSC 3.22 update that uses vecloc on solution vectors.

Steps to Reproduce

This test now converges in one fewer iteration after fixing this:
modules/optimization/executioners/constrained/shape_optimization.equality_constraint

You will also note that the gradient is reduced at a much faster rate.

Impact

This was causing linesearch to fail and resulted in more tests using a trust-region solver or a unit line-search. Fixing htis will enable us to use line-search algorithms again. Modifying the tao parameter vector probably has other unintended consequences I am unaware of.

[Optional] Diagnostics

No response

@lynnmunday lynnmunday added P: normal A defect affecting operation with a low possibility of significantly affects. T: defect An anomaly, which is anything that deviates from expectations. labels Oct 23, 2024
lynnmunday added a commit to lynnmunday/moose that referenced this issue Oct 23, 2024
…nce with slightly different optimized values than before. closes idaholab#28922
@lynnmunday lynnmunday linked a pull request Oct 23, 2024 that will close this issue
lindsayad pushed a commit to lindsayad/moose that referenced this issue Oct 24, 2024
…nce with slightly different optimized values than before. closes idaholab#28922
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P: normal A defect affecting operation with a low possibility of significantly affects. T: defect An anomaly, which is anything that deviates from expectations.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant