On Mon, Aug 11, 2014 at 2:53 PM, Alexander Grayver <[email protected]> wrote:
> Dear PETSc devs, > > I am getting the following error with petsc-3.5.1: > > [0]PETSC ERROR: --------------------- Error Message > -------------------------------------------------------------- > [0]PETSC ERROR: Null argument, when expecting valid pointer > [0]PETSC ERROR: Null Object: Parameter # 1 > [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html > for trouble shooting. > [0]PETSC ERROR: Petsc Release Version 3.5.1, Jul, 24, 2014 > [0]PETSC ERROR: /build/main on a openmpi-gcc-double-debug-c-shared named > e1334 by ag Mon Aug 11 18:42:07 2014 > [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 > [0]PETSC ERROR: #1 PetscObjectStateGet() line 38 in > /lib/petsc-3.5.1/src/sys/objects/state.c > [0]PETSC ERROR: #2 PCSetUp() line 875 in > /lib/petsc-3.5.1/src/ksp/pc/interface/precon.c > [0]PETSC ERROR: #3 KSPSetUp() line 305 in > /lib/petsc-3.5.1/src/ksp/ksp/interface/itfunc.c > [0]PETSC ERROR: #4 KSPSolve() line 417 in > /lib/petsc-3.5.1/src/ksp/ksp/interface/itfunc.c > > I have used LSQR here which was setup in the following way: > > KSPCreate(communicator, &ksp); > KSPSetType(ksp, KSPLSQR); > KSPSetTolerances(ksp, tol, PETSC_DEFAULT, PETSC_DEFAULT, max_iterations); > KSPSetFromOptions(ksp); > KSPGetPC(ksp, &pc); > PCSetType(pc, PCNONE); > KSPSetOperators(ksp, A, PETSC_NULL); > You want 'A' instead of 'PETSC_NULL' above. We just had no check before. Thanks, Matt > KSPSolve(ksp, b, x); > > The code works fine with petsc-3.4.4 (provided that I pass > DIFFERENT_NONZERO_PATTERN to the KSPSetFromOptions). Any idea? > > Regards, > Alexander > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener
