KSPSetTolerances and processors size

Matthew Knepley knepley at gmail.com
Sat Jun 16 10:18:52 CDT 2007


I assume you are setting a relative tolerance. This is just a vector norm so
it will increase with dimension, and therefore the absolute difference will tend
to increase. You can set an absolute tolerance as well if this is what you want.

  Matt

On 6/16/07, Ben Tay <zonexo at gmail.com> wrote:
> Hi,
>
> I am trying to use PETSc to solve my poisson eqn. In the past, when I'm not
> using MPI, I set KSPSetTolerances to 1.0e-5. This seems to be good enuff.
>
> Now, I'm trying to use PETSc with MPI to solve the eqn. I am using a very
> small no. of pts, only 16x4. On 1 processor, the ans is the same as the one
> without MPI. However, on 2 processors, I found that I've to increase the
> KSPSetTolerances to 1.0e-6, else those grid pts on the edge will be
> different. On 4 processors, KSPSetTolerances has to be decreased to 1.0e-7.
> On 8 processors, when KSPSetTolerances is 1.0e-8, the difference of the last
> pt between 1 and 8 processors is about 3%.
>
> May I know why this is so? Also, does this happens only on very small grids?
> Does it happen on large grids as well? I usually solve grids with approx
> 20000 to 55000 pts.
>
> Thank you.
>
>


-- 
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




More information about the petsc-users mailing list