[petsc-users] Really Really Really Weird SNES behaviour

subramanya sadasiva potaman at outlook.com
Sun Jul 14 10:58:49 CDT 2013


Hi Matt, 
Thanks for the reply, Closer inspection showed the presence of a few large (10^300) values in the initial condition vector while running in debug mode. Subramanya 

Date: Sun, 14 Jul 2013 05:51:12 -0500
Subject: Re: [petsc-users] Really Really Really Weird SNES behaviour
From: knepley at gmail.com
To: potaman at outlook.com
CC: libmesh-users at lists.sourceforge.net; petsc-users at mcs.anl.gov

On Sun, Jul 14, 2013 at 12:17 AM, subramanya sadasiva <potaman at outlook.com> wrote:




Hi, I am observing some really really really weird SNES behavior in my SNESVI code called through Libmesh. This behaviour appeared after I changed some initial conditions and only happens in an optimized build. I am running this code on a Macbook pro running os x 10.8.. 

When the debug code is run, the residuals computed for the initial conditions provided give norms which are of the expected magnitude.. so the SNES_Monitor output is, 
solving the cahn hilliard time step
  0 SNES Function norm 8.223262421671e-01  1 SNES Function norm 3.793806858333e-03Nonlinear solve did not converge due to DIVERGED_MAX_IT iterations 1
The output from SNES_Monitor with the optimized code on the other hand is, 

solving the cahn hilliard time step  0 SNES Function norm 5.153882032022e+19  1 SNES Function norm 1.446612980133e+19Nonlinear solve did not converge due to DIVERGED_MAX_IT iterations 1


Absolutely nothing else has changed in the code except that one code is built with a debugging and one with an optimized version of the code. 
Any ideas?

This sound like an uninitialized variable in your residual evaluation routine. Very often, debugging codewill initialize variables to 0, whereas optimized leaves them alone.

   Matt Subramanya
 		 	   		  


-- 
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
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130714/489dfb2d/attachment.html>


More information about the petsc-users mailing list