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

Avoid modifying solution vector in TaoOptimizationSolver callbacks. #1898

Merged
merged 2 commits into from
Oct 15, 2018

Conversation

jwpeterson
Copy link
Member

As discussed in #1889 (and previously in #630 and #1294) we cannot modify the solution vector by enforcing constraints in the PETSc callback functions but we can enforce the constraints on current_local_solution, which is not locked read only.

cc: @andfranklin

This should fix the error:

Object is in wrong state
Vec is locked read only, argument # 1

we currently get when running the libmesh examples using a PETSc built
with --with-debugging=1.

Refs libMesh#1889.
See also: libMesh#1294, libMesh#630.
@jwpeterson
Copy link
Member Author

I verified using a local PETSc-debug build that the optimization solvers both run with the changes on this branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant