1. petsc
  2. PETSc
  3. petsc
  4. Issues
Issue #69 resolved

Access to the number of total KSP iterations in TAO?

Tianyi Li
created an issue

In order to evaluate performance, I found it useful to be able to have access to the number of total KSP (like CG) iterations during a TaoSolve() call.

Since in general TAO reset the KSP object at each iteration (the sub-problem size changes), we can't just call TaoGetKSP at the end and then extract the number of KSP iterations. Perhaps it can be done in an user monitor, but it is not user-friendly.

Any ideas?

Comments (6)

  1. BarryFSmith

    We have SNESGetLinearSolveIterations() we should add TaoGetLinearSolveIterations()

    Also SNESSetConvergenceHistory() takes an array to store the number of linear iterations for each Newton step. TaoSetHistory() should be changed to TaoSetConvergenceHistory() and also take an array to store the number of linear iterations for each step

  2. sarich

    Both of these issues (accessing the total number of ksp iterations and the history list of ksp iterations per TAO iteration) are fixed in the master branch.

    You can call TaoGetLinearSolveIterations(Tao, PetscInt*) to get the total number of KSP iterations.

  3. Log in to comment