[petsc-users] snes test fails
Dharmendar Reddy
dharmareddy84 at gmail.com
Wed Apr 17 19:19:17 CDT 2013
Hello,
Found the bug in my code. I forgot the call MatZeroEntries on the
Jacobin. I think the linear problem would make only one call to compute
jacobain and i was getting correct answer. But the test was making three
consecutive calls where it obviously was failing.
Thanks
Reddy
On Wed, Apr 17, 2013 at 5:36 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> Dharmendar Reddy <dharmareddy84 at gmail.com> writes:
>
> > Hello,
> > I am solving a one dimensional (linear) Poisson equation. I have
> > setup a snes problem using DM object. I am using Dirichlet boundary
> > conditons at both ends of the one dimensional domain. For the test case i
> > use the same value for potential at both ends.
> >
> > I am using DMplex object for the mesh and dof lay out.
> >
> > If i run the solver, i get a constant potential profile as expected.
> > However, If i run the solver with snes_type test
> > It is giving an error. what could i have done wrong ?
> > Testing hand-coded Jacobian, if the ratio is
> > O(1.e-8), the hand-coded Jacobian is probably correct.
> > Run with -snes_test_display to show difference
> > of hand-coded and finite difference Jacobian.
> > Norm of matrix ratio 1.0913e-10 difference 5.85042e-10 (user-defined
> state)
> > Norm of matrix ratio 0.5 difference 5.36098 (constant state -1.0)
> > Norm of matrix ratio 0.666667 difference 10.722 (constant state 1.0)
> > [0]PETSC ERROR: --------------------- Error Message
> > -----------------------------------
> > -
> > [0]PETSC ERROR: Object is in wrong state!
> > [0]PETSC ERROR: SNESTest aborts after Jacobian test!
>
> This is what '-snes_type test' is supposed to do. So you're fine and
> your Jacobian is fine at the initial state, but not at the constant
> value 1.0 or -1.0. (That's okay if those are non-physical states,
> otherwise your Jacobian evaluation is incorrect.)
>
> > [0]PETSC ERROR:
> > -----------------------------------------------------------------------
> > -
> > [0]PETSC ERROR: Petsc Development GIT revision:
> > e0030536e6573667cee5340eb367e8213e67d68
> > 9 GIT Date: 2013-04-16 21:48:15 -0500
> > [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: ./PoisTest on a mpi_rScalar_Debug named
> > login2.stampede.tacc.utexas.edu
> > by Reddy135 Wed Apr 17 17:22:02 2013
> > [0]PETSC ERROR: Libraries linked from
> > /home1/00924/Reddy135/LocalApps/petsc/mpi_rScalar
> > _Debug/lib
> > [0]PETSC ERROR: Configure run at Tue Apr 16 22:30:58 2013
> > [0]PETSC ERROR: Configure options --download-blacs=1
> --download-ctetgen=1
> > --download-
> > metis=1 --download-mumps=1 --download-parmetis=1 --download-scalapack=1
> > --download-supe
> > rlu_dist=1 --download-triangle=1 --download-umfpack=1
> > --with-blas-lapack-dir=/opt/apps/
> > intel/13/composer_xe_2013.2.146/mkl/lib/intel64/ --with-debugging=1
> > --with-mpi-dir=/opt
> > /apps/intel13/mvapich2/1.9/ --with-petsc-arch=mpi_rScalar_Debug
> > --with-petsc-dir=/home1
> > /00924/Reddy135/LocalApps/petsc PETSC_ARCH=mpi_rScalar_Debug
> > [0]PETSC ERROR:
> > -----------------------------------------------------------------------
> > -
> > [0]PETSC ERROR: SNESSolve_Test() line 127 in
> > /home1/00924/Reddy135/LocalApps/petsc/src/
> > snes/impls/test/snestest.c
> > [0]PETSC ERROR: SNESSolve() line 3755 in
> > /home1/00924/Reddy135/LocalApps/petsc/src/snes
> > /interface/snes.c
> > SNESDivergedReason 0
> > Exiting solve
> > --
> > -----------------------------------------------------
> > Dharmendar Reddy Palle
> > Graduate Student
> > Microelectronics Research center,
> > University of Texas at Austin,
> > 10100 Burnet Road, Bldg. 160
> > MER 2.608F, TX 78758-4445
> > e-mail: dharmareddy84 at gmail.com
> > Phone: +1-512-350-9082
> > United States of America.
> > Homepage: https://webspace.utexas.edu/~dpr342
>
--
-----------------------------------------------------
Dharmendar Reddy Palle
Graduate Student
Microelectronics Research center,
University of Texas at Austin,
10100 Burnet Road, Bldg. 160
MER 2.608F, TX 78758-4445
e-mail: dharmareddy84 at gmail.com
Phone: +1-512-350-9082
United States of America.
Homepage: https://webspace.utexas.edu/~dpr342
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130417/009bffdf/attachment.html>
More information about the petsc-users
mailing list