[petsc-users] Must call MatXXXSetPreallocation() or MatSetUp() on argument 1 "mat" before MatGetFactorAvailable()

Mehrzad Samadi mehrzads at umich.edu
Wed Jul 15 10:36:34 CDT 2015


Hello everyone,

I'm really new to Petsc and when I try to run
ksp/ksp/examples/tutorials/ex27

I get this error

[0]PETSC ERROR: Object is in wrong state
[0]PETSC ERROR: Must call MatXXXSetPreallocation() or MatSetUp() on
argument 1 "mat" before MatGetFactorAvailable()
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for
trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.6.0, unknown
[0]PETSC ERROR: ./ex27 on a arch-linux2-cxx-debug named scourge by mehrzads
Wed Jul 15 11:27:48 2015
[0]PETSC ERROR: Configure options --with-mpi=1 --prefix=/opt/petsc
--with-clanguage=cxx
[0]PETSC ERROR: #1 MatGetFactorAvailable() line 4199 in /../matrix.c
[0]PETSC ERROR: #2 PCGetDefaultType_Private() line 27 in /../precon.c
[0]PETSC ERROR: #3 PCSetFromOptions() line 159 in /../pcset.c
[0]PETSC ERROR: #4 KSPSetFromOptions() line 358 in /../itcl.c


Can you help me identify the problem?

Best,
Mehrzad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150715/1604012d/attachment.html>


More information about the petsc-users mailing list