-
Notifications
You must be signed in to change notification settings - Fork 159
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
Adjoint derivative taking a bit long #1621
Comments
It is likely that the the adjoint solver is using an iterative method and taking many iterations. The reason is because the solver parameters from the forward solve are not passed to the adjoint solve. Please see this issue in the pyadjoint repo and use the patch suggested there. |
Thank you for your help. I though that this (taking many iterations without having the solver parameters from the forward solve) might be the problem as well, but unfortunately the suggested patch did not help. |
Just to check, did you verify that the options are still not passed or did you just observe that the code is still slow? In the latter case, it may be that there is a separate issue. I suspect the problem is that pyadjoint solves all adjoint equations via the |
Hi again |
We recently (today) merged some changes (#1804) that make this kind of use faster. Can you update and check? |
Hi,
I am solving a two equation problem in Firedrake and I was a bit concerned about the disproportional amount of time it takes to compute the derivative of my reduced functional Jhat.
The 1D problem I'm trying to solve is as follows:
The equation for c and solving method is basically the same as in the DG advection equation with upwinding tutorial, k, k_2 are constants, and the control here is c_in.
Solving for c and q takes only couple of seconds, but computing Jhat.derivative() takes around 6 minutes.
Does this look normal, or is there a problem in my code and/or a way how to solve this faster?
Thank you for your help!
The text was updated successfully, but these errors were encountered: