<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Aug 11, 2014 at 2:53 PM, Alexander Grayver <span dir="ltr"><<a href="mailto:agrayver@gfz-potsdam.de" target="_blank">agrayver@gfz-potsdam.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font:10pt arial,helvetica,sans-serif">Dear PETSc devs,<br><br>I am getting the following error with
petsc-3.5.1:<br><br>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>[0]PETSC
ERROR: Null argument, when expecting valid pointer<br>[0]PETSC ERROR: Null Object: Parameter # 1<br>[0]PETSC ERROR: See
<a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.<br>[0]PETSC ERROR: Petsc Release Version 3.5.1, Jul, 24, 2014<br>
[0]PETSC
ERROR: /build/main on a openmpi-gcc-double-debug-c-shared named e1334 by ag Mon Aug 11 18:42:07 2014<br>[0]PETSC ERROR: Configure options
--with-petsc-arch=openmpi-gcc-double-debug-c-shared --with-x=0 --download-mumps --download-metis --download-scalapack --download-blacs
--with-scalar-type=real --download-blas-lapack --with-precision=double --download-parmetis --with-shared-libraries=1 --with-debugging=1
--with-hypre-dir=/lib/hypre-2.9.1a --download-fblaslapack=1<br>[0]PETSC ERROR: #1 PetscObjectStateGet() line 38 in
/lib/petsc-3.5.1/src/sys/objects/state.c<br>[0]PETSC ERROR: #2 PCSetUp() line 875 in /lib/petsc-3.5.1/src/ksp/pc/interface/precon.c<br>[0]PETSC ERROR:
#3 KSPSetUp() line 305 in /lib/petsc-3.5.1/src/ksp/ksp/interface/itfunc.c<br>[0]PETSC ERROR: #4 KSPSolve() line 417 in
/lib/petsc-3.5.1/src/ksp/ksp/interface/itfunc.c<br><br>I have used LSQR here which was setup in the following way:<br><br> 
KSPCreate(communicator, &ksp);<br>  KSPSetType(ksp, KSPLSQR);<br>  KSPSetTolerances(ksp, tol, PETSC_DEFAULT, PETSC_DEFAULT,
max_iterations);<br>  KSPSetFromOptions(ksp);<br>  KSPGetPC(ksp, &pc);<br>  PCSetType(pc, PCNONE);<br>  KSPSetOperators(ksp,
A, PETSC_NULL);<br></div></blockquote><div><br></div><div>You want 'A' instead of 'PETSC_NULL' above. We just had no check before.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font:10pt arial,helvetica,sans-serif">  KSPSolve(ksp, b, x);<br><br>The code works fine with petsc-3.4.4 (provided that I pass DIFFERENT_NONZERO_PATTERN to the
KSPSetFromOptions). Any idea?<br><br>Regards,<br>Alexander<br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener
</div></div>