[petsc-users] MatCreateSchurComplement

Jed Brown jedbrown at mcs.anl.gov
Tue Oct 1 14:45:51 CDT 2013


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, 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(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131001/3bda2bc3/attachment.pgp>


More information about the petsc-users mailing list