[petsc-users] MatCreateSchurComplement

Anton Popov popov at uni-mainz.de
Tue Oct 1 15:36:40 CDT 2013


On 10/1/13 9:45 PM, Jed Brown wrote:
> Anton Popov <popov at uni-mainz.de> writes:
>
>> Dear all,
>>
>> I guess MatCreateSchurComplement is somehow broken in PETSc 3.4.2
> You can fix it by calling KSPMatRegisterAll() before
> MatCreateSchurComplement,
Thanks, Jed. It solves the problem.
>   and the issue is now fixed in 'maint' (it was
> accidentally only fixed in 'master').
>
> This problem came from simplifying dynamic loading and when the
> backward-dependency was removed, we still considered KSPMatRegisterAll
> to be collective on PETSC_COMM_WORLD, so it couldn't safely be called by
> MatCreateSchurComplement.  Looks like you are the "rare" case below.
>
>
> commit f550243c612070fecd53ff91e1d8ee65a2c6e25c
> Author: Jed Brown <jed at 59A2.org>
> Date:   Wed Oct 17 16:16:08 2012 -0500
>
>      Add KSPMatRegisterAll() to avoid dependency of libpetscmat on libpetscksp
>      
>      Register MATSCHURCOMPLEMENT there. User should explicitly call
>      KSPMatRegisterAll() or KSPInitializePackage() if they want to make a
>      MATSCHURCOMPLEMENT before calling KSPCreate. Such a use case should be
>      very rare.
>      
>      Hg-commit: 3c58006af47185551c8aeaf6e1c32e68b79916fb
>
>   include/petscksp.h                 |  1 +
>   src/ksp/ksp/interface/dlregisksp.c |  2 ++
>   src/ksp/ksp/utils/schurm.c         | 25 +++++++++++++++++++++++++
>   src/mat/interface/matregis.c       |  2 --
>   4 files changed, 28 insertions(+), 2 deletions(-)



More information about the petsc-users mailing list