Re: What can cause NaN during Conjugate-Gradient iteration (ITL)

"Shaun Lademora" <[email protected]> Sun, 9 Apr 2006 13:29:57 -0500
Newsgroups gmane.comp.lib.mtl.devel
Message-ID <[email protected]>
I have verified that the diagonal elements are positive.

Also, the way I am constructing my matrix, the off-diagonal elements are
negative and:

A(i,j) = A(j,i) <= 0

Is this proper construction to use incomplete Cholesky preconditioner?

I am using (double) as the data type.  Are there any round off errors that I
should be aware of?

Also, you suggest not using a preconditioner.  How do I call cg without that
step?

Thanks,
Shaun



From: Andrew Lumsdaine <[email protected]>
> To: "General Matrix Template Library \(MTL\) list" <[email protected]>
> Date: Sat, 8 Apr 2006 22:58:25 -0400
> Subject: Re: MTL: What can cause NaN during Conjugate-Gradient iteration
> (ITL)
> Just a guess would be that something is going wrong with the
> preconditioner.  Try the same matrix without a preconditioner and see
> if it still fails.
>
> Cholesky factorization will fail if the matrix is not positive-
> definite -- e.g., you may be trying to take the square root of a
> negative number in the pivot -- or you may have a zero on the
> diagonal.  Check your matrix to make sure it is well-defined for
> (incomplete) Cholesky factorization.
>
>
> On Apr 8, 2006, at 10:26 PM, Shaun Lademora wrote:
>
> > I am seeing NaN as a result after iteration 0 when doing cg.
> >
> > I am using the modified_cholesky preconditioner on my input matrix
> > A before calling cg.
> > What are potential causes of a NaN result?
> >
> > Thanks,
> > Shaun
> >
> > _______________________________________________
> > This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/
>
>
>
>
> _______________________________________________
> This list is archived at http://www.lsc.nd.edu/MailArchives/mtl-devel/
>
>

_______________________________________________
This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/