[petsc-users] Is matrix analysis available in PETSc or external package?
Barry Smith
bsmith at mcs.anl.gov
Tue May 12 13:13:24 CDT 2015
> On May 11, 2015, at 7:10 PM, Danyang Su <danyang.su at gmail.com> wrote:
>
> Hi All,
>
> I recently have some time-dependent cases that have difficulty in convergence. It needs a lot of linear iterations during a specific time, e.g., more than 100 linear iterations for every newton iteration. In PETSc parallel version, this number will be doubled or even more. Our case usually needs less than 10 iterations for every newton iteration. This is NOT caused by PETSc relative routines as the original sequential solver (ILU) also has the same problem.
>
> The results seems reasonable, but the large number of iterations leads me to suspect that something is not well implemented in a particular module. This module is developed a long time ago by another guy and it sounds impossible for me to check every line (thousands of lines) and do theoretical analysis.Does PETSc or external package provide matrix analysis to help to locate the 'suspected' entry?
What do you mean by 'matrix analaysis'? You can run with -ksp_view_mat binary to have all the matrices saved in a binary file called binaryoutput which you can read into MATLAB (with $PETSC_DIR/shared/petsc/matlab/PetscBinaryRead.m) or python (with bin/PetscBinaryIO.py). You can then look at the matrices, determine the largest entry whatever you wish.
But it is also very possible that the due to changes in the model you are evolving in time the linear system simple does get more ill-conditioned during part of the simulation. This is pretty common and need not indicate that there is anything wrong with the model or the code.
Barry
>
> Thanks and regards,
>
> Danyang
More information about the petsc-users
mailing list