<div dir="ltr"><div><div><br></div>Hi,<br><br></div>I'm trying to use petsc 3.8.0 with ex12.c example to setup a poisson solver: <a href="http://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials/ex12.c.html">http://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials/ex12.c.html</a><br><div><div><br></div><div>I seem to be getting zeros in my jacobian with this example? <br>I attached a debugger and the assembly routines seems ok... but am getting zero jacobian somewhere along the way to the MatAssembly...<br>Am I missing something with the command line arguments ?<br><br><br></div><div><br>$ ./ex12 -snes_type ksponly  -snes_monitor -snes_converged_reason -ksp_converged_reason -ksp_monitor -ksp_rtol 1.e-6 -pc_type jacobi -info -info_exclude null,pc,vec<br>--------------------------------------------------------------------------<br>[[55310,1],0]: A high-performance Open MPI point-to-point messaging module<br>was unable to find any relevant network interfaces:<br><br>Module: OpenFabrics (openib)<br>  Host: SCRGP2<br><br>Another transport will be used instead, although this may result in<br>lower performance.<br>--------------------------------------------------------------------------<br>[0] MatAssemblyEnd_SeqAIJ(): Matrix size: 8 X 8; storage space: 0 unneeded,8 used<br>[0] MatAssemblyEnd_SeqAIJ(): Number of mallocs during MatSetValues() is 0<br>[0] MatAssemblyEnd_SeqAIJ(): Maximum nonzeros in any row is 1<br>[0] MatCheckCompressedRow(): Found the ratio (num_zerorows 0)/(num_localrows 8) < 0.6. Do not use CompressedRow routines.<br>[0] MatSeqAIJCheckInode(): Found 8 nodes out of 8 rows. Not using Inode routines<br>[0] DMGetDMSNES(): Creating new DMSNES<br>[0] DMGetDMKSP(): Creating new DMKSP<br>  0 SNES Function norm 1.414213562373e+00 <br>[0] MatAssemblyEnd_SeqAIJ(): Matrix size: 8 X 8; storage space: 0 unneeded,8 used<br>[0] MatAssemblyEnd_SeqAIJ(): Number of mallocs during MatSetValues() is 0<br>[0] MatAssemblyEnd_SeqAIJ(): Maximum nonzeros in any row is 1<br>[0] MatCheckCompressedRow(): Found the ratio (num_zerorows 0)/(num_localrows 8) < 0.6. Do not use CompressedRow routines.<br>[0] SNESComputeJacobian(): Rebuilding preconditioner<br>    0 KSP Residual norm 1.414213562373e+00 <br>    1 KSP Residual norm 1.414213562373e+00 <br>[0] KSPGMRESBuildSoln(): Likely your matrix or preconditioner is singular. HH(it,it) is identically zero; it = 0 GRS(it) = 1.41421<br>  Linear solve did not converge due to DIVERGED_BREAKDOWN iterations 1<br>[0] SNESSolve_KSPONLY(): iter=0, number linear solve failures 1 greater than current SNES allowed, stopping solve<br>Nonlinear solve did not converge due to DIVERGED_LINEAR_SOLVE iterations 0<br>Number of SNES iterations = 0<br>L_2 Error: 0.751285<br><br><br></div><div>configured with: ./config/configure.py --with-shared-libraries --with-clanguage=c++ --CFLAGS='-g -O0' --CXXFLAGS='-g -O0' --download-ctetgen  --download-triangle --with-debugging=yes --with-exodusii-lib=[/usr/lib/x86_64-linux-gnu/libexoIIv2.so] --with-netcdf-lib=[/usr/lib/libnetcdf.so] --with-netcdf-include=/usr/include --with-hdf5-include=/usr/include/hdf5/serial/ --with-hdf5-lib=[/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so] --with-c2html=0 --with-exodusii-include=/usr/include   <br></div><div><br><br></div><div>thanks!<br></div><div>David<br></div><div><br><br></div></div></div>