any suggestions? cheers
ando Andreas Grassl schrieb: > Barry Smith schrieb: >> Use MatCreateIS() to create the matrix. Use MatSetValuesLocal() to put >> the values in the matrix >> then use PCSetType(pc,PCNN); to set the preconditioner to NN. >> > > I followed your advice, but still run into problems. > > my sourcecode: > > ierr = KSPCreate(comm,&solver);CHKERRQ(ierr); > ierr = KSPSetOperators(solver,A,A,DIFFERENT_NONZERO_PATTERN);CHKERRQ(ierr); > ierr = KSPSetInitialGuessNonzero(solver,PETSC_TRUE);CHKERRQ(ierr); > ierr = KSPGetPC(solver,&prec);CHKERRQ(ierr); > ierr = PCSetType(prec,PCNN);CHKERRQ(ierr); > //ierr = PCFactorSetShiftPd(prec,PETSC_TRUE);CHKERRQ(ierr); > ierr = KSPSetUp(solver);CHKERRQ(ierr); > ierr = KSPSolve(solver,B,X);CHKERRQ(ierr); > > and the error message: > > [0]PETSC ERROR: --------------------- Error Message > ------------------------------------ > [0]PETSC ERROR: Detected zero pivot in LU factorization > see > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#ZeroPivot! > [0]PETSC ERROR: Zero pivot row 801 value 2.78624e-13 tolerance > 4.28598e-12 * rowsum 4.28598! > [0]PETSC ERROR: > ------------------------------------------------------------------------ > [0]PETSC ERROR: Petsc Release Version 3.0.0, Patch 3, Fri Jan 30 > 17:55:56 CST 2009 > [0]PETSC ERROR: See docs/changes/index.html for recent updates. > [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > [0]PETSC ERROR: See docs/index.html for manual pages. > [0]PETSC ERROR: > ------------------------------------------------------------------------ > [0]PETSC ERROR: Unknown Name on a linux64-g named mat1.uibk.ac.at by > csae1801 Fri Feb 27 10:12:34 2009 > [0]PETSC ERROR: Libraries linked from > /home/lux/csae1801/petsc/petsc-3.0.0-p3/linux64-gnu-c-debug/lib > [0]PETSC ERROR: Configure run at Wed Feb 18 10:30:58 2009 > [0]PETSC ERROR: Configure options --with-64-bit-indices > --with-scalar-type=real --with-precision=double --with-cc=icc > --with-fc=ifort --with-cxx=icpc --with-shared=0 --with-mpi=1 > --download-mpich=ifneeded --with-scalapack=1 > --download-scalapack=ifneeded --download-f-blas-lapack=yes > --with-blacs=1 --download-blacs=yes PETSC_ARCH=linux64-gnu-c-debug > [0]PETSC ERROR: > ------------------------------------------------------------------------ > [0]PETSC ERROR: MatLUFactorNumeric_Inode() line 1335 in > src/mat/impls/aij/seq/inode.c > [0]PETSC ERROR: MatLUFactorNumeric() line 2338 in src/mat/interface/matrix.c > [0]PETSC ERROR: PCSetUp_LU() line 222 in src/ksp/pc/impls/factor/lu/lu.c > [0]PETSC ERROR: PCSetUp() line 794 in src/ksp/pc/interface/precon.c > [0]PETSC ERROR: KSPSetUp() line 237 in src/ksp/ksp/interface/itfunc.c > [0]PETSC ERROR: PCISSetUp() line 137 in src/ksp/pc/impls/is/pcis.c > [0]PETSC ERROR: PCSetUp_NN() line 28 in src/ksp/pc/impls/is/nn/nn.c > [0]PETSC ERROR: PCSetUp() line 794 in src/ksp/pc/interface/precon.c > [0]PETSC ERROR: KSPSetUp() line 237 in src/ksp/ksp/interface/itfunc.c > [0]PETSC ERROR: User provided function() line 1274 in petscsolver.c > > > Running PCFactorSetShift doesn't affect the output. > > any ideas? > > cheers > > ando > -- /"\ \ / ASCII Ribbon X against HTML email / \ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 315 bytes Desc: OpenPGP digital signature URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090303/3c383a2d/attachment.pgp>
