So left preconditioning converges fine, the true residual gets as small as 
one could expect. Right preconditioning fails completely; I have no explanation 
for this, could be a bug in the PETSc implementation for right preconditioning 
with this method. 

  What do you get with -ksp_type bcgs both left and right preconditioning?

  Barry


> On Dec 7, 2021, at 4:25 PM, Fischer, Greg A. <[email protected]> 
> wrote:
> 
> I’ve attached typical examples of “A” and “b”. Do these qualify as large 
> values?
> 
> The two runs are with and without “-ksp_pc_side right”.
>  
> From: Barry Smith <[email protected] <mailto:[email protected]>> 
> Sent: Tuesday, December 7, 2021 3:44 PM
> To: Fischer, Greg A. <[email protected] 
> <mailto:[email protected]>>
> Cc: Fischer, Greg A. via petsc-users <[email protected] 
> <mailto:[email protected]>>
> Subject: Re: [petsc-users] KSPBuildResidual and KSPType compatibility
>  
> [External Email]
>  
> When the preconditioned and non-preconditioner residual norms as so hugely 
> different this usually indicates something is badly scaled or something "bad" 
> is happening within the preconditioner. 
>  
> 0 KSP preconditioned resid norm 2.434689662304e-01 true resid norm 
> 1.413757649058e+09 ||r(i)||/||b|| 1.442188243865e-04
> ....
> 19 KSP preconditioned resid norm 4.505576228085e-15 true resid norm 
> 1.810377537457e-02 ||r(i)||/||b|| 1.846784138157e-15
>  
> notice that at the end the true residual is not particularly small. Is your b 
> really big and does the matrix have really large values in it?
>  
> What are the two runs? Left and right preconditioning with ibcgs or something 
> else?
>  
>  
> On Dec 7, 2021, at 12:44 PM, Fischer, Greg A. <[email protected] 
> <mailto:[email protected]>> wrote:
>  
> Attached are outputs with these options. 
>  
> What should I make of these? 
>  
> From: Barry Smith <[email protected] <mailto:[email protected]>> 
> Sent: Monday, December 6, 2021 2:16 PM
> To: Fischer, Greg A. via petsc-users <[email protected] 
> <mailto:[email protected]>>
> Cc: Fischer, Greg A. <[email protected] 
> <mailto:[email protected]>>
> Subject: Re: [petsc-users] KSPBuildResidual and KSPType compatibility
>  
> [External Email]
>  
> What do you get for -ksp_type ibcgs -ksp_monitor -ksp_monitor_true_residual
>  
> with and without  -ksp_pc_side right ?
>  
> 
> 
> 
> On Dec 6, 2021, at 12:00 PM, Jed Brown <[email protected] 
> <mailto:[email protected]>> wrote:
>  
> "Fischer, Greg A. via petsc-users" <[email protected] 
> <mailto:[email protected]>> writes:
> 
> 
> 
> Hello petsc-users,
> 
> I would like to check convergence against the infinity norm, so I defined my 
> own convergence test routine with KSPSetConvergenceTest. (I understand that 
> it may be computationally expensive.)
> 
> I would like to do this with the "ibcgs" method. When I use KSPBuildResidual 
> and calculate the NORM_2 against the output vector, I get a value that 
> differs from the 2-norm that gets passed into the convergence test function. 
> However, when I switch to the "gcr" method, the value I calculate matches the 
> function input value.
> 
> IBCGS uses the preconditioned norm by default while GCR uses the 
> unpreconditioned norm. You can use -ksp_norm_type unpreconditioned or 
> KSPSetNormType() to make IBCGS use unpreconditioned.
> 
> 
> 
> Is the KSPBuildResidual function only compatible with a subset of the KSPType 
> methods? If I want to evaluate convergence against the infinity norm, do I 
> need to set KSPSetInitialGuessNonzero and continually re-start the solver 
> with a lower tolerance values until I get a satisfactory value of the 
> infinity norm?
> 
> Thanks,
> Greg
> 
> 
> ________________________________
> 
> This e-mail may contain proprietary information of the sending organization. 
> Any unauthorized or improper disclosure, copying, distribution, or use of the 
> contents of this e-mail and attached document(s) is prohibited. The 
> information contained in this e-mail and attached document(s) is intended 
> only for the personal and private use of the recipient(s) named above. If you 
> have received this communication in error, please notify the sender 
> immediately by email and delete the original e-mail and attached document(s).
>  
>  
> 
> This e-mail may contain proprietary information of the sending organization. 
> Any unauthorized or improper disclosure, copying, distribution, or use of the 
> contents of this e-mail and attached document(s) is prohibited. The 
> information contained in this e-mail and attached document(s) is intended 
> only for the personal and private use of the recipient(s) named above. If you 
> have received this communication in error, please notify the sender 
> immediately by email and delete the original e-mail and attached document(s).
> <ksp-monitor_output.txt><ksp-monitor_output-pc_side_right.txt>
>  
> 
> 
> This e-mail may contain proprietary information of the sending organization. 
> Any unauthorized or improper disclosure, copying, distribution, or use of the 
> contents of this e-mail and attached document(s) is prohibited. The 
> information contained in this e-mail and attached document(s) is intended 
> only for the personal and private use of the recipient(s) named above. If you 
> have received this communication in error, please notify the sender 
> immediately by email and delete the original e-mail and attached document(s).
> <typ_A.txt><typ_b.txt>

Reply via email to