[petsc-users] DMMG KSP Solve time with random initialization

Jed Brown jed at 59A2.org
Wed Apr 13 03:43:26 CDT 2011


On Wed, Apr 13, 2011 at 03:33, khalid ashraf <khalid_eee at yahoo.com> wrote:

> I use the DMMG to solve the Ax=b. At the initialization part, I either
> assign a predetermined value to the vectors or a random value as shown in
> the code below. With the same system size, and no of processors, the random
> initialization takes significantly more time than the predetermined value. I
> am attaching the laog summary in both cases. Could you please suggest why
> the time requirement is so huge (specially KSP Solve) in the random
> initialization and how I can improve it ?


The solve with constant initial state does zero iterations, the solve with
random initial state does not converge. You haven't explained what you are
solving or what calling sequence you are using, so I'm just going to take a
wild guess what's happening.

Your matrix is singular, probably because you didn't include boundary
conditions, and the right hand side vector is zero. The constant solution is
in the null space, therefore the residual is zero to begin with so no
iterations are ever done. The null space never gets projected out of the
random vector, therefore nothing ever converges and it takes a long time.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110413/8bfc9461/attachment.htm>


More information about the petsc-users mailing list