[petsc-users] [PATCH 2/2] Call KSPSetFromOptions before setting fieldsplit-specific options

Umut Tabak u.tabak at tudelft.nl
Sun Sep 8 08:42:58 CDT 2013


On 09/08/2013 03:38 PM, Dave May wrote:
> Remove the option
>    -fieldsplit_1_pc_type icc
> It is clobbering the LU option Matt suggested you try first ( 
> -fieldsplit_1_pc_type lu)
Dear Dave,

I also realized this but and changed that with

-fieldsplit_2_pc_type icc

but thanks for looking at that, need a break I guess ;-)
>
> When debigging such solvers, you should always run with -ksp_view to 
> check your solver is configured correctly.
Thanks for this
>
>
>
> On 8 September 2013 15:32, Umut Tabak <u.tabak at tudelft.nl 
> <mailto:u.tabak at tudelft.nl>> wrote:
>
>     On 09/08/2013 03:00 PM, Matthew Knepley wrote:
>>
>>
>>     If you want to solve hard systems, you must learn to debug a
>>     solver yourself. What does "just hangs" mean? Start with a full
>>     Schur complement factorization with LU on block 1 and a tiny
>>     tolerance on block 2. This will converge in 1 iterate. Then
>>     start slowly making the preconditioner weaker.
>     Hi Matt,
>
>     Thanks for the suggestion but I did not completely understand the
>     options to use for this, I am still learning the fieldsplit
>     interface. It was my mistake to not to give more in formation on
>     what 'Just hangs' means, sorry.
>
>     For the previous message: that meant extremely slow iterations,
>     the iteration process was not advancing at all.
>
>     After your reply and looking at the fieldsplit options a bit more,
>     I came up with these set of options, now iterations are going fast
>     but the decrease in relative residual is so slow. But apparently
>     this does not converge in 1 iteration, I am still mistaken at some
>     point.
>
>     ./ex3 -pc_type fieldsplit -pc_fieldsplit_type schur
>     -fieldsplit_1_pc_type lu -fieldsplit_1_ksp_type preonly
>     -fieldsplit_1_pc_type icc -fieldsplit_2_ksp_type minres
>     -fieldsplit_2_ksp_rtol 1e-8
>     -pc_fieldsplit_schur_factorization_type full
>     -ksp_monitor_true_residual
>
>     Maybe you can help me at this point again.
>
>     Thanks.
>     Umut
>
>
>>
>>        Matt
>>
>>         The system is a symmetric system in this case given as
>>
>>         A =
>>         A11 C
>>         C^T A22
>>
>>         C is of size 1490X2432
>>
>>         Could you please comment on this point for me, do I still
>>         have an error on the problem setup or on the usage of the
>>         options?
>>
>>         BR,
>>         Umut
>>
>>
>>              ISCreateBlock(PETSC_COMM_SELF,bs,n1,inputindices,PETSC_COPY_VALUES,&is_row1);
>>              ISCreateBlock(PETSC_COMM_SELF,bs,n2,inputindices,PETSC_COPY_VALUES,&is_row2);
>>
>>             We could check for this case, but it would require a
>>             little code and
>>             isn't currently done.  This is probably what you wanted:
>>
>>             diff --git i/ex2.c w/ex2.c
>>             index 94cea2c..0cce3e6 100644
>>             --- i/ex2.c
>>             +++ w/ex2.c
>>             @@ -45,7 +45,7 @@ int main(int argc,char **args)
>>                 PetscInt bs = 2, n1=1, n2=1, inputindices[]={0,1}; /*
>>             block size is 2 */
>>             ISCreateBlock(PETSC_COMM_SELF,bs,n1,inputindices,PETSC_COPY_VALUES,&is_row1);
>>             -
>>              ISCreateBlock(PETSC_COMM_SELF,bs,n2,inputindices,PETSC_COPY_VALUES,&is_row2);
>>             +
>>              ISCreateBlock(PETSC_COMM_SELF,bs,n2,inputindices+n1,PETSC_COPY_VALUES,&is_row2);
>>             ISView(is_row1,PETSC_VIEWER_STDOUT_SELF);
>>             ISView(is_row2,PETSC_VIEWER_STDOUT_SELF);
>>
>>
>>
>>
>>
>>     -- 
>>     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/20130908/104935f3/attachment.html>


More information about the petsc-users mailing list