<div dir="ltr"><div>condition number is max_eigenvalue/min_eigenvalue.<br><br></div>so I guess it is max/min 2.829815526858e+06?<br>
</div><div class="gmail_extra"><br><div class="gmail_quote">2016-08-30 10:03 GMT-04:00 Florian Lindner <span dir="ltr"><<a href="mailto:mailinglists@xgm.de" target="_blank">mailinglists@xgm.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<span class=""><br>
Am 30.08.2016 um 14:05 schrieb Barry Smith:<br>
><br>
>    The format of .petscrc requires each option to be on its own line<br>
><br>
>> -ksp_view<br>
>> -pc_type none<br>
>> -ksp_type gmres<br>
>> -ksp_monitor_singular_value<br>
>> -ksp_gmres_restart 1000<br>
<br>
</span>Oh man, didn't know that. Sorry! Is using a hash # ok for comments in .petscrc?<br>
<br>
I added the option accordingly:<br>
<span class=""><br>
-ksp_view<br>
-pc_type none<br>
-ksp_type gmres<br>
-ksp_monitor_singular_value<br>
-ksp_gmres_restart 1000<br>
<br>
</span>petsc outputs a line like:<br>
<br>
550 KSP Residual norm 1.374922291162e-07 % max 1.842011038215e+03 min 6.509297234157e-04 max/min 2.829815526858e+06<br>
<br>
for each iteration. Sorry about my mathematical illerateness, but where can I see the condition number of the matrix?<br>
<br>
Thanks,<br>
Florian<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
><br>
><br>
>> On Aug 30, 2016, at 7:01 AM, Florian Lindner <<a href="mailto:mailinglists@xgm.de">mailinglists@xgm.de</a>> wrote:<br>
>><br>
>> Hello,<br>
>><br>
>> there is a FAQ and a Stackoverflow article about getting the condition number of a petsc matrix:<br>
>><br>
>> <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html#conditionnumber" rel="noreferrer" target="_blank">http://www.mcs.anl.gov/petsc/<wbr>documentation/faq.html#<wbr>conditionnumber</a><br>
>> <a href="http://scicomp.stackexchange.com/questions/34/how-can-i-estimate-the-condition-number-of-a-large-sparse-matrix-using-petsc" rel="noreferrer" target="_blank">http://scicomp.stackexchange.<wbr>com/questions/34/how-can-i-<wbr>estimate-the-condition-number-<wbr>of-a-large-sparse-matrix-<wbr>using-petsc</a><br>
>><br>
>> Both tell me to add:<br>
>><br>
>> -pc_type none -ksp_type gmres -ksp_monitor_singular_value -ksp_gmres_restart 1000<br>
>><br>
>> to my options.<br>
>><br>
>> I add the line to .petscrc but nothing happens, no additional output at all. I added -ksp_view, so my .petscrc looks<br>
>> like that:<br>
>><br>
>> -ksp_view<br>
>> -pc_type none -ksp_type gmres -ksp_monitor_singular_value -ksp_gmres_restart 1000<br>
>><br>
>> The complete output is below, but something I wonder about:<br>
>><br>
>> GMRES: restart=30, shouldn't that be 1000<br>
>><br>
>> And where can I read out the condition number approximation?<br>
>><br>
>> Thanks,<br>
>> Florian<br>
>><br>
>><br>
>> KSP Object: 1 MPI processes<br>
>>  type: gmres<br>
>>    GMRES: restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement<br>
>>    GMRES: happy breakdown tolerance 1e-30<br>
>>  maximum iterations=10000<br>
>>  tolerances:  relative=1e-09, absolute=1e-50, divergence=10000.<br>
>>  left preconditioning<br>
>>  using nonzero initial guess<br>
>>  using PRECONDITIONED norm type for convergence test<br>
>> PC Object: 1 MPI processes<br>
>>  type: none<br>
>>  linear system matrix = precond matrix:<br>
>>  Mat Object:  C   1 MPI processes<br>
>>    type: seqsbaij<br>
>>    rows=14403, cols=14403<br>
>>    total: nonzeros=1044787, allocated nonzeros=1123449<br>
>>    total number of mallocs used during MatSetValues calls =72016<br>
>>        block size is 1<br>
>> (0) 13:58:35 [precice::impl::<wbr>SolverInterfaceImpl]:395 in initialize: it 1 of 1 | dt# 1 | t 0 of 1 | dt 1 | max dt 1 |<br>
>> ongoing yes | dt complete no |<br>
>> (0) 13:58:35 [precice::impl::<wbr>SolverInterfaceImpl]:446 in advance: Iteration #1<br>
>> KSP Object: 1 MPI processes<br>
>>  type: gmres<br>
>>    GMRES: restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement<br>
>>    GMRES: happy breakdown tolerance 1e-30<br>
>>  maximum iterations=10000<br>
>>  tolerances:  relative=1e-09, absolute=1e-50, divergence=10000.<br>
>>  left preconditioning<br>
>>  using nonzero initial guess<br>
>>  using PRECONDITIONED norm type for convergence test<br>
>> PC Object: 1 MPI processes<br>
>>  type: none<br>
>>  linear system matrix = precond matrix:<br>
>>  Mat Object:  C   1 MPI processes<br>
>>    type: seqsbaij<br>
>>    rows=14403, cols=14403<br>
>>    total: nonzeros=1044787, allocated nonzeros=1123449<br>
>>    total number of mallocs used during MatSetValues calls =72016<br>
>>        block size is 1<br>
><br>
</div></div></blockquote></div><br></div>