[petsc-users] ex12 poisson solver

Barry Smith bsmith at mcs.anl.gov
Tue Oct 10 04:09:51 CDT 2017


> On Oct 9, 2017, at 6:56 PM, Matthew Knepley <knepley at gmail.com> wrote:
> 
> On Mon, Oct 9, 2017 at 12:40 PM, Justin Chang <jychang48 at gmail.com> wrote:
> You need this additional command line argument: -petscspace_order 1
> 
> Justin is correct. By default, it is P0, which would be a purely discontinuous solution to Laplace, without
> jump terms.

   Pretty bad default. Maybe better to have P1 be the default.
> 
>   Thanks,
> 
>     Matt
>  
> On Mon, Oct 9, 2017 at 9:02 AM, David Fuentes <fuentesdt at gmail.com> wrote:
> 
> Hi,
> 
> I'm trying to use petsc 3.8.0 with ex12.c example to setup a poisson solver: http://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials/ex12.c.html
> 
> I seem to be getting zeros in my jacobian with this example? 
> I attached a debugger and the assembly routines seems ok... but am getting zero jacobian somewhere along the way to the MatAssembly...
> Am I missing something with the command line arguments ?
> 
> 
> 
> $ ./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
> --------------------------------------------------------------------------
> [[55310,1],0]: A high-performance Open MPI point-to-point messaging module
> was unable to find any relevant network interfaces:
> 
> Module: OpenFabrics (openib)
>   Host: SCRGP2
> 
> Another transport will be used instead, although this may result in
> lower performance.
> --------------------------------------------------------------------------
> [0] MatAssemblyEnd_SeqAIJ(): Matrix size: 8 X 8; storage space: 0 unneeded,8 used
> [0] MatAssemblyEnd_SeqAIJ(): Number of mallocs during MatSetValues() is 0
> [0] MatAssemblyEnd_SeqAIJ(): Maximum nonzeros in any row is 1
> [0] MatCheckCompressedRow(): Found the ratio (num_zerorows 0)/(num_localrows 8) < 0.6. Do not use CompressedRow routines.
> [0] MatSeqAIJCheckInode(): Found 8 nodes out of 8 rows. Not using Inode routines
> [0] DMGetDMSNES(): Creating new DMSNES
> [0] DMGetDMKSP(): Creating new DMKSP
>   0 SNES Function norm 1.414213562373e+00 
> [0] MatAssemblyEnd_SeqAIJ(): Matrix size: 8 X 8; storage space: 0 unneeded,8 used
> [0] MatAssemblyEnd_SeqAIJ(): Number of mallocs during MatSetValues() is 0
> [0] MatAssemblyEnd_SeqAIJ(): Maximum nonzeros in any row is 1
> [0] MatCheckCompressedRow(): Found the ratio (num_zerorows 0)/(num_localrows 8) < 0.6. Do not use CompressedRow routines.
> [0] SNESComputeJacobian(): Rebuilding preconditioner
>     0 KSP Residual norm 1.414213562373e+00 
>     1 KSP Residual norm 1.414213562373e+00 
> [0] KSPGMRESBuildSoln(): Likely your matrix or preconditioner is singular. HH(it,it) is identically zero; it = 0 GRS(it) = 1.41421
>   Linear solve did not converge due to DIVERGED_BREAKDOWN iterations 1
> [0] SNESSolve_KSPONLY(): iter=0, number linear solve failures 1 greater than current SNES allowed, stopping solve
> Nonlinear solve did not converge due to DIVERGED_LINEAR_SOLVE iterations 0
> Number of SNES iterations = 0
> L_2 Error: 0.751285
> 
> 
> 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   
> 
> 
> thanks!
> David
> 
> 
> 
> 
> 
> 
> -- 
> 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
> 
> https://www.cse.buffalo.edu/~knepley/



More information about the petsc-users mailing list