[Trilinos-Users] [EXTERNAL] Matrix Free operator, and loss of accuracy error

Roger Pawlowski rppawlo at sandia.gov
Mon Dec 8 11:30:43 MST 2014


Hi Tom,

This is a known issue.  JFNK uses a directional derivative for the 
Jacobian-vector product and Aztec is detecting that loss of accuracy 
from the finite differencing.  It could be indicative of a poorly scaled 
system of equations and/or linear solve tolerances in Aztec that are too 
tight.  You can switch to a higher order derivative in the JFNK 
algorithm or loosen the linear solve tolerances.  If it is poorly 
scaled, you can enable row sum scaling of the linear system in the nox 
group for the linear solves.  We tend to ignore the warning as it was an 
overly stringent check that, if memory serves, assumed you had an 
analytic Jacobian.  By default, nox with JFNK should ignore this 
warning.  Please send your output so I can check to make sure that is 
happening in your case. Note that if you switch to Belos instead of 
Aztec (preferred), this warning will not occur.

Best,
Roger


On 12/08/2014 12:04 PM, Tom Goffrey wrote:
> Hello,
>
> We currently utilise AztecOO GMRES (with condition number estimate) to 
> solve the linear system resulting from the time implicit solution of 
> multi-dimensional hydrodynamics. However we have run into problems 
> when adapting our code to apply a Jacobian free approach.
>
> We replaced our previous explicit Jacobian operator with the matrix 
> free operator from the NOX package.
> (http://trilinos.org/docs/dev/packages/nox/doc/html/classNOX_1_1Epetra_1_1MatrixFree.html)
>
> However we find a high proportion of our GMRES solves abort 
> prematurely due to an error relating to an apparent loss of accuracy:
>
>         Warning: recursive residual indicates convergence
>         though the true residual is too large.
>
>         Sometimes this occurs when storage is overwritten (e.g. the
>         solution vector was not dimensioned large enough to hold
>         external variables). Other times, this is due to roundoff. In
>         this case, the solution has either converged to the accuracy
>         of the machine or intermediate roundoff errors occurred
>         preventing full convergence. In the latter case, try solving
>         again using the new solution as an initial guess.
>
> I didn't manage to find much within Trilinos documentation on this, 
> but from looking through the source code it appears this is triggered 
> by a significant difference between the recursive residual and the 
> true residual, where the true residual is calculated for the solution 
> vector, but the recursive residual is calculated by using an 
> incremental solution vector.
>
> Currently we believe the high frequency of this error we see for the 
> JFNK approach is because we have in fact used a non-linear operator 
> (in this case our non-linear residual function) to approximate the 
> linear Jacobian-vector product. As such it is not clear to us that 
> this sort of error checking makes sense in this situation, or perhaps 
> it should be interpreted as a sign the Jacobian free approximation is 
> becoming worse?
>
> Presumably I can control this error checking by allowing the two 
> residuals to vary by a greater amount, but I was wondering if others 
> have had similar problems, and had any advice on the issue?
>
> Of course, any alternative explanation of the high frequency would be 
> equally appreciated!
>
> Thanks,
>
> Tom Goffrey
>
>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> https://software.sandia.gov/mailman/listinfo/trilinos-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://software.sandia.gov/pipermail/trilinos-users/attachments/20141208/1627db2f/attachment.html>


More information about the Trilinos-Users mailing list