[petsc-users] PCSHELL does not support getting factor matrix

Sam Guo sam.guo at cd-adapco.com
Thu Nov 18 23:30:19 CST 2021


Dear PETSc dev team,
   I am implementing SLEPc interval option using shell matrix as follows:

EPSGetST(eps, &st);
STSetType(st, STSINVERT);
STGetKSP(st, &ksp);
KSPSetOperators(ksp, A, A);
KSPSetType(ksp, KSPPREONLY);
KSPGetPC(ksp, &pc);
KSPGetPC(ksp, &pc)
MatSetOption(A, MAT_SPD, PETSC_TRUE);
PCSetType(pc, PCSHELL);
PCShellSetContext(pc, &appCtx);
PCShellSetApply(pc, applyPreconditioner);
PetscObjectComposeFunction((PetscObject)pc,"PCFactorGetZeroPivot_C",PCFactorGetZeroPivot_C);

 When I run it, I get the following error.  Any idea what I did wrong?
Thanks a lot for your help.

[0]PETSC ERROR: No support for this operation for this object type
[0]PETSC ERROR: PC type does not support getting factor matrix
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for
trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.11.3, Jun, 26, 2019
[0]PETSC ERROR: Unknown Name on a arch-starccmplus_serial_real named
pl2usbvu0037pc.net.plm.eds.com by cd4hhv Thu Nov 18 21:11:45 2021
Number of iterations of the method: 0
[0]PETSC ERROR: Configure options --with-x=0 --with-fc=0 --with-debugging=1
--with-blaslapack-dir=/u/cd4hhv/dev2/mkl/2017.2-cda-001/linux/lib/intel64/../..
--with-mpi=0 -CFLAGS=-g -CXXFLAGS=-g --with-clean=1 --force
--with-scalar-type=real
[0]PETSC ERROR: #1 PCFactorGetMatrix() line 1332 in
../../../petsc/src/ksp/pc/interface/precon.c
[0]PETSC ERROR: #2 EPSSliceGetInertia() line 340 in
../../../slepc/src/eps/impls/krylov/krylovschur/ks-slice.c
[0]PETSC ERROR: #3 EPSSetUp_KrylovSchur_Slice() line 467 in
../../../slepc/src/eps/impls/krylov/krylovschur/ks-slice.c
[0]PETSC ERROR: #4 EPSSetUp_KrylovSchur() line 146 in
../../../slepc/src/eps/impls/krylov/krylovschur/krylovschur.c
[0]PETSC ERROR: #5 EPSSetUp() line 173 in
../../../slepc/src/eps/interface/epssetup.c
Solution method: krylovschur
[0]PETSC ERROR: #6 EPSSliceGetEPS() line 306 in
../../../slepc/src/eps/impls/krylov/krylovschur/ks-slice.c
[0]PETSC ERROR: #7 EPSSetUp_KrylovSchur_Slice() line 416 in
../../../slepc/src/eps/impls/krylov/krylovschur/ks-slice.c
[0]PETSC ERROR: #8 EPSSetUp_KrylovSchur() line 146 in
../../../slepc/src/eps/impls/krylov/krylovschur/krylovschur.c
[0]PETSC ERROR: #9 EPSSetUp() line 173 in
../../../slepc/src/eps/interface/epssetup.c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20211118/e47f4ce5/attachment-0001.html>


More information about the petsc-users mailing list