[petsc-users] Condition number of matrix
Matthew Knepley
knepley at gmail.com
Tue Aug 30 07:05:36 CDT 2016
On Tue, Aug 30, 2016 at 7:01 AM, Florian Lindner <mailinglists at xgm.de>
wrote:
> Hello,
>
> there is a FAQ and a Stackoverflow article about getting the condition
> number of a petsc matrix:
>
> http://www.mcs.anl.gov/petsc/documentation/faq.html#conditionnumber
> http://scicomp.stackexchange.com/questions/34/how-can-i-
> estimate-the-condition-number-of-a-large-sparse-matrix-using-petsc
>
> Both tell me to add:
>
> -pc_type none -ksp_type gmres -ksp_monitor_singular_value
> -ksp_gmres_restart 1000
>
> to my options.
>
> I add the line to .petscrc but nothing happens, no additional output at
> all. I added -ksp_view, so my .petscrc looks
> like that:
>
Each option must be on its own line .petscrc
Thanks,
Matt
> -ksp_view
> -pc_type none -ksp_type gmres -ksp_monitor_singular_value
> -ksp_gmres_restart 1000
>
> The complete output is below, but something I wonder about:
>
> GMRES: restart=30, shouldn't that be 1000
>
> And where can I read out the condition number approximation?
>
> Thanks,
> Florian
>
>
> KSP Object: 1 MPI processes
> type: gmres
> GMRES: restart=30, using Classical (unmodified) Gram-Schmidt
> Orthogonalization with no iterative refinement
> GMRES: happy breakdown tolerance 1e-30
> maximum iterations=10000
> tolerances: relative=1e-09, absolute=1e-50, divergence=10000.
> left preconditioning
> using nonzero initial guess
> using PRECONDITIONED norm type for convergence test
> PC Object: 1 MPI processes
> type: none
> linear system matrix = precond matrix:
> Mat Object: C 1 MPI processes
> type: seqsbaij
> rows=14403, cols=14403
> total: nonzeros=1044787, allocated nonzeros=1123449
> total number of mallocs used during MatSetValues calls =72016
> block size is 1
> (0) 13:58:35 [precice::impl::SolverInterfaceImpl]:395 in initialize: it 1
> of 1 | dt# 1 | t 0 of 1 | dt 1 | max dt 1 |
> ongoing yes | dt complete no |
> (0) 13:58:35 [precice::impl::SolverInterfaceImpl]:446 in advance:
> Iteration #1
> KSP Object: 1 MPI processes
> type: gmres
> GMRES: restart=30, using Classical (unmodified) Gram-Schmidt
> Orthogonalization with no iterative refinement
> GMRES: happy breakdown tolerance 1e-30
> maximum iterations=10000
> tolerances: relative=1e-09, absolute=1e-50, divergence=10000.
> left preconditioning
> using nonzero initial guess
> using PRECONDITIONED norm type for convergence test
> PC Object: 1 MPI processes
> type: none
> linear system matrix = precond matrix:
> Mat Object: C 1 MPI processes
> type: seqsbaij
> rows=14403, cols=14403
> total: nonzeros=1044787, allocated nonzeros=1123449
> total number of mallocs used during MatSetValues calls =72016
> block size is 1
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160830/553829cb/attachment.html>
More information about the petsc-users
mailing list