Performance degradation after upgrade to 3.0.0
Matthew Knepley
knepley at gmail.com
Sun Feb 1 12:07:14 CST 2009
In order to determine what is happening you first should:
1) Confirm that the solver setup is identical using -ksp_view for
both versions
2) Determine that the matrices are identical. Output both matrices using
MatView() with a PetscBinaryViewer. You can diff the files, and
you can also
solver both matrices using KSP ex10.
3) Look at the residuals using -ksp_monitor. If they are different, something
else has changed.
Matt
On Sun, Feb 1, 2009 at 6:32 AM, Billy Araújo <billy at dem.uminho.pt> wrote:
>
> Hi,
>
> I have also verified that there has been a degradation of performance using
> the new 3.0 version:
>
> This is my function calling PETSc:
>
> KSP ksp;
> PC pc;
>
> KSPCreate (PETSC_COMM_WORLD, &ksp);
>
> KSPSetOperators (ksp, *A, *A, DIFFERENT_NONZERO_PATTERN);
>
> KSPSetType (ksp, KSPFGMRES);
>
> KSPGetPC (ksp, &pc);
>
> PCSetType (pc, PrecondProc);
>
> KSPSetInitialGuessNonzero (ksp, PETSC_TRUE);
>
> KSPSetTolerances (ksp, 1E-50, maxtol, PETSC_DEFAULT, maxiter);
>
> KSPSetFromOptions (ksp);
>
> KSPSolve (ksp, *b, *x);
>
> KSPGetIterationNumber (ksp, iter);
>
> KSPGetResidualNorm (ksp, res);
>
> KSPDestroy (ksp);
>
>
> with previous version 2.3.3-p6:
>
> Number of iterations: 42 Residual: +7.073781E-13 Time: +8.615024E-03
>
> now:
>
> Number of iterations: 500 Residual: +2.746161E-05 Time: +1.026870E-01
>
> It is reaching maximum number of iterations. The only thing I changed was:
>
> MatSetOption (*A, MAT_SYMMETRIC);
> to
> MatSetOption (*A, MAT_SYMMETRIC, PETSC_TRUE);
>
> I think I didn't change anything else.
>
>
> Regards,
>
> Billy.
>
--
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