-
Notifications
You must be signed in to change notification settings - Fork 89
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 may not reach Residual in time #77
Comments
Some initial debugging suggests that our concern is valid:
Here, "step" is a monotonic numbering of all nonlinear solver steps in the simulation. Step -2 represents the identity scaling vector that is used if the Jacobian has not yet been computed. The problem is very simple: the residual is requested before the Jacobian, but the Jacobian is needed to compute the scaling for the Residual. Thus, each residual gets the scaling that is appropriate to the Jacobian from the previous nonlinear step, or unity if there is no previous step. This output is using the Line Search Based nonlinear solver, which computes the residual twice after solving the linear system to check convergence. Unfortunately, the first residual evaluation is the critical one that is used to form the linear system:
|
We are very careful about this in the nox solvers and make sure to recalculate norms (instead of reusing across Newton iterations) since weights can change even between Newton steps. Are you using the nox PrePostOperator to update the weights? See, for example, the file: Trilinos/packages/nox/src-thyra/NOX_PrePostOperator_RowSumScaling.H This object allows you to specify when to update the scaling so that it can be used for both steady-state (pre-iterate) and transient (pre-solve) solves. |
@rppawlo Right now all the scaling logic is hardcoded deep in Albany, and the scaling happens before we return the Residual and Jacobian from our Thyra ModelEvaluator. The scaling factors are computed when the Jacobian is computed, at every Newton step. I'd certainly like to use an existing Trilinos system, because Scaling should really not be the concern of the physics application. PrePostOperators look promising. Is there an example of activating this through NOX ParameterLists ? |
This is a short-term workaround for gahansen/Albany#77, and should not adversely affect other users of SingleStep Build/Test Cases Summary Enabled Packages: NOX Disabled Packages: PyTrilinos,Claps,TriKota 0) MPI_RELEASE_DEBUG_SHARED_PT => passed: passed=101,notpassed=0 (3.25 min)
In reasoning about #76, @bgranzow and I are concerned that if the Residual is requested before the Jacobian, it will not receive the same scaling as the Jacobian. This issue tracks my progress investigating that. If it is true, it would give incorrect results with Scaling on.
@ikalash
The text was updated successfully, but these errors were encountered: