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