[petsc-users] PCApplySymmetricRight for PCBJACOBI (fwd)

Barry Smith bsmith at petsc.dev
Sun Sep 25 09:55:48 CDT 2022


  Thanks for the bug report; your fix is correct. I have corrected it in PETSc and also added support for multiple block per MPI rank in  https://gitlab.com/petsc/petsc/-/merge_requests/5678 <https://gitlab.com/petsc/petsc/-/merge_requests/5678>

  Barry


> 
> 
> ---------- Forwarded message ----------
> Date: Thu, 22 Sep 2022 02:31:37 +0300
> From: Abylay Zhumekenov <ablay94z at gmail.com>
> To: petsc-users at mcs.anl.gov
> Subject: [petsc-users] PCApplySymmetricRight for PCBJACOBI
> 
> Hello,
> 
> I have been playing around with a block Jacobi preconditioner (PCJACOBI)
> with an incomplete Cholesky (PCICC) sub-preconditioner. Although you cannot
> set KSPSetPCSide to PC_SYMMETRIC for PCBJACOBI, you still can do it for
> PCICC. I was surprised to find that PCApplySymmetricLeft is properly
> applied to a vector. However, PCApplySymmetricRight throws an error:
> ...
>    [0]PETSC ERROR: Object is in wrong state
>    [0]PETSC ERROR: VecPlaceArray() was already called on this vector,
> without a call to VecResetArray()
>    ...
>    [0]PETSC ERROR: #3 PCApplySymmetricLeft_BJacobi_Singleblock() at
> /home/abylay/KAUST/Libraries/C/petsc/src/ksp/pc/impls/bjacobi/bjacobi.c:660
>    [0]PETSC ERROR: #4 PCApplySymmetricLeft() at
> /home/abylay/KAUST/Libraries/C/petsc/src/ksp/pc/interface/precon.c:532
> ...
> The problem goes away if I add:
> ...
>    PetscCall(VecResetArray(bjac->x));
>    PetscCall(VecResetArray(bjac->y));
> ...
> at line 698 in source file bjacobi.c. I don't know if it is a bug, and how
> I should report it, just wanted let someone know if it is.
> Thanks.
> 
> Abylay Zhumekenov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220925/96dc1738/attachment.html>


More information about the petsc-users mailing list