<div dir="ltr">Hello everyone,<div><br></div><div>I'm really new to Petsc and when I try to run ksp/ksp/examples/tutorials/ex27</div><div><br></div><div>I get this error</div><div><br></div><div><div>[0]PETSC ERROR: Object is in wrong state</div><div>[0]PETSC ERROR: Must call MatXXXSetPreallocation() or MatSetUp() on argument 1 "mat" before MatGetFactorAvailable()</div><div>[0]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.</div><div>[0]PETSC ERROR: Petsc Release Version 3.6.0, unknown </div><div>[0]PETSC ERROR: ./ex27 on a arch-linux2-cxx-debug named scourge by mehrzads Wed Jul 15 11:27:48 2015</div><div>[0]PETSC ERROR: Configure options --with-mpi=1 --prefix=/opt/petsc --with-clanguage=cxx</div><div>[0]PETSC ERROR: #1 MatGetFactorAvailable() line 4199 in /../matrix.c</div><div>[0]PETSC ERROR: #2 PCGetDefaultType_Private() line 27 in /../precon.c</div><div>[0]PETSC ERROR: #3 PCSetFromOptions() line 159 in /../pcset.c</div><div>[0]PETSC ERROR: #4 KSPSetFromOptions() line 358 in /../itcl.c</div></div><div><br></div><div><br></div><div>Can you help me identify the problem?</div><div><br></div><div>Best,</div><div>Mehrzad</div></div>