[petsc-users] Matrix is missing diagonal entry

Satish Balay balay at mcs.anl.gov
Thu Sep 1 11:41:02 CDT 2011


Could be random memory corruption. perhaps you can valgrind the code
on a small problem [on smaller set of nodes] - with --download-mpich
build of petsc.

Satish

On Thu, 1 Sep 2011, Rongliang Chen wrote:

> Hi Jed and Andrew,
> 
> Thanks for your reply.
> 
> It's a little strange that this problem appears for some meshes and number
> of processors. When I run the code with 512 processors and the same mesh
> there is no such problem. And for some meshes, the code works well with any
> number of processors.
> 
> Best,
> Rongliang
> 
> 
> 
> > Message: 3
> > Date: Wed, 31 Aug 2011 21:34:00 -0500
> > From: Jed Brown <jedbrown at mcs.anl.gov>
> > Subject: Re: [petsc-users] Matrix is missing diagonal entry
> > To: PETSc users list <petsc-users at mcs.anl.gov>
> > Message-ID:
> >        <CAM9tzSk5+sAGk0fUQy_vB2vfBD_bR4YbRSxR8RZv3Li__YwyTA at mail.gmail.com
> > >
> > Content-Type: text/plain; charset="utf-8"
> >
> > Maybe a mistake implementing boundary conditions?
> >
> > ------------------------------
> >
> >
> > ------------------------------
> >
> > Message: 5
> > Date: Thu,  1 Sep 2011 08:36:23 -0600 (MDT)
> > From: Andrew T Barker <Andrew.Barker at Colorado.EDU>
> > Subject: Re: [petsc-users] Matrix is missing diagonal entry
> > To: "PETSc users list" <petsc-users at mcs.anl.gov>
> > Message-ID: <20110901083623.AKJ70453 at batman.int.colorado.edu>
> > Content-Type: text/plain; charset=us-ascii
> >
> > This has happened to me if I forget to call MatAssemblyBegin/End.  The
> > entry will still print out in the MatView(), but it won't compute.
> >
> > Might not be your problem, but worth a shot.
> >
> > ---- Original message ----
> > >Date: Wed, 31 Aug 2011 18:15:14 -0600
> > >From: petsc-users-bounces at mcs.anl.gov (on behalf of Rongliang Chen <
> > rongliang.chan at gmail.com>)
> > >Subject: [petsc-users] Matrix is missing diagonal entry
> > >To: PETSc Users mail list <petsc-users at mcs.anl.gov>
> > >
> > >   Hello,
> > >
> > >   I got the error message "Matrix is missing diagonal
> > >   entry 23548!" when I tried to run my code. I print
> > >   out the 23548th row and find that the 23548th
> > >   element of this row is one and the others are zero.
> > >   Can anyone tell me what's maybe the problem and how
> > >   to fix this? Thanks.
> > >
> > >   Best Regards,
> > >   Rongliang
> > >
> > >   /bin/bash: SHELL: readonly variable
> > >   /bin/bash: PATH: readonly variable
> > >   [255]PETSC ERROR: --------------------- Error
> > >   Message ------------------------------------
> > >   [255]PETSC ERROR: Object is in wrong state!
> > >   [255]PETSC ERROR: Matrix is missing diagonal entry
> > >   23548!
> > >   [255]PETSC ERROR:
> > >
> > ------------------------------------------------------------------------
> > >   [255]PETSC ERROR: Petsc Release Version 3.1.0, Patch
> > >   8, Thu Mar 17 13:37:48 CDT 2011
> > >   [255]PETSC ERROR: See docs/changes/index.html for
> > >   recent updates.
> > >   [255]PETSC ERROR: See docs/faq.html for hints about
> > >   trouble shooting.
> > >   [255]PETSC ERROR: See docs/index.html for manual
> > >   pages.
> > >   [255]PETSC ERROR:
> > >
> > ------------------------------------------------------------------------
> > >   [255]PETSC ERROR:
> > >   /home/rchen/soft/fixedmesh/Cannula/./joab on a
> > >   bgl-ibm-g named R02M1N0 by Unknown Wed Aug 31
> > >   17:36:32 2011
> > >   [255]PETSC ERROR: Libraries linked from
> > >   /home/rchen/soft/petsc-3.1-p8-nodebug/bgl-ibm-goto-O3_440d/lib
> > >
> > >   [255]PETSC ERROR:
> > >
> > ------------------------------------------------------------------------
> > >   [255]PETSC ERROR: MatILUFactorSymbolic_SeqAIJ_ilu0()
> > >   line 1627 in src/mat/impls/aij/seq/aijfact.c
> > >   [255]PETSC ERROR: MatILUFactorSymbolic_SeqAIJ() line
> > >   1731 in src/mat/impls/aij/seq/aijfact.c
> > >   [255]PETSC ERROR: MatILUFactorSymbolic() line 5464
> > >   in src/mat/interface/matrix.c
> > >   [255]PETSC ERROR: PCSetUp_ILU() line 204 in
> > >   src/ksp/pc/impls/factor/ilu/ilu.c
> > >   [255]PETSC ERROR: PCSetUp() line 795 in
> > >   src/ksp/pc/interface/precon.c
> > >   [255]PETSC ERROR: KSPSetUp() line 237 in
> > >   src/ksp/ksp/interface/itfunc.c
> > >   [255]PETSC ERROR: PCSetUpOnBlocks_ASM() line 335 in
> > >   src/ksp/pc/impls/asm/asm.c
> > >   [255]PETSC ERROR: PCSetUpOnBlocks() line 828 in
> > >   src/ksp/pc/interface/precon.c
> > >   [255]PETSC ERROR: KSPSetUpOnBlocks() line 159 in
> > >   src/ksp/ksp/interface/itfunc.c
> > >   [255]PETSC ERROR: KSPSolve() line 354 in
> > >   src/ksp/ksp/interface/itfunc.c
> > >   [255]PETSC ERROR: SNES_KSPSolve() line 2944 in
> > >   src/snes/interface/snes.c
> > >   [255]PETSC ERROR: SNESSolve() line 2255 in
> > >   src/snes/interface/snes.c
> > >   [255]PETSC ERROR: TimeStep() line 1462 in
> > >   /home/rlchen/rlchen/soft/fixedmesh/code_changed/joab.c
> > >   [255]PETSC ERROR: SolveSteadyState() line 1362 in
> > >   /home/rlchen/rlchen/soft/fixedmesh/code_changed/joab.c
> > >   [255]PETSC ERROR: ComputefixedBoundary() line 505 in
> > >   /home/rlchen/rlchen/soft/fixedmesh/code_changed/joab.c
> > >   [255]PETSC ERROR: JoabCtxSolve() line 165 in
> > >   /home/rlchen/rlchen/soft/fixedmesh/code_changed/joab.c
> > >   [255]PETSC ERROR: main() line 107 in
> > >   /home/rlchen/rlchen/soft/fixedmesh/code_changed/joab.c
> > >   .....................
> >
> >
> > ------------------------------
> >
> >
> 



More information about the petsc-users mailing list